Myndex / SAPC-APCA

APCA (Accessible Perceptual Contrast Algorithm) is a new method for predicting contrast for use in emerging web standards (WCAG 3) for determining readability contrast. APCA is derived form the SAPC (S-LUV Advanced Predictive Color) which is an accessibility-oriented color appearance model designed for self-illuminated displays.
https://git.apcacontrast.com/documentation/APCAeasyIntro
Other
435 stars 14 forks source link

Where to apply the soft clamp #47

Closed TaigaYamada closed 2 years ago

TaigaYamada commented 2 years ago

I am attempting to write a custom implementation of APCA contrast calculation.

I was reading the plain English steps in the README.md, and came across the following description for the step of soft-clamping the color.

Should the soft-clamping be performed on both colors, or just the darker of the 2?

Thank you in advance.

Myndex commented 2 years ago

Hello @TaigaYamada

Yes, to both colors. It is unlikely that you'll have both so low, and the result would likely be zero in that case. But it was changed to all input colors in anticipation of additional features for some versions.

You'll see in the actual code that both are processed.

Thank you!

Andy