ColorSchemeTokens

data class ColorSchemeTokens(val primary: ColorToken, val onPrimary: ColorToken, val surface: ColorToken, val onSurface: ColorToken, val surfaceVariant: ColorToken, val outline: ColorToken, val success: ColorToken, val warning: ColorToken, val error: ColorToken, val secondary: ColorToken? = null, val onSecondary: ColorToken? = null, val tertiary: ColorToken? = null, val onTertiary: ColorToken? = null, val onSurfaceVariant: ColorToken? = null, val outlineVariant: ColorToken? = null, val onSuccess: ColorToken? = null, val onWarning: ColorToken? = null, val onError: ColorToken? = null)

Semantic roles shared by light and dark product themes.

The nine core roles are required. The optional roles default to null, which tells a renderer to derive that role from the core ones (KMPComponents' Material 3 adapter blends them, for example). Set an optional role when a brand needs an exact value instead of the derived one.

Constructors

Link copied to clipboard
constructor(primary: ColorToken, onPrimary: ColorToken, surface: ColorToken, onSurface: ColorToken, surfaceVariant: ColorToken, outline: ColorToken, success: ColorToken, warning: ColorToken, error: ColorToken, secondary: ColorToken? = null, onSecondary: ColorToken? = null, tertiary: ColorToken? = null, onTertiary: ColorToken? = null, onSurfaceVariant: ColorToken? = null, outlineVariant: ColorToken? = null, onSuccess: ColorToken? = null, onWarning: ColorToken? = null, onError: ColorToken? = null)
constructor(primary: ColorToken, onPrimary: ColorToken, surface: ColorToken, onSurface: ColorToken, surfaceVariant: ColorToken, outline: ColorToken, success: ColorToken, warning: ColorToken, error: ColorToken)

The nine-role constructor that predates the optional roles, kept for binary compatibility.

Properties

Link copied to clipboard
Link copied to clipboard

content on an error fill.

Link copied to clipboard
Link copied to clipboard

content on secondary; derived from onPrimary when null.

Link copied to clipboard

content on a success fill.

Link copied to clipboard
Link copied to clipboard

secondary text and icons on surfaceVariant.

Link copied to clipboard

content on tertiary; derived from onPrimary when null.

Link copied to clipboard

content on a warning fill.

Link copied to clipboard
Link copied to clipboard

decorative dividers and the borders of outlined controls.

Link copied to clipboard
Link copied to clipboard

accent for less prominent components; derived from primary when null.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

contrasting accent; derived from primary when null.

Link copied to clipboard