Re: [csswg-drafts] [css-color-6] color-contrast() should distinguish foreground and background (#7359)

Hi Chris @svgeesus 

> _Could you point to the formulae for these, so I can see how a proximal field is used to affect the calculations?_

I'd characterize this is "not quite ready for prime time" if only because I want a larger dataset to better define the interactions. 

One approach (preferred at the moment) uses the field input to adjust the power curve exponents for the given polarity set. But then we also need to determine the contrast between the local background and the larger field background, i.e. the button against the field, in addition to the text inside the button. 

So, we make the assumption then that the localBG to fieldBG is a low spatial frequency relationship (sharp edge not withstanding in the interest of simplicity).

Therefore: localBG -> totalBG is calculated with smaller exponents (i.e. closer to 0.425 ish) due to the lower contrast center (and lower contrast constancy) for the assumed lower SF, and then the text -> localBG is calculated with dynamic exponents, and here for BoW "light mode" polarity, the exponents are lowest when the fieldBG is near about 20 Y but for WoB "dark mode", the text -> localBG exponents are highest when the field is near 20 Y. **(See that chart I posted earlier).**

Also, light mode BoW is affected _most_ by the field changes, and dark mode is most immune, at least at higher contrasts. None of these shifts are linear or even in the same direction as the field changes. Hence I am working to collect more data from more users before dialing this all in. And also, this means that right now I'm working with LUTS and I don't have a "pure curve' solution, though that is the eventual goal.

A related issue is how the fieldBG affects the calculation or consideration for a maximum contrast (i.e. the point where halation becomes a problem). As darker fields tend to lower the halation point's luminance and therefore lowers the max contrast value.

And all of this is in consideration of "keeping the number of layers of this onion to a most reasonable level" and "minimal hand waving at the Cheshire Cat as one plummets past that smirking feline down this rabbit hole to China" or words to that effect.

Tangentially, I am _approaching_ a simple curve solution relating to spatial frequency effects for font weight and size, at least for Latin-based stimuli and for abstract dataviz elements.


-- 
GitHub Notification of comment by Myndex
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7359#issuecomment-1211085487 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 10 August 2022 18:17:54 UTC