Is the oklch colour notation in CSS considered to be accessibility supported? #4559
Replies: 1 comment 1 reply
-
Supposedly, easier to read/understand by humans. And can be used to encode wide gamut colours that can't be expressed by regular RGB/HSL/hex. https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl
The contrast calculations from WCAG 2.x don't, if i recall correctly, handle wide gamut and different colour spaces at all. So this will be a problem going forward...though if I recall correctly, a while ago we added a clarification to the contrast stuff that anchors it to sRGB colour space, so at least it should the maths should work after an initial conversion/downsampling to sRGB to at least achieve consistent-enough results. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I had never heard of oklch or the Oklab color space until today when I came across it in a CSS file on a public sector website. MDN says it has full browser support, albeit only in the last two years or so.
Does anyone know if there are any issue with any assistive technologies? Do any of them use their own rendering engine that might not support oklch? And what about testing tools? Do we know if any of them do or don't support oklch?
FWIW, I cannot see any plausible reason for using this on most websites, certainly not on the one I was testing. As far as I can tell, it's intended for 3D rendering in games and animations.
Beta Was this translation helpful? Give feedback.
All reactions