Conversation
|
I'm sorry I haven't come back to this one yet. I plan on integrating this into v0.13.0. If you'd like to make a PR for the color space work you showed me before, that would also fit well into v0.13.0. If not, I would like to borrow from your work and implement it myself (giving you due credit, of course). Someone recently requested this in #63, and wlsunset already has a working patch for this using wlr-gamma-control. Hope you are well and look forward to hearing from you. |
|
Hi! Sorry for no updates, I'll look at it over the weekend and let you know. |
|
Tried comparing the Bradford chromatic adaptation (the "correct" solution that can go negative) with the proposed solution in Blender and it's in the same direction, but I guess why not do it properly and use Bradford? Just with clamped elements and "normalized" rows at the end, that barely changes the output and makes it compatible with It's just very unfortunate that the CTM is not being applied in linear light :( this changes some saturated colors quite a bit (still better than before though). Hyprland discussion #15747 for reference. Here's a little comparison,
Here's an overview of the Bradford math (just for reference): I wonder if it could be further simplified. I'll probably experiment with the Bradford method a bit more and maybe try to implement it later, does that sound good? |
|
Thank you for sharing this. The Bradford chromatic adaptation appears to deliver roughly an ideal result for reducing blue and green while maintaining correct relative color expression. The desat non-lin honestly looks pretty good too. If you have time, we could test both non-lin versions live and see how we both feel about it. Increasing readability of blue text is still a win, regardless of which lands. Thank you for the update! |
|
FWIW here's a WIP branch with some of my earlier experiments + the Bradford adaptation: It seems to work pretty well I think (Hyprland only). It's a bit more code (and some of it sucks I'm sure), but if Hyprland decides to do something about the CTM handling in the future, we could just skip a few lines and instantly have something quite good. Should I maybe make a new PR? (or if you would like to work on it, that's fine with me too) |
Thank you for sharing these. I'll take a more thorough look at what you've implemented thus far soon after my midterms are up next week.
If you have time right now, I would greatly appreciate it. I actually made the switch back to Hyprland from Niri recently, and think giving us the option to desaturate or use an approximation of the Bradford adaptation would be a welcomed improvement for many people. Let me know if I can help with anything and I'll get to it asap, hopefully next week. Thank you for your help with this. |






An experiment to test desaturating screen before applying the temperature multiplier to improve readability of saturated colors.
Problem
Imagine blue text on black background. When using very low temperatures, blue and green channels get multiplied to almost 0, making it hard to read (compared to greyscale or red text). Same thing for white text on red background - blue/green components get dimmed, and what remains is red on red... So potentially an accessibility thing.
Solution
We can first partially desaturate the image and then apply the temperature correction. To do that, instead of using only the diagonal components of the CTM, we can split the contributions within each row. The result is the same overall temperature (no change for greyscale), but saturated text is more readable and images look (subjectively) more pleasant.
In this PR, I'm exponentially reducing saturation the further we get from 6500K (in the inverse space). There is one variable to control the desaturation strength, through experimentation I found 0.4 to work pretty well.
Attribution - calibration image found here.
Technically, it might be better to use some proper Chromatic Adaptation Transform, but I believe those can go negative, which
hyprland_ctm_control_v1does not support anyway.Works in Hyprland, currently no clue about other backends...