keepTertiary property

bool keepTertiary
final

When using useKeyColors, set keepTertiary to true, to keep the resulting ColorScheme.tertiary color as defined by effective FlexColorScheme.tertiary input key color, while still letting all other colors derived from input primary key to be based on colors seeded from it.

This feature is useful if you want to lock the resulting ColorScheme.tertiary to an exact given color value, but still use this color as branding key for all other color values derived from tertiary key color. Typically you would use this when the tertiary color, must match a given established brand color, typically in light theme mode where it can be used since the color is often designed to be printed on white paper.

When you use the tertiary color as input as key based color input for a tonal palette, the TonalPalette and from key based ColorScheme algorithm will typically not not return this exact color as the ColorScheme.tertiary color. Seed colors are used more as a way to "set the tone" for the desired theme, the exact same input color value will seldom become the actual ColorScheme.tertiary color. With keepTertiary set to true you can however enforce that.

Defaults to false.

Implementation

final bool keepTertiary;