Live data from Hacker News

What are OKLCH colors?

jakub.kr

171–180 of 189 posts

Re: What are OKLCH colors?

#171

Earlier quoted context omitted.

> A grey shirt is a desaturated shirt. You cannot resaturate grey. Aren't these in direct conflict? If you can't resaturate it, that implies it's not desaturated. > I think if you buy a tie-dye shirt or phone case and it comes out half grey, despite it being a valid color, most folks will be disappointed. And if you buy a forest motif, people will be upset if it's pink. That's just doing a tie-dye wrong, not a rebuke…

> Aren't these in direct conflict? If you can't resaturate it, that implies it's not desaturated. Kinda. There's a singularity in the math. The problem is that hue is defined as an angle and saturation is defined as distance from the center, but there's no consistent way to define a direction for the origin. Black and white have the same problem because they're also desaturated. > And if you buy a forest motif, peopl…

Of course it doesn't belong in all gradients. It would only be in gradients that go from near-opposite colors. Or if you mean pure gray it would only be in gradients between exact opposite colors, and there are no good options for such a gradient.

Re: What are OKLCH colors?

#172

Earlier quoted context omitted.

> Aren't these in direct conflict? If you can't resaturate it, that implies it's not desaturated. Kinda. There's a singularity in the math. The problem is that hue is defined as an angle and saturation is defined as distance from the center, but there's no consistent way to define a direction for the origin. Black and white have the same problem because they're also desaturated. > And if you buy a forest motif, peopl…

Of course it doesn't belong in all gradients. It would only be in gradients that go from near-opposite colors. Or if you mean pure gray it would only be in gradients between exact opposite colors, and there are no good options for such a gradient.

I mention tie-dye because it feels like a quintessential example of a color gradient. I think it's perfectly reasonable to ask for a blue and orange tie-dye shirt and perfectly reasonable to not want grey colors simply because they're on opposite sides. I could see white in between, I could even see black, or I could see purple and red or cyan and yellow. I don't think there's a universally right answer here!

Re: What are OKLCH colors?

#173

Earlier quoted context omitted.

Of course it doesn't belong in all gradients. It would only be in gradients that go from near-opposite colors. Or if you mean pure gray it would only be in gradients between exact opposite colors, and there are no good options for such a gradient.

I mention tie-dye because it feels like a quintessential example of a color gradient. I think it's perfectly reasonable to ask for a blue and orange tie-dye shirt and perfectly reasonable to not want grey colors simply because they're on opposite sides. I could see white in between, I could even see black, or I could see purple and red or cyan and yellow. I don't think there's a universally right answer here!

Someone asking for those colors doesn't actually want a gradient with two anchor points. So yes there are many answers but because it's not a quintessential example of a gradient.

Re: What are OKLCH colors?

#174
post #66
post #14

Earlier quoted context omitted.

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."?

Ok Lunch :)

https://dillonshook.com/how-do-you-pronounce-oklch/

Re: What are OKLCH colors?

#175

Earlier quoted context omitted.

I mention tie-dye because it feels like a quintessential example of a color gradient. I think it's perfectly reasonable to ask for a blue and orange tie-dye shirt and perfectly reasonable to not want grey colors simply because they're on opposite sides. I could see white in between, I could even see black, or I could see purple and red or cyan and yellow. I don't think there's a universally right answer here!

Someone asking for those colors doesn't actually want a gradient with two anchor points. So yes there are many answers but because it's not a quintessential example of a gradient.

> Someone asking for those colors doesn't actually want a gradient with two anchor points.

I thought the same until I googled "blue and orange tie-dye." I'll be honest, more white and black than I expected!

> So yes there are many answers but because it's not a quintessential example of a gradient.

We may have to agree to disagree that tie-dye isn't a quintessential example of a gradient. Would you argue that rainbows aren't either?

Re: What are OKLCH colors?

#176

Earlier quoted context omitted.

There's no transition, this is color mixing, or overlay in case of light.

Is that not a transition through the color mixing (or overlay). I'm assuming the light sort of tails off as you leave the area of one color and head to the other (and the other color comes on with more intensity then). I suppose that's different with light than some analog with pigments? (Two dabs of color set apart, a brush perhaps used to blend them as continuously as is possible.)

