theming-material / Interface

SchemeBuilderConfig

Configuration for SchemeBuilder.

Properties

NameTypeDescription
contrast
number

The contrast level of the color scheme. See SchemeContrastLevel for common values, or use a number between -1 to 1 for custom values, where -1 is the lowest contrast and 1 is the highest.

mode
SchemeMode

The mode of the color scheme. Light or Dark.

source
Hct

The source/seed color to use for creating the color scheme. The generated color scheme may deviate from this color at some extent, depending on the chrome of the source color and the algorithm used by the SchemeType.

Notes

Hct is the color representation from material-color-utilities, which consists of hue, chroma, and tone.

Example usage
import { Hct, argbFromHex } from '@material/material-color-utilities';
Hct.fromInt(0xc2e7ff)
Hct.fromInt(argbFromHex("#c2e7ff"))
type
SchemeType

The type of color scheme to generate. See SchemeType for details.