Live data from Hacker News

New alternatives to HSL and HSV that better match color perception

bottosson.github.io

31–40 of 80 posts

Re: New alternatives to HSL and HSV that better match color perception

#31
I love this work - the OKLab model is really wonderful.

But I think for color pickers, there are cases where "constant lightness" is not the most important constraint. For instance, you might really mean "the most saturated primary in each hue" and then - you may want the most saturated colors to appear on a line (saturated red, saturated blue, etc.). A constant lightness constraint makes these appear in a really unpredictable pattern.

In less saturated colors, this constraint is very useful and feels right, but I think at the extremes it may reduce usability.

Re: New alternatives to HSL and HSV that better match color perception

#32

There’s some really cool features about lab-like color spaces. Particularly, the ability to quickly find, localize and transmit data (from with lower error rates): https://austingwalters.com/chromatags/ In almost every computer vision class I took, switching to the LAB color space and rerunning algorithms also still always led to improvement. The real trick in my mind is trying to do this via sensors and / or hardwar…

The OKlab definition is probably a bit easier to implement in hardware than CIELAB since there’s no funny “if” branch. Still, the number representation will be more complicated than YUV and such… fp16 maybe?

IIRC author of the TFA has retweeted some shader implementation of OKlab for color interpolation.

Re: New alternatives to HSL and HSV that better match color perception

#33
post #7

How is color distance computed for these? Still Euclidean or a different measure? Euclidean on RGB leads to "grayification" of colors.

On the original OKlab Euclidean will do. Perceptually-uniform color spaces are designed for that (at least for close colors).

On these slightly squished and stretched ones… I think converting back to OKlab is the better idea. You can just turn the polar stuff into Cartesian directly too, but it will be distorted.

Re: New alternatives to HSL and HSV that better match color perception

#34
This is great work. I love how the result is a representation of maximally saturated colors that correctly depict perceptual lightness of what those maximum saturations are. You can get a little palette out of that which contains 'all colors' but which makes intuitive sense in a way that traditional representations don't.

It's like fitting maximum saturation into a palette that's more linear. From canary yellow you don't HAVE a lot of room to go to pure white: there's very little difference. And it translates to very little linear space between the points. So nice.

Re: New alternatives to HSL and HSV that better match color perception

#35

I had a project where I had to convert absorption spectrum of a liquid sample into a colour. It was one of those "Just do this quick, it doesn't have to be perfect" type of things where I didn't get a chance to really understand it. I was baffled how many standards and technicalities there is behind a seemingly simple thing.

Take the dot product between 1 - your spectrum and the CIE XYZ color matching functions, then convert it to sRGB or any other color space of your choice.

Re: New alternatives to HSL and HSV that better match color perception

#36

These days I would want a color picker that considers the lighting and surrounding colors. I have an office which has huge windows facing (mostly) away from the sun so I have bright light from either clouds or blue sky. Reproductions of renaissance paintings and photographs on ‘bright white’ paper look great, but at home the color temps are in the high 2000s usually and I need coated papers for the images to be compe…

I think screen color space and print color space are just two entirely different considerations. They meet up in the middle somewhere, but you really can't look at both at the same time

Either the screen or the print depends on the surrounding environment. The print also depends on how it is lit.

To some extent one learns that something that looks like this in one environment will look like that in that environment.

Re: New alternatives to HSL and HSV that better match color perception

#37

I think the real story is subjective, not quantitative. Color pickers: https://bottosson.github.io/misc/colorpicker/ OKHSL works a lot better than the alternatives. It's really nice! OKHSV doesn't seem as good, and neither do the other new ones.

And speaking subjectively, I have always preferred HSV because I came to color from the background of mixing pigments (painting). Adding white to a pigment to desaturate it (make it more pastel) is intuitive with paints ... as is adding black to darken a pigment.

HSV (and Okhsv) more closely match my painterly intuition.

Re: New alternatives to HSL and HSV that better match color perception

#38

I think the real story is subjective, not quantitative. Color pickers: https://bottosson.github.io/misc/colorpicker/ OKHSL works a lot better than the alternatives. It's really nice! OKHSV doesn't seem as good, and neither do the other new ones.

And speaking subjectively, I have always preferred HSV because I came to color from the background of mixing pigments (painting). Adding white to a pigment to desaturate it (make it more pastel ) is intuitive with paints ... as is adding black to darken a pigment. HSV (and Okhsv) more closely match my painterly intuition.

HSV and not HSL for that mental model? That's surprising to me—I thought the tint/shade system would lead to wanting to put max-chroma in the middle.

Re: New alternatives to HSL and HSV that better match color perception

#39
My personal complaint with color pickers is that they make it hard to find many normal environmental colors. Where is brown? I've learned to find it around red, a little toward orange, and a dark saturation. It's not intuitive, and I don't feel like I just pick _some_ brown because I can't easily explore the space of browns through beige and tan. Flesh tones are similarly difficult.

I'm not sure what the solution is. A purely algorithmic color picker probably isn't the answer because it's not just our color perception that matters, but also the way colors are formed in our environment (which is what gives us so many browns).

Re: New alternatives to HSL and HSV that better match color perception

#40

My personal complaint with color pickers is that they make it hard to find many normal environmental colors. Where is brown? I've learned to find it around red, a little toward orange, and a dark saturation. It's not intuitive, and I don't feel like I just pick _some_ brown because I can't easily explore the space of browns through beige and tan. Flesh tones are similarly difficult. I'm not sure what the solution is.…

Brown is weird [1]. It's basically dark orange. Flesh tones fall into that same category - people are orange-hued [2]. Oranges/reds are mostly produced by various unsaturated molecules, such as carotenes, lignins, phenols, and tars, and browns are just dark collections of many kinds red-orange pigments. It does not map well to any of the common color spaces because its inherently heterogeneous.

The solution would probably be pallettes that let you pick arbitrary axes to move through color space.

1 - https://youtu.be/wh4aWZRtTwU

2 - According to Neil Harbisson, the guy with the color-sensing antenna, in-person conversation, but you can also verify with photoshop.

Post reply on HN