3.1 Color System

Standard uses mathematical color spaces based on the OKLCH chromatic space. The entire palette adapts dynamically to guarantee perfect contrast and harmony.


The OKLCH Color Space

Unlike traditional color spaces (sRGB, HSL) which fail to respect the human eye’s perception of lightness (for instance, yellow appears much brighter than blue at the same lightness value), OKLCH accurately models human vision:

All of our contrast and theme generation formulas rely on this space to ensure automatic accessibility (WCAG/APCA compliance).


The System Pigment Spectrum

Standard defines six base hues (pigments) generated via specific OKLCH angle rotations to ensure a clear distinction of semantic roles:

Token Hue Angle Semantic Role
--pigment-red 25° Errors, fatal alerts (--color-error)
--pigment-yellow 85° Warnings, focus/attention (--color-warning)
--pigment-green 145° Success, valid states (--color-success)
--pigment-cyan 190° System info, metadata (--color-info)
--pigment-blue 240° Hyperlinks, active focus (--color-link)
--pigment-purple 300° Decorative elements, magic themes

Automatic Accent Strategies

To preserve visual harmony, the active accent color (--color-accent) can be automatically derived from the primary text foreground using three geometric strategies:

  1. Triadic (Default): A rotation of +120° on the color wheel. Provides a balanced, modern, and natural contrast.
  2. Complementary: A rotation of +180° (opposite hue). Produces aggressive, maximum contrast, ideal for call-to-action elements.
  3. Analogous: A subtle rotation of +30°. Creates a soft, harmonious camaïeu effect, perfect for minimal interfaces.

Light/Dark Themes and Deterministic Inversion

Standard applies a strict, deterministic inversion rule when toggling between light and dark modes:


Surface Elevation & Shadows

Interface depth is managed by progressively tinting surfaces (increasing relative lightness in dark mode, decreasing in light mode) and applying composed layered shadows:

Elevation Relative Lightness (Tint) Shadow Presets Use Cases
lowest 14% (canvas background) None Page background
low 7% --shadow Cards, input fields
base 3% --shadow-lg Raised panels, popovers
high 7% --shadow-xl Drawers, overlay menus
highest 14% --shadow-xl Modals, toast notifications

Are you absolutely sure?

This action cannot be undone.