ColorRgb8 class

Inheritance
Available Extensions

Constructors

ColorRgb8(int r, int g, int b)
ColorRgb8.from(ColorUint8 other)

Properties

a num
Alpha channel.
getter/setter pairinherited
aNormalized num
Normalized [0, 1] alpha.
getter/setter pairinherited
b num
Blue channel.
getter/setter pairinherited
bNormalized num
Normalized [0, 1] blue.
getter/setter pairinherited
data Uint8List
finalinherited
first num
The first element.
no setterinherited
format Format
The Format of the color.
no setterinherited
g num
Green channel.
getter/setter pairinherited
gNormalized num
Normalized [0, 1] green.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hasPalette bool
True if the color uses a palette.
no setterinherited
index num
Palette index value (or red channel if there is no palette).
getter/setter pairinherited
isEmpty bool
Whether this collection has no elements.
no setterinherited
isHdrFormat bool
True if the format is high dynamic range.
no setterinherited
isLdrFormat bool
True if the format is low dynamic range.
no setterinherited
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
iterator ChannelIterator
A new Iterator that allows iterating the elements of this Iterable.
no setterinherited
last num
The last element.
no setterinherited
length int
The number of elements in this.
no setterinherited
luminance num
The luminance (grayscale) of the color.
no setterinherited
luminanceNormalized num
no setterinherited
maxChannelValue num
The maximum value for a color channel.
no setterinherited
maxIndexValue num
The maximum value for a palette index.
no setterinherited
palette Palette?
The palette used by the color, or null.
no setterinherited
r num
Red channel.
getter/setter pairinherited
rNormalized num
Normalized [0, 1] red.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single num
Checks that this iterable has only one element, and returns that element.
no setterinherited

Methods

any(bool test(num element)) bool
Checks whether any element of this iterable satisfies test.
inherited
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
clone() ColorUint8
Returns a copy of the color.
inherited
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
convert({Format? format, int? numChannels, num? alpha}) Color
Convert the format and/or the numChannels of the color. If numChannels is 4 and the current color does not have an alpha value, then alpha can specify what value to use for the new alpha channel. If alpha is not given, then maxChannelValue will be used.
inherited
elementAt(int index) num
Returns the indexth element.
inherited
every(bool test(num element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(num element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(num element), {num orElse()?}) num
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, num element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<num> other) Iterable<num>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(num element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
getChannel(Channel channel) num
Get a channel from the color. If the channel isn't available, 0 will be returned.
inherited
getChannelNormalized(Channel channel) num
Get the normalized [0, 1] value of a channel from the color. If the channel isn't available, 0 will be returned.
inherited
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(num element), {num orElse()?}) num
The last element that satisfies the given predicate test.
inherited
map<T>(T toElement(num e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(num combine(num value, num element)) num
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
set(Color c) → void
The the values of this color to the given color.
inherited
setRgb(num r, num g, num b) → void
Set the individual r, g, b channels of the color.
inherited
setRgba(num r, num g, num b, num a) → void
Set the individual r, g, b, a channels of the color.
inherited
singleWhere(bool test(num element), {num orElse()?}) num
The single element that satisfies test.
inherited
skip(int count) Iterable<num>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(num value)) Iterable<num>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) Iterable<num>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(num value)) Iterable<num>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<num>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<num>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
Returns a string representation of (some of) the elements of this.
inherited
where(bool test(num element)) Iterable<num>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) num
Gets a channel from the color by its index.
inherited
operator []=(int index, num value) → void
inherited