CsColorUtils class abstract final

Color math Cs components need at runtime.

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
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

contrastRatio(Color a, Color b) → double
WCAG 2 contrast ratio between two opaque colors, 1 to 21.
darken(Color color, double amount) → Color
Mixes toward black.
lighten(Color color, double amount) → Color
Mixes toward white.
luminance(Color color) → double
WCAG 2 relative luminance.
mix(Color color, Color other, double amount) → Color
CSS color-mix(in oklch, color, other amount%). Cs uses it for button emphasis gradients: mix(brand, white, 0.3) is the primary button's top.
over(Color top, Color bottom) → Color
Composites a translucent top over an opaque bottom.