$Color class

dart_eval wrapper for Color

Implemented types

Constructors

$Color.wrap(Color $value)

Properties

$reified Color
Fully reify the underlying value so it can be used in a Dart context. For example, recursively transform collections into their underlying $values.
no setter
$value Color
The backing Dart value of this $Value.
final
a double
The alpha channel of this color.
no setteroverride
alpha int
The alpha channel of this color in an 8 bit value.
no setteroverride
b double
The blue channel of this color.
no setteroverride
blue int
The blue channel of this color in an 8 bit value.
no setteroverride
colorSpace ColorSpace
The color space of this color.
no setteroverride
g double
The green channel of this color.
no setteroverride
green int
The green channel of this color in an 8 bit value.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
opacity double
The alpha channel of this color as a double.
no setteroverride
r double
The red channel of this color.
no setteroverride
red int
The red channel of this color in an 8 bit value.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
A 32 bit value representing this color.
no setteroverride

Methods

$getProperty(Runtime runtime, String identifier) → $Value?
Get a property by identifier on this instance
$getRuntimeType(Runtime runtime) int
Index of the class Type in the runtime dictionary. By definition can change from run to run, so it's customary to use Runtime.lookupType in implementations.
$setProperty(Runtime runtime, String identifier, $Value value) → void
Set a property by identifier on this instance to value
computeLuminance() double
Returns a brightness value between 0 for darkest and 1 for lightest.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toARGB32() int
Returns a 32-bit value representing this color.
override
toString() String
A string representation of this object.
inherited
withAlpha(int a) Color
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
override
withBlue(int b) Color
Returns a new color that matches this color with the blue channel replaced with b (which ranges from 0 to 255).
override
withGreen(int g) Color
Returns a new color that matches this color with the green channel replaced with g (which ranges from 0 to 255).
override
withOpacity(double opacity) Color
Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0).
override
withRed(int r) Color
Returns a new color that matches this color with the red channel replaced with r (which ranges from 0 to 255).
override
withValues({double? alpha, double? red, double? green, double? blue, ColorSpace? colorSpace}) Color
Returns a new color with the provided components updated.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

$new(Runtime runtime, $Value? target, List<$Value?> args) → $Value?
Wrap a Color in an $Color

Constants

$declaration → const BridgeClassDef
dart_eval class declaration for Color
$type → const BridgeTypeRef
dart_eval type definition for Color