icc-brightness icon indicating copy to clipboard operation
icc-brightness copied to clipboard

Support for color temperature

Open SageEx opened this issue 5 years ago • 1 comments

Hi, First of all thanks for this.

With xrandr I could emulate redshift by setting the gamma like xrandr --output eDP-1 --brightness 0.7 --gamma 1.0:0.9:0.81. How do I go about supporting gamma in icc-brightness ?

Can you support this feature? If not, could you give me pointers where to look at ? I can raise a PR.

SageEx avatar Sep 06 '19 16:09 SageEx

Look at the function create_srgb_profile() in icc-brightness-gen.c. It sets the same gamma curve to all three R,G,B channels.

The gamma curve is: (a X + b)^gamma

It seems that you are setting a different gamma value for each channel. I think that the correct approach to emulating a redshift is to set a different slope 'a' for each channel.

A PR would be welcome.

udifuchs avatar Sep 06 '19 16:09 udifuchs