Hacker News new | past | comments | ask | show | jobs | submit login

Why isn't there a more convenient okHSL/HSV way to input colors?

(rather unfortunate such a bad format like RGB is so dominant)




The tracking issue: https://github.com/w3c/csswg-drafts/issues/8659

As noted there, okHSL/HSV keeps the perceptual uniformity by removing some peaks beyond the geometric limit of HSL/HSV, and it is unclear whether it is what users do expect or not.


that's such a minor issue compared to the fact that it's the only human-comprehensible notation (but one that fixes serious hsl/v flaws) that the original question still stands


OkLCH is the best version of that.

Sure, you have to worry about chroma limits, but they reflect the reality of color differences (blues are never going to be as vivid as greens)


it's similar to all the others: either a non-generally-human-comprehensible notation (how is pure red oklch(62.8% 0.25768330773615683 29.2338851923426) treating you?) or seriously flawed (like HSL)


Are you sure you’re not thinking of okLAB? okLCH is basically HSL, with numbers that are consistent. Not sure why those numbers wouldn’t be human comprehensible. You’ve got a lightness of about 62%, which sounds right - that’s how far between black and white you are at pure red. You have a chroma of 0.25, which you need to understand as being ‘quite high’ (0.33 is about as high as chroma goes), which I appreciate is a thing you have to learn, but it’s not beyond human comprehension. Most importantly if you lower that chroma you get colors that are as red, but less intense - which is what you would expect. And then you have a hue, which is an arbitrary angle. Add 180 to it to get a complement though, or add or subtract 120 to get to green or blue.


> 62%, which sounds right - that’s how far between black and white you are at pure red.

First, it's not 62%, but 62.8%, so that's already a fail at producing a basic color. Second, it doesn't sound right - you have no general knowledge/experience clue that this much light between black and white is red, so have no chance for a good guess

> I appreciate is a thing you have to learn, but it’s not beyond human comprehension.

Can you not appreciate that 0-100 is something that you almost don't have to learn?

> if you lower that chroma you get colors that are as red, but less intense - which is what you would expect

Yes, that's the good part!

> And then you have a hue, which is an arbitrary angle

That's another common flaw of all these color notations (they should allow "r" for red and then +-degrees for deviations), but it this case it's worse because it's again not a clean 29 number for a "clean" color

> Add 180 to it to get a complement though, or add or subtract 120 to get to green or blue.

If you remember the whole wheel. Not beyond "human comprehension", just UI fail for the non-expert general human


Why do you want this particular red to be a special easy to pick color?


Such "pure" colors are foundational mental categories, or anchors, so that's only natural they should be the easiest - it makes working with colors more accessible

But they should all be easy, and your suggestion fails at multiple points as I've explained above, not only for red, so the I'm puzzled why you insist it should be that hard and want a proof of the opposite


Red is a much bigger category of color than #ff0000 though.


So? The value of anchor doesn't depend on it being the only color in its category


You can shorten that to oklch(62.8% 0.2576 29.23) and it will still max out the red subpixel on your sRGB monitor, not that this is a particularly serious flaw with okLCH anyway IMO, especially compared to the incomprehensible nonsense that is #RRGGBB unless you're specifically working with sRGB subpixels/pixels and not colour




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: