Color Guide
16 dynamic color props
Open Props has 16 supercharged oklch
variables for making palettes
of any hue (caniuse oklch). This enables
360 hues and all sorts of chromas to be a palette, not some limited
set of indigo, pink, cyan, etc sets like before.
In this new workflow you import the palette props. This gives you access to
--color-{1-16}
. Customize the palette with 1-3 palette props:
--palette-hue
--palette-hueRotateBy
--palette-chroma
Tint with any hue, add hue rotation along the palette for intrigue, and choose the vibrance. Here’s an example of the CSS you’ll write to customize the palette, as well as handy levers and a fun shuffle button.
Your Palette
Palette Applied
Example usage of those 16 colors to create a light and dark theme. 1 document background, 3 surfaces (cards, etc) and 2 wells.
Accessibility
The following demo shows the WCAG contrast of a primary and secondary text colors on each well and surface.
Light
Dark
Surface
1Surface
2AA
AA
Surface
3AA
AA
Well
1AA
AA
Well
2AA
AA
Surface
1AA
AA
Surface
2AA
AA
Surface
3AA
AA
Well
1AA
AA
Well
2