Color

Material Design 3 uses a dynamic color system. Colors are derived from a source color and organized into tonal palettes.

Color roles

M3 assigns colors to roles: primary, secondary, tertiary, error, surface, and their on-color counterparts. Each role has a semantic purpose.

Primary
On Primary
Primary Container
On Primary Container
Secondary
On Secondary
Secondary Container
On Secondary Container
Tertiary
On Tertiary
Tertiary Container
On Tertiary Container
Surface
Surface Container
Surface Container Highest
Surface Variant

Primary (Cobalt Blue)

0
10
20
30
40
50
60
70
80
90
95
100

Secondary (Purple)

0
10
20
30
40
50
60
70
80
90
95
100

Tertiary (Rose)

0
10
20
30
40
50
60
70
80
90
95
100

Neutral

0
10
20
30
40
50
60
70
80
90
95
100

System color tokens

These tokens map tonal palette values to semantic roles used by components.

Token Light Dark
primary Primary 40 Primary 80
on-primary Primary 100 Primary 20
primary-container Primary 90 Primary 30
secondary Secondary 40 Secondary 80
surface Neutral 98 Neutral 6
surface-container Neutral 94 Neutral 12
surface-container-high Neutral 92 Neutral 17
on-surface Neutral 10 Neutral 90
outline Neutral Variant 50 Neutral Variant 60
outline-variant Neutral Variant 80 Neutral Variant 30

Using color tokens

Reference system color tokens through CSS custom properties:

.my-button { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-radius: var(--md-sys-shape-corner-full); }

Custom themes

Override the reference palette variables to create custom themes:

:root { --md-ref-palette-primary40: #6750a4; --md-ref-palette-primary80: #d0bcff; /* ... all other palette values */ }
Press Esc to close