Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

RGB is just allways worst OKLCH usually pretty, which is all I want from gradients most of the time.

I had claude build me a comparison (not sure why 2x the same HSL one) https://i.imgur.com/uziQibR.png

Also super hard in RGB: https://jsfiddle.net/nhgvzm5p/2/ it's just a 2 color OKLCH gradient:

    oklch(0 0.07 279) 66%,
    oklch(0.98 0.09 276) 99%


That gradient looks terrible, very bad colour banding, because you’re starting and ending at points that are way out of gamut, and the technique used to bring it in isn’t smooth. For a gradient like that, you probably want at least five points.

That is the biggest problem with these colour spaces: the edges are unclear, and overflowing them has bad effects.


you think I can get the same OKLCH style colors but without banding?

if I sample 5 colors and throw them in as rgb?

the 3 color rgb one has very similar banding


my biggest problems with OKLCH:

- how to easily add "warmth". you can't just add red+green - no good tools for it (e.g. a nice gradient picker ui that lets me specify if I want to allow running out of bounds of teh color space and clip a few colors at max saturation)




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

Search: