Vitepress Theme Akari Docsv1.0.0GitHubSettingsMore

Color ​

All of the theme's colors come from m3e's dynamic color. You only need one seed color: m3e-theme generates the full set of --md-sys-color-* tokens from it. When you switch light and dark mode, contrast or variant, the whole palette updates together.

Dynamic color ​

The seed color sets the relationship between hue and tone, and Material 3's tone mapping computes the actual lightness. So the same seed gives readable colors in both light and dark mode. The demo below generates a local palette from a teal seed:

--md-sys-color-primary
--md-sys-color-primary-container
--md-sys-color-secondary-container
--md-sys-color-tertiary

The site's default seed color is set in settings.defaults.color in the shared config. Readers can change it to a color they like in the settings. Pages with a hero use a color taken from the image; see Hero.

Variants ​

The same seed color can generate a palette in different ways. The default is tonal-spot:

Tonal SpotVibrantFidelityExpressiveMonochromeNeutralRainbowFruit Salad
VariantCharacter
tonal-spotBalanced and low in saturation; suits most documentation sites
vibrantA more saturated primary color, with a stronger brand feel
fidelityStays closer to the seed color itself
expressiveLivelier hue shifts
monochromeDrops any color cast and keeps only levels of lightness
neutralNear-neutral surface colors
rainbowLarger hue differences between roles
fruit-saladThe strongest hue separation; suits demos and creative uses

Light, dark and contrast ​

The same palette, mapped to light and dark:

Light mode

Light surfaces with dark text. Suits daytime use and projection.

Dark mode

Dark surfaces with light text. Suits low light and long reading sessions.

Contrast has three levels: Default, Medium and High. It affects the lightness difference between foreground and background, and the strength of outlines. Light and dark modes have four options; see Settings and appearance.

Usage guidelines ​

  • Don't hard-code colors. Always use --md-sys-color-* tokens or the variables of m3e components.
  • Use container and content colors in pairs: primary with on-primary, surface-container with on-surface.
  • Use surface-container-lowest through surface-container-highest to separate levels. Don't rely on stacked shadows.
  • Use outline-variant for borders and dividers, and outline when they need emphasis. Use error and error-container for error states.
  • When you need a fixed brand color, make it the seed color instead of overriding it component by component.
  • Check custom backgrounds, shadows and translucent scrims separately in dark mode and high contrast.

For all color tokens, see API.

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%