Commit 62981b3c authored by Benjamin Berg's avatar Benjamin Berg Committed by Benjamin Berg

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.
parent 37cc9af6
Pipeline #99933 passed with stages
in 5 minutes and 29 seconds
......@@ -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>
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment