Playground

Adjust the dynamic color coefficients to see how they affect the examples. Open the controls in the drawer and see the changes in the preview.

Coefficient controls

Background state: hover
Tunes how far the hover background moves in lightness in OKLCH (0 = almost none, 1 = strongest). Together with the lightness midpoint, light surfaces darken and dark surfaces lighten toward a middle tone.
0.3
Number 0–1. Lightness change; higher = stronger darken/lighten effect.
Controls how strongly saturation changes for the hover color relative to the background. Higher values make the chroma term in the OKLCH formula more pronounced (more vivid or muted shifts, depending on background lightness).
4
Scale 0–10. Chroma change; higher = more saturation change.
Background state: active
Same idea as hover, but for the pressed/active state: how far the background lightness shifts in OKLCH when the user activates the control.
0.45
Number 0–1. Lightness change; higher = stronger darken/lighten effect.
Chroma scaling for the active (pressed) background—higher values amplify saturation changes in the dynamic color formula.
4
Scale 0–10. Chroma change; higher = more saturation change.
Background: selected
Lightness shift for the selected state (e.g. current nav item). Uses the same OKLCH dynamic-color pipeline as hover/active.
0.3
Number 0–1. Lightness change; higher = stronger darken/lighten effect.
Chroma scaling for the selected background color—adjusts how saturated the derived color looks versus the base background.
4
Scale 0–10. Chroma change; higher = more saturation change.
Border
How much the dynamic border color shifts in lightness compared to the element's background. Higher values make the border contrast more strongly in lightness.
0.75
Number 0–1. Lightness change; higher = stronger darken/lighten effect.
Scales how saturation evolves for the dynamic border as the background changes—useful for fine-tuning colorful vs neutral borders on tinted surfaces.
2
Scale 0–10. Chroma change; higher = more saturation change.
Common Formula (advanced)
Global threshold (0–1) in the OKLCH formula: colors lighter than this are treated one way and darker colors the other when computing the lightness shift. Raising it makes more of the palette behave like "dark" backgrounds for the purpose of the effect.
0.8
Number 0–1. Light/dark threshold; higher = lighter treated as dark.
Second threshold for the chroma part of the formula: it sets where the curve is neutral vs stronger. Lower values push more saturation change for colors you treat as dark in that part of the math.
0.5
Number 0–1. Chroma threshold; lower = more saturation for dark colors.
Hard cap on chroma in the generated OKLCH color (up to 0.4). Increase it to allow punchier, more saturated results on dark-ish backgrounds; decrease for safer, flatter colors.
0.2
Number 0–0.4. Higher = more saturation for dark.

Border

On Basic Background Colors

Border on primary background
Border on secondary background
Border on tertiary background
Border on neutral-basic background
Border on neutral-subtle background

On Emotion Colors

Border on emotion-success-basic
Border on emotion-success-subtle
Border on emotion-informative-basic
Border on emotion-informative-subtle
Border on emotion-warning-basic
Border on emotion-warning-subtle
Border on emotion-danger-basic
Border on emotion-danger-subtle

On Accent Colors

Border on accent-01-basic
Border on accent-01-subtle
Border on accent-02-basic
Border on accent-02-subtle

Interactive Background

On Basic Background Colors

On Emotion Colors

On Accent Colors

Border and Interactive Background

On Basic Background Colors

On Emotion Colors

On Accent Colors