Follow

First time using color space other than RGB.

I'm implementing a cli based search function, where I need hightlight the keyword in the result.

I noticed there are several colors are really dark under RGB color space. I don't want hand pick any color palette since I'm bad at doing that. But this will result in a very unpleasant visualization.

Then I remembered OkLab, I randomly know that from the Internet, give it a try and it's amazing. But with `l` controling the brightness, with other two parameters called `a` and `b`, which control the green-red and blue-yellow, to me, totally nonsense. It's not a intuitive way to generate color.

With some unsatisfactory, I found OkLch, which I have no idea what it is. But hey, it can control brightness, chroma and hue. That's what I need exactly! I need random color to distinguish different keywords, but I want all keywords looks equal. With fixed brightness and chroma, I can select whatever hue I want!

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.