[gnome-settings-daemon/benzea/blackbody-color-unstable: 3/3] color: Switch to better black body color calculation
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/blackbody-color-unstable: 3/3] color: Switch to better black body color calculation
- Date: Mon, 3 Jun 2019 13:03:24 +0000 (UTC)
commit ca4a7556b4f7146dbe48b22e66ee1e210ad513da
Author: Benjamin Berg <bberg redhat com>
Date: Mon Jun 3 15:00:50 2019 +0200
color: Switch to better black body color calculation
The planckian calculation is much better, but it also means we need to
change the default from 4000K to 2700K to get a similar effect. 2700K is
actually a good value as it is similar to commonly found "warm-white"
artificial lights.
Note that the defaults and range in g-c-c will also need to be adjusted
for this change.
data/org.gnome.settings-daemon.plugins.color.gschema.xml.in | 2 +-
plugins/color/gsd-color-state.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
b/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
index cb24e3c2..286ea808 100644
--- a/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
+++ b/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in
@@ -17,7 +17,7 @@
<description>Night light mode changes the color temperature of your display when the sun has gone down
or at preset times.</description>
</key>
<key name="night-light-temperature" type="u">
- <default>4000</default>
+ <default>2700</default>
<summary>Temperature of the display when enabled</summary>
<description>This temperature in Kelvin is used to modify the screen tones when night light mode is
enabled. Higher values are bluer, lower redder.</description>
</key>
diff --git a/plugins/color/gsd-color-state.c b/plugins/color/gsd-color-state.c
index b4bf1807..26a277a1 100644
--- a/plugins/color/gsd-color-state.c
+++ b/plugins/color/gsd-color-state.c
@@ -411,7 +411,7 @@ gcm_session_generate_vcgt (CdProfile *profile, guint color_temperature, guint si
/* get the color temperature */
if (!cd_color_get_blackbody_rgb_full (color_temperature,
&temp,
- CD_COLOR_BLACKBODY_FLAG_NONE)) {
+ CD_COLOR_BLACKBODY_FLAG_USE_PLANCKIAN)) {
g_warning ("failed to get blackbody for %uK", color_temperature);
cd_color_rgb_set (&temp, 1.0, 1.0, 1.0);
} else {
@@ -564,7 +564,7 @@ gcm_session_device_reset_gamma (GnomeRROutput *output,
/* get the color temperature */
if (!cd_color_get_blackbody_rgb_full (color_temperature,
&temp,
- CD_COLOR_BLACKBODY_FLAG_NONE)) {
+ CD_COLOR_BLACKBODY_FLAG_USE_PLANCKIAN)) {
g_warning ("failed to get blackbody for %uK", color_temperature);
cd_color_rgb_set (&temp, 1.0, 1.0, 1.0);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]