Live data from Hacker News

What are OKLCH colors?

jakub.kr

61–70 of 189 posts

Re: What are OKLCH colors?

#61
post #25

Great post! Also check out oklch.com, I found it useful for building an intuition. Some stumbling blocks are that hues aren’t the same as HSL hues, and max chroma is different depending on hue and lightness. This isn’t a bug, but a reflection of human eyes and computer screens; the alternative, as in HSL, is a consistent max but inconsistent meaning. Another very cool thing about CSS’s OKLCH is it’s a formula, so you…

> Another very cool thing about CSS’s OKLCH is it’s a formula

While it’s more useful for a perceptual color space, relative colors are supported for all CSS color spaces e.g.

    background-color: rgb(from var(--base-color) calc(r - 76.5) g calc(b + 76.5));

Re: What are OKLCH colors?

#62
post #51

Aside from a few criticisms that others have already raised I think this is quite a nice introduction to OKLCH and how to use them in CSS. With that out of the way, I'd like to go on a tangent here: can anyone explain the modern trend of not including publishing dates in blog articles? It stood out to me here in particular because the opening sentence said that "OKLCH is a newer color model" and the "newer" part of t…

> can anyone explain the modern trend of not including publishing dates in blog articles? In such cases, I usually try to see if the `Last-Modified` header served with the HTML document over HTTP, can be useful, but I conclude that often the same people who don't bother with dating their content -- you'd think they'd understand where the word _blog_ comes from, as in "[web]-log" where timestamps are paramount -- thes…

I would imagine this is rather to whatever "blog engine" is used instead of the conscious choice of the author (even if they knew what they desire and what would qork better, it might not be their priority).

Re: What are OKLCH colors?

#63
Does anyone know how this is different to the Munsell color space, which is also perceptually uniform?

Edit: I would imagine that the only way to definine a perceptually uniform color space is by tons of user testing. This is how Munsell developed his color space… specifically presenting test subjects with pairs of identical and near-identical color swatches and asking if they could tell the difference.

In this way, pairwise comparisom of similararity became the bedrock of color perception science.

Re: What are OKLCH colors?

#65
post #63

Does anyone know how this is different to the Munsell color space, which is also perceptually uniform? Edit: I would imagine that the only way to definine a perceptually uniform color space is by tons of user testing. This is how Munsell developed his color space… specifically presenting test subjects with pairs of identical and near-identical color swatches and asking if they could tell the difference. In this way,…

My understanding is that it's the same with higher resolution.

Re: What are OKLCH colors?

#66
post #14

OKLCH: a color model based on OKLab (a perceptually uniform color space) where you control Lightness , Chroma (saturation), and Hue . "OK" because "it does an ok job" according to its creater Björn Ottosson.

He’s Swedish, so I bet OK is actually short for “Ottossons kulör” but he’s just being modest.

In the spirit of "Oll Korrekt", "Otto's Kolors"?

How do you pronounce it, btw? "Oklich"? "okay L.C.H."?

Re: What are OKLCH colors?

#68

Earlier quoted context omitted.

Rare, yes. Checking with both is definitely recommended!

Maybe you've seen this but there's also https://github.com/Myndex/bridge-pca that does the "this color pair passes both APCA and WCAG2?" check in one pass.

As per discussion of this new OKLCH idea in TFA - Are we even sure we have great formulas for measuring/defining contrast in the first place? Do you agree / disagree with any of the counterexamples over at: https://github.com/tattoy-org/contrast-experiments

Re: What are OKLCH colors?

#69

The “Better Gradients” thing is dodgy. OKLCH is a polar coordinate space. Hue is angle in this space. So to interpolate hue from one angle to another, to get from one side of a circle to the other, you go round the edge. This leads to extreme examples like the one shown: linear-gradient(in oklch, #f0f, #0f0) You can also go round the circle the other way, which will take you via blue–aqua instead of via red–yellow: l…

But what really is a "color gradient"?

Isn't it any continuous function that starts at a specified color and ends at another specified color?

How then does one say that any gradient is good or bad?

Isn't the problem you are highlighting guaranteed to exist for any colorspace that defines colors outside of human perception?

Re: What are OKLCH colors?

#70

> In the example above, you can see that the OKLCH colors maintain consistent blueness across all of the shades, while in the HSL example, the lighter shades drift to purple and the darker ones muddy out towards grayish. There is a very clear shift towards green in the OKLCH lightness value change example, enormously more so than any purple vibe in the HSL example. Clearly being able to select colours of the same per…

There’s no green shift at all in that example on my display. Could your calibration be off?
Post reply on HN