I've added support for LCH and OKLCH color models in this project. This came out of my own need to make working with color variables, especially in Tailwind and shadcn/ui, a bit more manageable and intuitive.
Why This Matters:
Handling color variables was starting to drive me a bit nuts. LCH and OKLCH are great for more naturally defining colors, and I figured it would make our lives easier.
What I Did:
Implemented the typical syntax for lch/oklch
New syntax for CSS variables:
--color-variable-oklch: 1 .3 23;
translates to oklch(1, .3, 23) in CSS.
The variable must specify it's type at the end to render the color correctly
Tested it out, works like a charm for lch/oklch. I think you'll find it pretty straightforward.
Description:
I've added support for LCH and OKLCH color models in this project. This came out of my own need to make working with color variables, especially in Tailwind and shadcn/ui, a bit more manageable and intuitive.
Why This Matters:
Handling color variables was starting to drive me a bit nuts. LCH and OKLCH are great for more naturally defining colors, and I figured it would make our lives easier.
What I Did:
--color-variable-oklch: 1 .3 23; translates to oklch(1, .3, 23) in CSS.
The variable must specify it's type at the end to render the color correctly
Tested it out, works like a charm for lch/oklch. I think you'll find it pretty straightforward.