ColorPaletteBase<I, O extends ColorModel> class abstract

The base class for ColorPalettes.

Implemented types
Implementers
Available Extensions

Constructors

ColorPaletteBase(List<O> colors)
const

Properties

blue → O
Returns the color with the most bluest hue. (240°)
no setter
blueViolet → O
Returns the color with the most blue-violet hue. (270°)
no setter
brightest → O
Returns the color with the highest perceived brightness value.
no setter
colors List<O>
The colors contained in the palette.
final
cyan → O
Returns the color with the most cyan hue. (210°)
no setter
darkest → O
Returns the color with the lowest lightness value.
no setter
deepest → O
Returns the color with the highest saturation value.
no setter
dimmest → O
Returns the color with the lowest perceived brightness value.
no setter
dullest → O
Returns the color with the lowest saturation value.
no setter
first ↔ I
The first element.
getter/setter pairinherited-setteroverride-getter
green → O
Returns the color with the greenest hue. (180°)
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iterator Iterator<I>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last ↔ I
The last element.
getter/setter pairinherited-setteroverride-getter
leastIntense → O
Returns the color with the lowest intensity value.
no setter
length int
The number of colors in the palette.
getter/setter pairoverride
lightest → O
Returns the color with the highest lightness value.
no setter
magenta → O
Returns the color with the most magenta hue. (330°)
no setter
mostIntense → O
Returns the color with the highest intensity value.
no setter
muted → O
Returns the color with the lowest combined saturation and brightness values.
no setter
orange → O
Returns the color with the orangest hue. (60°)
no setter
red → O
Returns the color with the reddest hue. (0°)
no setter
redOrange → O
Returns the color with the most red-orange hue. (30°)
no setter
reversed Iterable<I>
An Iterable of the objects in this list in reverse order.
no setteroverride
richest → O
Returns the color with the highest combined saturation and brightness values.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single → I
Checks that this iterable has only one element, and returns that element.
no setteroverride
violet → O
Returns the color with the most violet hue. (300°)
no setter
yellow → O
Returns the color with the yellowest hue. (120°)
no setter
yellowGreen → O
Returns the color with the most yellow-green hue. (150°)
no setter
yellowOrange → O
Returns the color with the most yellow-orange hue. (90°)
no setter

Methods

add(I value) → void
Adds value to the end of this list, extending the length by one.
inherited
addAll(Iterable<I> iterable) → void
Appends all objects of iterable to the end of this list.
inherited
any(bool test(I)) bool
Checks whether any element of this iterable satisfies test.
override
asMap() Map<int, I>
An unmodifiable Map view of this list.
override
cast<R>() List<R>
Returns a view of this list as a list of R instances.
override
clear() → void
Removes all objects from this list; the length of the list becomes zero.
override
closest(I color) → I
Returns the color with the values closest to color.
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
cooler(num amount, {bool relative = true}) → void
Adjusts the hue of every color in the palette to be cooler by amount, capping the value at 270 degrees.
elementAt(int index) → I
Returns the indexth element.
override
every(bool test(I)) bool
Checks whether every element of this iterable satisfies test.
override
expand<T>(Iterable<T> f(I)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
override
fillRange(int start, int end, [I? fillValue]) → void
Overwrites a range of elements with fillValue.
inherited
firstWhere(bool test(I), {I orElse()?}) → I
The first element that satisfies the given predicate test.
override
fold<T>(T initialValue, T combine(T, I)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
override
followedBy(Iterable<I> other) Iterable<I>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void f(I)) → void
Invokes action on each element of this iterable in iteration order.
override
furthest(I color) → I
Returns the color with the values furthest from color.
getRange(int start, int end) Iterable<I>
Creates an Iterable that iterates over a range of elements.
override
indexOf(I element, [int start = 0]) int
The first index of element in this list.
inherited
indexWhere(bool test(I), [int start = 0]) int
The first index in the list that satisfies the provided test.
override
insert(int index, I element) → void
Inserts element at position index in this list.
inherited
insertAll(int index, Iterable<I> iterable) → void
Inserts all objects of iterable at position index in this list.
inherited
invert() → void
Inverts the values of every color in the palette in their respective color spaces.
join([String separator = '']) String
Converts each element to a String and concatenates the strings.
override
lastIndexOf(I color, [int? start]) int
The last index of element in this list.
override
lastIndexWhere(bool test(I), [int? start]) int
The last index in the list that satisfies the provided test.
override
lastWhere(bool test(I), {I orElse()?}) → I
The last element that satisfies the given predicate test.
override
map<T>(T f(I)) Iterable<T>
The current elements of this iterable modified by toElement.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
opposite() → void
Rotates the hue of every color in the palette by 180 degrees.
reduce(I combine(I, I)) → I
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
override
remove(Object? color) bool
Removes the first occurrence of value from this list.
override
removeAt(int index) → I
Removes the object at position index from this list.
override
removeLast() → I
Removes and returns the last object in this list.
override
removeRange(int start, int end) → void
Removes a range of elements from the list.
override
removeWhere(bool test(I)) → void
Removes all objects from this list that satisfy test.
override
replaceRange(int start, int end, Iterable<I> replacements) → void
Replaces a range of elements with the elements of replacements.
inherited
retainWhere(bool test(I)) → void
Removes all objects from this list that fail to satisfy test.
override
reverse() → void
Reverses the order of the colors in the palette.
rotateHue(num amount) → void
Rotates the hue of every color in the palette by amount.
setAll(int index, Iterable<I> iterable) → void
Overwrites elements with the objects of iterable.
inherited
setRange(int start, int end, Iterable<I> iterable, [int skipCount = 0]) → void
Writes some elements of iterable into a range of this list.
inherited
shuffle([Random? random]) → void
Shuffles the elements of this list randomly.
override
singleWhere(bool test(I), {I orElse()?}) → I
The single element that satisfies test.
override
skip(int count) Iterable<I>
Creates an Iterable that provides all but the first count elements.
override
skipWhile(bool test(I)) Iterable<I>
Creates an Iterable that skips leading elements while test is satisfied.
override
sort([int compare(I, I)?]) → void
Sorts this list according to the order specified by the compare function.
override
sortBy(ColorSortingProperty property) → void
Sorts the palette by property.
sortByHue({num startingFrom = 0, bool clockwise = true}) → void
Sorts the palette by each colors hue.
sublist(int start, [int? end]) List<I>
Returns a new list containing the elements between start and end.
override
take(int count) Iterable<I>
Creates a lazy iterable of the count first elements of this iterable.
override
takeWhile(bool test(I)) Iterable<I>
Creates a lazy iterable of the leading elements satisfying test.
override
toColorSpace(ColorSpace colorSpace) → void
Converts all colors into the ColorModel represented by colorSpace.
toList({bool growable = true}) List<I>
Creates a List containing the elements of this Iterable.
override
toSet() Set<I>
Creates a Set containing the same elements as this iterable.
override
toString() String
A string representation of this object.
override
warmer(num amount, {bool relative = true}) → void
Adjusts the hue of every color in the palette to be warmer by amount, capping the value at 90 degrees.
where(bool test(I)) Iterable<I>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
override

Operators

operator +(List<I> other) List<I>
Returns the concatenation of this list and other.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → I
The object at the given index in the list.
override
operator []=(int index, I value) → void
Sets the value at the given index in the list to value.
inherited