theming-material / Class

SchemeBuilder

Implementation of ThemeBuilder that generates hex color tokens for all Material Design color roles.

Notes

Examples of generated tokens include "surface", "on-surface", "surface-container", "on-surface-container", "primary", "on-primary", etc.

A non-empty name must be assigned to this builder. The name assigned to this builder will be used as the prefix to the generated tokens. When the name is "scheme", the generated tokens will be "scheme-primary", "scheme-on-primary", etc.

See Also

Properties

NameTypeDescription
hctFormatter
p
HctFormatter

Methods

build()

implements ThemeBuilder

No documentation has been provided.

Presentation
Parameters
NameTypeDescription
context
ThemeBuilderContext<SchemeBuilderConfig>
Returns
protected

getScheme()

No documentation has been provided.

Presentation
protected getScheme(config: SchemeBuilderConfig): DynamicScheme;
Parameters
NameTypeDescription
config
SchemeBuilderConfig
Returns
DynamicScheme

Example usage

provideTheme(
  withThemeBuilder("scheme", SchemeBuilder, {
    type: SchemeTonalSpot,
    source: Hct.fromInt(0x33bdff),
    mode: SchemeMode.Light,
    contrast: SchemeContrastLevel.Standard,
  }),
),