ColorPaletteBase<I, O extends ColorModel> class Null safety

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

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
Returns 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>
Returns 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
Returns 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 non-existent 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
Returns the single element that satisfies test.
override
skip(int count) Iterable<I>
Returns an Iterable that provides all but the first count elements.
override
skipWhile(bool test(I)) Iterable<I>
Returns 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>
Returns a lazy iterable of the count first elements of this iterable.
override
takeWhile(bool test(I)) Iterable<I>
Returns 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>
Returns a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<T>() Iterable<T>
Returns 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