toDynamicScheme
fun Color.toDynamicScheme(isDark: Boolean, style: PaletteStyle, contrastLevel: Double = Contrast.Default.value, specVersion: ColorSpec.SpecVersion = ColorSpec.SpecVersion.Default, platform: DynamicScheme.Platform = DynamicScheme.Platform.Default): DynamicScheme
Generate a DynamicScheme based on the given Color.
When style is PaletteStyle.Cmf, the scheme is built for ColorSpec.SpecVersion.SPEC_2026 because CMF is defined only for the 2026 spec, so the specVersion you pass is not used.
Return
The generated DynamicScheme.
Parameters
isDark
Whether the scheme should be dark or light.
style
The style of the scheme, see PaletteStyle.
contrastLevel
The contrast level of the scheme.
specVersion
The version of the spec to use. Not used when style is PaletteStyle.Cmf.
platform
The platform to use.