FlexTonalPalette class
A convenience class for retrieving colors that are constant in hue and chroma, but vary in tone.
This is a modification of package material_color_utilities TonalPalette made to also include the tones 98 and tone 5. This gives additional fidelity and expression possibilities when using tones close to black and white.
This class can be instantiated in two ways:
- of From hue and chroma. (preferred)
- fromList From a fixed-size FlexTonalPalette.commonSize or FlexTonalPalette.extendedSize list of int representing ARBG colors, depending on if FlexPaletteType.common paletteType FlexPaletteType.extended. Correctness (constant hue and chroma) of the input is not enforced. get will only return the input colors, corresponding to commonTones or extendedTones.
- Annotations
Properties
Methods
-
get(
int tone) → int - Returns the ARGB representation of an HCT color.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromList(
List< int> colors, [FlexPaletteType paletteType = FlexPaletteType.common]) → FlexTonalPalette - Create colors from a fixed-size list of ARGB color ints.
-
of(
double hue, double chroma, [FlexPaletteType paletteType = FlexPaletteType.common]) → FlexTonalPalette -
Create colors using
hue
andchroma
.
Constants
- commonSize → const int
- Number of tones in commonTones.
-
commonTones
→ const List<
int> - Commonly-used tone values in a FlexTonalPalette.
- extendedSize → const int
- Number of tones in extendedTones.
-
extendedTones
→ const List<
int> - Extended one values in a FlexTonalPalette.