Your light thought experiment would produce a color gradient via additive color mixing.

A magenta to green gradient would then go through white rather than grey. A subtractive magenta-green gradient would go through black. Not sure what physical setup would produce the latter gradient. But the standard RGB (or OKLAB) gradient goes through grey rather than white or black. This type of gradient is physically created by dithering: Dithering a gradient from magenta to green, by just using these two base colors, would produce a perceptual grey in the middle. This type of color mixing is otherwise better known as alpha blending.

Re: What are OKLCH colors?

#177
post #103

Earlier quoted context omitted.

I think you do usually want to rotate the hue a bit when changing the lightness though. It’s a difficult thing to get right and one of the reasons the tailwind builtin colour palettes are so useful.

You don't. That's not something graphic designers ever do as compensation for perceptual uniformity. I looked into it a bit more, and it turns out it's a result of OKLCH easily producing colors out of gamut, and then choosing to sacrifice hue accuracy for better saturation accuracy. That's a fundamental design flaw if you ask me. Changing hue is completely unacceptable in my book.

In "Refactoring UI" [1] (by the creators of tailwind) they recommend when designing your shades for a single base colour:

> Since different hues have a different perceived brightness, another way you can change the brightness of a color is by rotating its hue.

> To make a color lighter, rotate the hue towards the nearest bright hue — 60°, 180°, or 300°.

> To make a color darker, rotate the hue towards the nearest dark hue — 0°, 120°, or 240°.

> This can be really useful when trying to create a palette for a light color like yellow. By gradually rotating the hue towards more of an orange as you decrease the lightness, the darker shades will feel warm and rich instead of dull and brown

You could argue whether this is "perceptual uniformity" or something else, but the fact is that to create a realistically useful colour palette with a bunch of shades, you definitely cannot simply use HSL, keep the hue constant, adjust S/L. It's not that easy (and OKLCH doesn't make it that easy either).

1. https://www.refactoringui.com/

Re: What are OKLCH colors?

#178

Earlier quoted context omitted.

Someone asking for those colors doesn't actually want a gradient with two anchor points. So yes there are many answers but because it's not a quintessential example of a gradient.

> Someone asking for those colors doesn't actually want a gradient with two anchor points. I thought the same until I googled "blue and orange tie-dye." I'll be honest, more white and black than I expected! > So yes there are many answers but because it's not a quintessential example of a gradient. We may have to agree to disagree that tie-dye isn't a quintessential example of a gradient. Would you argue that rainbow…

> I thought the same until I googled "blue and orange tie-dye." I'll be honest, more white and black than I expected!

Putting white or black in between adds another anchor point.

And looking more around examples of blue and orange tie dye, most aren't really gradients overall, they have big splotches of solid color with small gaps or overlaps in between, and at least half the time the gaps and overlaps don't even have a gradient inside them.

> We may have to agree to disagree that tie-dye isn't a quintessential example of a gradient. Would you argue that rainbows aren't either?

Hmm. How about this. I would say a rainbow is not a gradient between two colors, and the color space discussion is about a gradient between two colors. The exact border of "quintessential" is not something I really want to spend too much time on.

Re: What are OKLCH colors?

#179

Earlier quoted context omitted.

> Someone asking for those colors doesn't actually want a gradient with two anchor points. I thought the same until I googled "blue and orange tie-dye." I'll be honest, more white and black than I expected! > So yes there are many answers but because it's not a quintessential example of a gradient. We may have to agree to disagree that tie-dye isn't a quintessential example of a gradient. Would you argue that rainbow…

> I thought the same until I googled "blue and orange tie-dye." I'll be honest, more white and black than I expected! Putting white or black in between adds another anchor point. And looking more around examples of blue and orange tie dye, most aren't really gradients overall, they have big splotches of solid color with small gaps or overlaps in between, and at least half the time the gaps and overlaps don't even hav…

In my mind a gradient is simply a smooth transition between colors with no universally agreed upon definition. The choice of specific curve through colorspace is rather arbitrary. It seems perfectly reasonable to want to include grey and perfectly reasonable to want to avoid it.
Post reply on HN