Question: how to calculate fallback? #134
Replies: 4 comments
-
We are using culori’s Here is some theory about possible strategies for fallback https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl#gamut-correction I think |
Beta Was this translation helpful? Give feedback.
-
That's a wonderful blogpost, helped me understand oklch even better than I already thought I did and also helped me solve my problem. Thanks a lot! 😄 |
Beta Was this translation helpful? Give feedback.
-
i guess have a related issue, where i am looking for the fallback for i feel your choice makes more sense is that what is meant by |
Beta Was this translation helpful? Give feedback.
-
I have to agree, I'm working on a new project this week and decided to use hex in my color palette exactly because of this. I create the palette in oklch, get the nicer fallbacks from oklch.com and then copy/paste the hex in my css properties. Relative color such as |
Beta Was this translation helpful? Give feedback.
-
I love oklch.com and use it regularly. I've recently been trying to generate a colour palette with oklch, but am running into problems where colours don't exist, such as
oklch(45% 0.2 144)
.oklch.com nicely provides a fallback, but I can't figure out how it manages to do so. I've tried using culori's
rgb()
function, but it gives me a different result. How do I generate a consistent colour palette with oklch without running off the charts?Beta Was this translation helpful? Give feedback.
All reactions