Cmf

class Cmf(val tertiarySeedColor: Color? = null) : PaletteStyle

A theme using the 2026 spec's CMF (Color, Material, Finish) variant, which accepts two seed colors.

tertiarySeedColor becomes the second entry of the scheme's sourceColorHctList, while the primary seed stays the seedColor passed to the theme or to toDynamicScheme.

The engine reads that second seed only for the tertiary palette's hue and chroma, the tertiary container tone, and the error hue. Primary, secondary, neutral and neutral variant palettes always come from the first seed, which is why the parameter is named for what it changes rather than for its position. Leave it null, or pass the primary seed again, and the tertiary palette falls back to the primary seed at reduced chroma.

Cmf always produces a SPEC_2026 scheme, so a requested specVersion is ignored.

Parameters

tertiarySeedColor

An optional second seed color, used for the tertiary palette and the error hue.

Constructors

Link copied to clipboard
constructor(tertiarySeedColor: Color? = null)

Properties

Link copied to clipboard
open val name: String

Stable identifier for the style, matching the entry names the old enum had. Cmf is always "Cmf" no matter which seed it carries, so use toString() when the seed must survive.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String

"Cmf" on its own when there is no tertiarySeedColor, otherwise Cmf:AARRGGBB.