RGB is fine for specifying a color. I mean, there are issues with RGB colorspaces and whatnot, but if you need to pick the background of a page or the color of text, there's no real reason not to use RGB.
The problem with RGB is that it is really bad at color interpolation. You can't take the average of the red, green, and blue components of two colors and expect a usable color in the middle to come out. Instead, you need to move to a perceptual color space. CIELAB is the old perceptual color space of choice; Oklab is the new perceptual color space of choice.
Color interpolation is needed for things like gradients or information visualization, where you need to say things like "20% of the way between color A and color B".
So in my case where color shifting is happening, Oklab actually helps. I don’t know how it’s better than HSL for simple UI elements unless maybe you can get physically brighter values that pop out more on certain screens.
Yes. OKLCH is actually MORE intuitive when creating shades because it's based around human perception. It also supports wide color spaces like P3, where rgba is, IIRC, bound to sRGB.
The utility of these color spaces and color functions isn't lost just because LLM. Color systems haven't gone anywhere.
Would highly recommend reading up on OKLCH if you haven't already. A lot of people put a lot of effort into promoting this and bringing it to baseline..
I find it more intuitive: when I want to mix colors, or algorithmically choose colors, only oklch works to give decent results.
Maybe you want to severely darken/lighten a color on a page when the user hovers over it - doing it in RGB or HSL results in a color that does not go with the existing colors. Doing it in OKLCH does.
This started way back working with my long-term business partner and he built a pretty good tool to help visualize and tinker with it.
Website https://colorcolor.in
Do people actually use this?
Yes. I made https://uchu.style after I read this blog post: https://evilmartians.com/chronicles/oklch-in-css-why-quit-rg...I love OKLCH. Awkward to say, beautiful to look at.
https://evilmartians.com/chronicles/oklch-in-css-why-quit-rg...