I borrowed Thinkpad T590 to play with Ubuntu and Mate reinstallation. To my displeasure and disappointment I found out that my preffered theme looked much sharper than it was expected and had to be. Tinkering with brightness control did not help. Supposedly, I had to try adjust display color temperature as the next step. Expectedly, there were no hardware controls to change display color temperature.
Obvious tools to try were Redshift and xsct. Both of them were in standard Ubuntu repositories. Both of them were wrappers for xrandr utility which was installed by default.
Given that I did not intend to reproduce real world colors and just shift them to my liking, the next question is mapping of gamma, i.e. R, G, B ratios to black body temperature. There were Tanner Hellard algorithm, vendian.org tables and Redshift source code
They say popular choices were:
- 1000 โ Lowest value (super warm/red)
- 3000 โ Dark night
- 4000 โ Default night
- 4500 โ Evening
- 5500 โ Balanced night light temperature
- 5800 โ Adjusted for human at display white color point
- 6500 โ Default white color point
- 10000 โ Highest value (super cool/blue)
Excerpt from Redshift color ramp
/* Whitepoint values for temperatures at 100K intervals.
These will be interpolated for the actual temperature.
This table was provided by Ingo Thies, 2013. See
the file README-colorramp for more information. */
static const float blackbody_color[] = {
1.00000000, 0.18172716, 0.00000000, /* 1000K */
1.00000000, 0.25503671, 0.00000000, /* 1100K */
1.00000000, 0.30942099, 0.00000000, /* 1200K */
1.00000000, 0.35357379, 0.00000000, /* ... */
1.00000000, 0.39091524, 0.00000000,
1.00000000, 0.42322816, 0.00000000, /* 1500K */
1.00000000, 0.45159884, 0.00000000,
1.00000000, 0.47675916, 0.00000000,
1.00000000, 0.49923747, 0.00000000,
1.00000000, 0.51943421, 0.00000000,
1.00000000, 0.54360078, 0.08679949, /* 2000K */
1.00000000, 0.56618736, 0.14065513,
1.00000000, 0.58734976, 0.18362641,
1.00000000, 0.60724493, 0.22137978,
1.00000000, 0.62600248, 0.25591950,
1.00000000, 0.64373109, 0.28819679, /* 2500K */
1.00000000, 0.66052319, 0.31873863,
1.00000000, 0.67645822, 0.34786758,
1.00000000, 0.69160518, 0.37579588,
1.00000000, 0.70602449, 0.40267128,
1.00000000, 0.71976951, 0.42860152, /* 3000K */
1.00000000, 0.73288760, 0.45366838,
1.00000000, 0.74542112, 0.47793608,
1.00000000, 0.75740814, 0.50145662,
1.00000000, 0.76888303, 0.52427322,
1.00000000, 0.77987699, 0.54642268, /* 3500K */
1.00000000, 0.79041843, 0.56793692,
1.00000000, 0.80053332, 0.58884417,
1.00000000, 0.81024551, 0.60916971,
1.00000000, 0.81957693, 0.62893653,
1.00000000, 0.82854786, 0.64816570, /* 4000K */
1.00000000, 0.83717703, 0.66687674,
1.00000000, 0.84548188, 0.68508786,
1.00000000, 0.85347859, 0.70281616,
1.00000000, 0.86118227, 0.72007777,
1.00000000, 0.86860704, 0.73688797, /* 4500K */
1.00000000, 0.87576611, 0.75326132,
1.00000000, 0.88267187, 0.76921169,
1.00000000, 0.88933596, 0.78475236,
1.00000000, 0.89576933, 0.79989606,
1.00000000, 0.90198230, 0.81465502, /* 5000K */
1.00000000, 0.90963069, 0.82838210,
1.00000000, 0.91710889, 0.84190889,
1.00000000, 0.92441842, 0.85523742,
1.00000000, 0.93156127, 0.86836903,
1.00000000, 0.93853986, 0.88130458, /* 5500K */
1.00000000, 0.94535695, 0.89404470,
1.00000000, 0.95201559, 0.90658983,
1.00000000, 0.95851906, 0.91894041,
1.00000000, 0.96487079, 0.93109690,
1.00000000, 0.97107439, 0.94305985, /* 6000K */
1.00000000, 0.97713351, 0.95482993,
1.00000000, 0.98305189, 0.96640795,
1.00000000, 0.98883326, 0.97779486,
1.00000000, 0.99448139, 0.98899179,
1.00000000, 1.00000000, 1.00000000, /* 6500K */
0.98947904, 0.99348723, 1.00000000,
0.97940448, 0.98722715, 1.00000000,
0.96975025, 0.98120637, 1.00000000,
0.96049223, 0.97541240, 1.00000000,
0.95160805, 0.96983355, 1.00000000,
0.94303638, 0.96443333, 1.00000000,
0.93480451, 0.95923080, 1.00000000,
0.92689056, 0.95421394, 1.00000000,
0.91927697, 0.94937330, 1.00000000,
0.91194747, 0.94470005, 1.00000000,
0.90488690, 0.94018594, 1.00000000,
0.89808115, 0.93582323, 1.00000000,
0.89151710, 0.93160469, 1.00000000,
0.88518247, 0.92752354, 1.00000000,
0.87906581, 0.92357340, 1.00000000,
0.87315640, 0.91974827, 1.00000000,
0.86744421, 0.91604254, 1.00000000,
0.86191983, 0.91245088, 1.00000000,
0.85657444, 0.90896831, 1.00000000,
0.85139976, 0.90559011, 1.00000000,
0.84638799, 0.90231183, 1.00000000,
0.84153180, 0.89912926, 1.00000000,
0.83682430, 0.89603843, 1.00000000,
0.83225897, 0.89303558, 1.00000000,
0.82782969, 0.89011714, 1.00000000,
0.82353066, 0.88727974, 1.00000000,
0.81935641, 0.88452017, 1.00000000,
0.81530175, 0.88183541, 1.00000000,
0.81136180, 0.87922257, 1.00000000,
0.80753191, 0.87667891, 1.00000000,
0.80380769, 0.87420182, 1.00000000,
0.80018497, 0.87178882, 1.00000000,
0.79665980, 0.86943756, 1.00000000,
0.79322843, 0.86714579, 1.00000000,
0.78988728, 0.86491137, 1.00000000, /* 10000K */
/*
... many more
*/
0.62740336, 0.75282962, 1.00000000 /* 25100K */
};
So far, so good.
$ xrandr --verbose | grep -Ei "connected|brightness|gamma"
eDP-1 connected primary ...
Gamma: 1.0:1.0:1.0
Brightness: 1.0
...
Unexpectedly, however logical at the second glance, I had to rise color temperature and not to lower it to soften red color. 7500K virtually did the trick.
xrandr --output eDP-1 --gamma 0.91:0.94:1.0
