Skip to main content brightness_auto motion_photos_off palette download more_vert
toc

Dynamic color

Dynamic color builds a full color scheme, light and dark, from a seed color.

Dynamic color turns one source color into every color role, in light and dark. Pick a source and a variant, and apply the result to the document or to one element.

HTMLJS
<md-gb-button color="filled">Save</md-gb-button>

The variant decides how the palettes are derived from the source: tonal-spot (the default), neutral, vibrant, expressive, fidelity, content, monochrome, rainbow and fruit-salad.

Each scheme has standard, medium and high contrast. Set contrast on applyTheme(), or select a level for a subtree of the static tokens with a class.

Standard
High
<div class="md-contrast-standard">
  <md-gb-button color="tonal">Standard</md-gb-button>
</div>
<div class="md-contrast-high">
  <md-gb-button color="tonal">High</md-gb-button>
</div>

See Color for roles, custom colors and the full options.

Install Material Web 3.0

Your browser did not offer to install the docs as an app. Install them from the browser instead:

Close
Send feedback
Bug Documentation Idea

Opens a new GitHub issue for material-components/material-web in a new tab, with this filled in.

Cancel Open issue