2026-05-03 21:41 UTC
@adamhotep@infosec.exchange @firefoxwebdevs@mastodon.social @khamer@me.dm
Here's your answer, the coefficients for sRGB are
R: 0.2126
G: 0.7152
B: 0.0722
If you multiple each of them by 255, you get the numbers in your code.
However, if you want the real flip point, it's about 0.37, the approximate center of contrast, not 0.63
I have a repo that demonstrates this:
https://github.com/Myndex/fancyfontflipping
And another that is just a flipper:
https://github.com/Myndex/max-contrast
Replies (1)
-
@adamhotep@infosec.exchange 2026-05-03 21:44
@Myndex@techhub.social 1 - 0.63 = 0.37, so one of us is inverted