Vitepress Theme Akari Docsv1.0.0GitHubSettingsMore

Color: API ​

m3e-theme generates the following tokens according to the Material 3 dynamic color spec (2025 version). Use them in CSS:

css
.panel {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

The tokens only have values inside m3e-theme. The theme copies them to the root element, so you can use them anywhere on the page.

Accent colors ​

TokenUse
--md-sys-color-primary, --md-sys-color-on-primaryThe most important actions and the text on them
--md-sys-color-primary-container, --md-sys-color-on-primary-containerContainers that need to stand out, but less strongly
--md-sys-color-primary-dimA darker primary color
--md-sys-color-inverse-primaryThe primary color on inverse surfaces
--md-sys-color-secondary, --md-sys-color-on-secondarySecondary emphasis
--md-sys-color-secondary-container, --md-sys-color-on-secondary-containerSecondary containers, such as the selected navigation item and floating action buttons
--md-sys-color-secondary-dimA darker secondary color
--md-sys-color-tertiary, --md-sys-color-on-tertiaryEmphasis that contrasts with the primary color
--md-sys-color-tertiary-container, --md-sys-color-on-tertiary-containerTertiary containers
--md-sys-color-tertiary-dimA darker tertiary color

Each accent color also has fixed colors that don't change between light and dark: *-fixed, *-fixed-dim, on-*-fixed and on-*-fixed-variant (where * is primary, secondary or tertiary).

Surfaces ​

TokenUse
--md-sys-color-surface, --md-sys-color-on-surfaceThe default surface and text; the document surface uses surface
--md-sys-color-surface-dim, --md-sys-color-surface-brightThe darkest and brightest surfaces
--md-sys-color-surface-container-lowestThe lowest container
--md-sys-color-surface-container-lowA low container, such as demo areas
--md-sys-color-surface-containerThe default container, such as the hero's text card and table headers
--md-sys-color-surface-container-highA high container
--md-sys-color-surface-container-highestThe highest container
--md-sys-color-on-surface-variantSecondary text, such as captions and table header text
--md-sys-color-surface-variantA secondary surface
--md-sys-color-inverse-surface, --md-sys-color-inverse-on-surfaceInverse surface and text, such as the snackbar
--md-sys-color-background, --md-sys-color-on-backgroundPage background and text
--md-sys-color-surface-tintSurface tint

Outline, error and scrim ​

TokenUse
--md-sys-color-outlineBorders that need emphasis
--md-sys-color-outline-variantDividers and ordinary borders, such as table borders
--md-sys-color-error, --md-sys-color-on-errorErrors
--md-sys-color-error-container, --md-sys-color-on-error-containerError containers
--md-sys-color-error-dimA darker error color
--md-sys-color-shadowShadows
--md-sys-color-scrimThe scrim behind dialogs

Local palettes ​

Wrap content on a page in m3e-theme to generate a separate palette for it. The demos on the Color overview do exactly this:

html
<m3e-theme color="#006A6A" scheme="dark" variant="vibrant" contrast="high">
  <!-- Content -->
</m3e-theme>
AttributeValues
colorThe seed color, as a six-digit hex value
schemelight, dark, auto
variantSee Variants
contraststandard, medium, high
motionstandard, expressive

The settings decide the seed color, variant and contrast for the whole site; see Settings and appearance.

GitHub Settings

Search the docs

Type a page title, a component name or words from the text.

Press ⌘/Ctrl + K to open it anytime

Choose a language

EnglishEnglish (United States)العربيةArabic (Saudi Arabia)FrançaisFrench (France)日本語Japanese (Japan)한국어Korean (South Korea)简体中文Chinese (China)

Settings

Color
VariantTonal SpotVibrantFidelityExpressiveMonochromeNeutralRainbowFruit Salad
ContrastDefaultMediumHigh
MotionStandardExpressive
Text directionFollow languageLeft to rightRight to left
Text size100%150%200%