Guides

Theming & color

One seed color generates a complete Material 3 scheme for light and dark, with nine variants and adjustable contrast. Motion comes from the expressive or standard spring scheme.

Theme Lab: one seed color generates every roleTheme Lab: one seed color generates every role

From a seed color

SwiftUI
ContentView().m3eTheme(seed: 0x006A6A, variant: .expressive, contrast: 0)

Variants: tonalSpot (default, calm), expressive (hue-shifted, playful), vibrant (saturated), fidelity and content (close to the seed), neutral, monochrome, rainbow, fruitSalad. Contrast runs from -1 to 1; 0.5 and 1 give the medium and high contrast schemes for accessibility settings.

Color roles

Always put text and icons in the “on” role of the surface they sit on. Those pairs are designed for contrast.

primary

onPrimary

primaryContainer

onPrimaryContainer

secondaryContainer

onSecondaryContainer

tertiaryContainer

onTertiaryContainer

Brand colors & fonts

SwiftUI
let brand = M3ETheme(
  colors: M3EColorScheme([.primary: Color(m3eHex: 0x006A6A), .onPrimary: .white]),
  typography: .baseline(brandFontFamily: "Fraunces"),
  motion: .expressive
)
ContentView().m3eTheme(brand)

Motion

SpringExpressive (ζ, k)Standard (ζ, k)Used for
Fast spatial0.6, 8000.9, 1400Press morphs, toggles, small moves
Default spatial0.8, 3800.9, 700Shape morphs, layout changes
Slow spatial0.8, 2000.9, 300Large moves
Effects1, 3800 / 1600 / 800sameColor and opacity

Use standard for utilitarian apps (finance, productivity) and expressive for consumer apps.

Rules of thumb

  • Pick one seed (your brand color); let the scheme do the rest.
  • Never hard-code hex values inside screens; use roles so dark mode and contrast settings just work.
  • Use containers for emphasis (primaryContainer for a hero card), not saturated primary everywhere.
  • Re-theme a section with a nested theme only when it carries its own identity (an album, a category).