CssColor class sealed
CSS color value type.
- Implemented types
Constructors
- CssColor.global(CssGlobal global)
-
Global keyword (inherit, initial, unset, revert).
factory
- CssColor.hex(String hex)
-
Hexadecimal color (#RGB, #RRGGBB, #RGBA, #RRGGBBAA).
factory
- CssColor.hsl(int h, int s, int l)
-
HSL color (hue: 0-360, saturation: 0-100, lightness: 0-100).
factory
- CssColor.hsla(int h, int s, int l, double a)
-
HSLA color with alpha (0.0-1.0).
factory
- CssColor.named(String name)
-
Named CSS color.
factory
- CssColor.raw(String value)
-
Raw CSS value escape hatch.
factory
- CssColor.rgb(int r, int g, int b)
-
RGB color (0-255 for each channel).
factory
- CssColor.rgba(int r, int g, int b, double a)
-
RGBA color with alpha (0.0-1.0).
factory
- CssColor.variable(String varName)
-
CSS variable reference.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCss(
) → String -
Converts this value to its CSS string representation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- black → const CssColor
- blue → const CssColor
- currentColor → const CssColor
- cyan → const CssColor
- gray → const CssColor
- green → const CssColor
- grey → const CssColor
- magenta → const CssColor
- orange → const CssColor
- pink → const CssColor
- purple → const CssColor
- red → const CssColor
- transparent → const CssColor
- white → const CssColor
- yellow → const CssColor