FlexPaletteType enum

Enum used to select tones included in produced FlexTonalPalette.

When using type FlexPaletteType.common the chroma of high tones, >= 90, is limited to maximum 40. This keeps the chromacity of tones 90 to 100, lower than 40. If the source color use more chromacity than 40, there may be a sudden jump in chroma reduction at tone 90. This is the standard behavior for the original Material 3 tonal palette computation. The FlexPaletteType.common is intended to be used when there is a need to follow strict M3's original palette design.

When using the FlexPaletteType.extended type tones, there are not only the new tones, but the chroma limit of tones >= 90 is also removed. This increases fidelity of higher tone when high chromacity is used.

Starting from Flutter 3.22 and FlexSeedScheme 2.0.0 the common tones should be avoided and extended tones used instead. The common tones are kept for backwards compatibility and for cases where the original M3 palette is needed. The FlexPaletteType.extended is the new default for all FlexTones.

Inheritance
Available extensions

Values

common → const FlexPaletteType

Common tones consisting of the 15 tones originally used in FlexSeedScheme.

Original Material 3 color system included only 13 tones 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100. These are still used as common tone in Material Color Utilities (MCU) package TonalPalette class.

FlexSeedScheme includes tones 5 and 98 in addition to these tones in its definition of common tones.

Starting from Flutter 3.22 and FlexSeedScheme 2.0.0 the common tones should be avoided and extended tones used instead. The common tones are kept for backwards compatibility and for cases where the original M3 palette is needed. The FlexPaletteType.extended is the new default for all FlexTones.

extended → const FlexPaletteType

Extended tones used in Material 3 revision for additional fidelity in surface colors. These were added during 1st half of 2023 to the Material 3 color system specification.

The added tones 2, 4, 6, 12, 17, 22, 24 are for new dark mode surfaces in revised Material 3 dark surface colors. Likewise added tones 98, 97, 96, 94, 92, 87 are for light mode surfaces in the updated Material-3 color system. For more information, see: https://m3.material.io/styles/color/the-color-system/color-roles

Starting from Flutter 3.22 and FlexSeedScheme 2.0.0 the common tones should be avoided and extended tones used instead. The common tones are kept for backwards compatibility and for cases where the original M3 palette is needed. The FlexPaletteType.extended is the new default for all FlexTones.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<FlexPaletteType>
A constant List of the values in this enum, in order of their declaration.