IrColor class

sRGB color with components in 0..1.

Constructors

IrColor(double r, double g, double b, [double a = 1])
const
IrColor.fromArgb32(int argb, {String? token})
factory
IrColor.fromHex(String hex, {String? token})
Parses #RRGGBB or #RRGGBBAA.
factory

Properties

a → double
final
b → double
final
g → double
final
hashCode → int
The hash code for this object.
no setteroverride
r → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token → String?
The design token this color was taken from, e.g. ColorScheme/primary. Kept through withAlpha: renderers bind the token and apply the alpha as paint opacity.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArgb32() → int
toHex() → String
toJson() → Object
toString() → String
A string representation of this object.
override
withAlpha(double alpha) → IrColor
withToken(String? token) → IrColor

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(Object? json) → IrColor
A hex string, or {"value": hex, "token": name} for token colors.

Constants

black → const IrColor
transparent → const IrColor
white → const IrColor