PaletteSwatch class final
A color selected from a palette, together with how prominently it appeared in the source image.
Mirrors the Palette.Swatch concept from the original
palette_generator package: color plus population (the number of
pixels the color represented after quantization).
Constructors
- PaletteSwatch({required int argb, required int population})
-
const
Properties
- argb → int
-
The quantized color, as an ARGB 32-bit integer.
final
- color → Color
-
The color as a Flutter Color.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hct → Hct
-
The color as an Hct value, giving access to hue, chroma and tone.
no setter
- population → int
-
Number of source pixels represented by this color after quantization.
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override