Addon · Colors
OKLCH-powered colors with automatic opacity, brightness, and darkness variants. Drag the logo balls to remix the brand hue.
Three numbers — three hues — generate the full system below.
5 base colors × 8 variants. Same naming pattern, every time.
_c-brand /* color */ _bg-brand /* background */ _bc-brand /* border-color */
brand /* full */ brand_ /* 65% */ brand__ /* 35% */ brand___ /* 5% */
brand-d /* darker */ brand-b /* brighter */ brand-d_ /* deeper dark */ brand-b_ /* lighter bright */
One pivot, two variables. The same --dark and --light tokens flip their lightness automatically — components stay mode-agnostic. OKLCH keeps chroma and hue intact; only the L channel swaps.
Two CSS variables drive the entire mode swap. Everything else reads from them.
/* Light mode (default) */ --current-lightness: 96.4%; --current-darkness: 6.4%; /* Dark mode — when .toggle-theme is on */ --current-lightness: 5%; --current-darkness: 95%;
--dark and --light reference the pivot. Swap the pivot, every consumer flips at once — same OKLCH chroma and hue, swapped lightness.
--dark-lightness: var(--current-darkness); --dark-chroma: 0.05; --dark-hue: var(--brand-hue); --light-lightness: var(--current-lightness); --light-chroma: 0.01; --light-hue: var(--brand-hue);
Same markup, same tokens. Only --current-lightness and --current-darkness change between cards.
Add the toggle-theme class on the body. EVA also flips the brightness offsets so the -d modifier still darkens and -b still brightens visually.
<body class="current-theme theme-eva toggle-theme">
Pass $auto-theme-switch: true to the SCSS config. EVA generates a prefers-color-scheme: dark media query that swaps the pivot for you — no JS, no class.
@use 'eva-css-fluid' with ( $auto-theme-switch: true );
Write _c-dark _bg-light and forget about modes. The pivot does the work — your component code stays identical in both states.
Try it — hit the sun icon at the top-right of this page. Every swatch above flips at once.
OKLCH foundations, theme switching, contrast formulas. Plus the auto-theme tool to extract palettes from images.