Theme Tokens

Complete reference for all DuskMoonUI color tokens and design tokens

Theme Tokens

Complete reference for all CSS custom properties (design tokens) available in @duskmoon-dev/core themes.

Overview

Each theme defines 65+ color tokens plus shape and depth tokens. All color tokens use the OKLCH format for perceptually uniform color manipulation.

/* Tokens are CSS custom properties on [data-theme] selectors */
[data-theme="sunshine"] {
  --color-primary: oklch(95.86% 0.0693 95.91);
  /* ... */
}

Brand Colors (12 tokens)

TokenCSS VariableDescription
Primary--color-primaryMain brand color
Primary Content--color-primary-contentText on primary
Primary Container--color-primary-containerLighter primary for backgrounds
On Primary Container--color-on-primary-containerText on primary container
Secondary--color-secondarySecondary brand color
Secondary Content--color-secondary-contentText on secondary
Secondary Container--color-secondary-containerLighter secondary for backgrounds
On Secondary Container--color-on-secondary-containerText on secondary container
Tertiary--color-tertiaryTertiary accent color
Tertiary Content--color-tertiary-contentText on tertiary
Tertiary Container--color-tertiary-containerLighter tertiary for backgrounds
On Tertiary Container--color-on-tertiary-containerText on tertiary container

Usage

<div class="bg-primary text-primary-content">Primary surface</div>
<div class="bg-primary-container text-on-primary-container">Container</div>

Surface Colors (10 tokens)

TokenCSS VariableDescription
Surface--color-surfaceDefault background
Surface Dim--color-surface-dimDimmed background
Surface Bright--color-surface-brightBrighter background
Surface Container Lowest--color-surface-container-lowestLowest elevation
Surface Container Low--color-surface-container-lowLow elevation
Surface Container--color-surface-containerDefault elevation
Surface Container High--color-surface-container-highHigh elevation
Surface Container Highest--color-surface-container-highestHighest elevation
On Surface--color-on-surfaceText on surface
On Surface Variant--color-on-surface-variantSecondary text on surface

MD3 Elevation Mapping

Lowest → Low → Default → High → Highest
  (0)    (1)    (2)      (3)     (4)

Semantic Colors (16 tokens)

TokenCSS VariableDescription
Info--color-infoInformational state
Info Content--color-info-contentText on info
Info Container--color-info-containerInfo background
On Info Container--color-on-info-containerText on info container
Success--color-successSuccess state
Success Content--color-success-contentText on success
Success Container--color-success-containerSuccess background
On Success Container--color-on-success-containerText on success container
Warning--color-warningWarning state
Warning Content--color-warning-contentText on warning
Warning Container--color-warning-containerWarning background
On Warning Container--color-on-warning-containerText on warning container
Error--color-errorError state
Error Content--color-error-contentText on error
Error Container--color-error-containerError background
On Error Container--color-on-error-containerText on error container

Neutral Colors (10 tokens)

TokenCSS VariableDescription
Base 100--color-base-100Lightest neutral
Base 200--color-base-200Light neutral
Base 300-900--color-base-{N}Neutral scale
Base Content--color-base-contentDefault text color

Outline Colors (2 tokens)

TokenCSS VariableDescription
Outline--color-outlineDefault border color
Outline Variant--color-outline-variantSubtle border color

Accent & Neutral (5 tokens)

TokenCSS VariableDescription
Accent--color-accentAccent highlight
Accent Content--color-accent-contentText on accent
Neutral--color-neutralNeutral base
Neutral Content--color-neutral-contentText on neutral
Neutral Variant--color-neutral-variantMuted neutral

Inverse Colors (3 tokens)

TokenCSS VariableDescription
Inverse Surface--color-inverse-surfaceReversed surface
Inverse On Surface--color-inverse-on-surfaceText on inverse surface
Inverse Primary--color-inverse-primaryPrimary for inverse contexts

Shadow & Scrim (2 tokens)

TokenCSS VariableDescription
Shadow--color-shadowShadow color
Scrim--color-scrimOverlay backdrop

Shape & Depth Tokens

TokenCSS VariableDefaultDescription
Radius Selector--radius-selector0remToggle/selector radius
Radius Field--radius-field0.5remInput/field radius
Radius Box--radius-box2remCard/container radius
Size Selector--size-selector0.1875remSelector border width
Size Field--size-field0.1875remField border width
Border--border0.5pxDefault border width
Depth--depth1Shadow intensity multiplier
Noise--noise1Texture noise level

Focus States

Focus tokens were removed in v2.0. Use color-mix() instead:

.custom-focus:focus {
  background-color: color-mix(in oklch, var(--color-primary), black 10%);
}

Transparency

.custom-transparent {
  background-color: color-mix(in oklch, var(--color-primary) 50%, transparent);
}

Available Themes

ThemeModePrimary HueCharacter
sunshineLightWarm orangeEnergetic, warm
moonlightDarkSoft blueSerene, elegant
oceanDarkDeep cyanCalming, deep
forestLightForest greenNatural, earthy
sunsetLightBurnt orangeWarm, vibrant

Custom Themes

Override any token with a [data-theme] selector:

[data-theme="my-theme"] {
  color-scheme: light;
  --color-primary: oklch(55% 0.20 260);
  --color-primary-content: oklch(100% 0 0);
  /* ... define all tokens */
}

See Customization for full details.