Color class

An RGB based color object. The toString method returns a CSS-compatible color value.

Implementers

Constructors

Color(num red, num green, num blue, [num alpha = 1])
Construct a Color object with given RGB and alpha (i.e., opacity) values. *
const

Properties

alpha num
The opacity of color.
final
blue num
The blue component.
final
green num
The green component.
final
hashCode int
The hash code for this object.
no setteroverride
red num
The red component.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

hsl() HslColor
Convert to HslColor
hsv() HsvColor
Convert to HsvColor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object o) bool
The equality operator.
override

Static Methods

parse(String colorCode) Color
Parses the color code as a Color literal and returns its value. Example, *