ColorGeneratorFromBasicPalette class
Generates color palettes of different sizes using basic colors.
- Inheritance
-
- Object
- ColorGenerator
- ColorGeneratorFromBasicPalette
Constructors
- ColorGeneratorFromBasicPalette(ColorPalette _basicPalette)
- ColorGeneratorFromBasicPalette.from(dynamic basicColors)
-
Constructor that accepts a list of colors of a ColorPalette instance.
factory
Properties
- basicPalette → ColorPalette
-
The basic palette to generate other palettes of bigger sizes.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildColors<
C> (List< C> keys) → Map<C, String> -
Builds a Map with a color for each provided key from parameter
keys
.inherited -
buildDisabledColors<
C> (List< C> keys) → Map<C, String> -
Builds a Map with a disabled color for each provided key from parameter
keys
.inherited -
clearCache(
) → void - Clears the palette cache.
-
generateColor(
String name, int index, int total) → String -
Generates a specific color for
index
of palette fo sizetotal
.override -
generateDisabledColor(
String name, int index, int total) → String -
Same as generateColor, but for disabled color (grey scale).
override
-
generatePalette(
int size) → List< HTMLColor> -
Generates a List<HTMLColor> of
size
. See getCachedPalette. -
generatePaletteAsColorPalette(
int size) → ColorPalette -
generatePaletteAsString(
int size) → List< String> -
getCachedPalette(
int size) → List< HTMLColor> -
Generates a List<HTMLColor> of
size
and cache it. -
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