TonalPalette class Null safety
A convenience class for retrieving colors that are constant in hue and chroma, but vary in tone.
This class can be instantiated in two ways:
- of From hue and chroma. (preferred)
- fromList From a fixed-size (TonalPalette.commonSize) list of ints representing ARBG colors. Correctness (constant hue and chroma) of the input is not enforced. get will only return the input colors, corresponding to commonTones.
Properties
Methods
-
get(
int tone) → int - Returns the ARGB representation of an HCT color.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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 Properties
- commonSize → int
-
final
Static Methods
-
fromList(
List< int> colors) → TonalPalette - Create colors from a fixed-size list of ARGB color ints.
-
of(
double hue, double chroma) → TonalPalette -
Create colors using
hue
andchroma
.
Constants
-
commonTones
→ const List<
int> -
Commonly-used tone values.
[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100]