Color class

An ARGB color convertible to CSS.

const color = Color(0xffff0000);

Constructors

Color(int value)
Creates a color from a packed ARGB integer.
const
Color.fromARGB(int a, int r, int g, int b)
Creates a color from separate alpha, red, green, and blue channels.
const
Color.fromRGBO(int r, int g, int b, double opacity)
Creates a color from RGB channels and opacity from zero to one.

Properties

css → String
CSS hex for opaque colors and rgba(...) for translucent colors.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → int
The packed ARGB value.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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