First look at colour spaces in CSS

Week 319 was posted by Charanjit Chana on 2023-12-04.

One thing I forgot to put on my CSS learning list for 2024 was colour spaces in CSS. I've been meaning to dive into this for a while and had a quick play over on CodePen to built a couple of examples that let you manipulate the colour of a white box to be able to tune it using the oklch and oklab colour spaces.

What I hope the achieve by exploring some more is to see HDR colours on my screen, ultra white whites like you get when you take photos of clouds on your iPhone.

I'll be playing with this some more next year to see if I can get it working beyond just replicating what I can get from using RGB or HSL in CSS for colour values.


Tags: css


Tweet WhatsApp Keep Upvote Digg Tumblr Pin Blogger LinkedIn Skype LiveJournal Like