RadixColor class

Inheritance

Constructors

RadixColor(int primary, Map<int, Color> swatch)
Radix Colors provides 15 color scales, designed for white foreground text at step 9
const

Properties

alpha int
The alpha channel of this color in an 8 bit value.
no setterinherited
blue int
The blue channel of this color in an 8 bit value.
no setterinherited
green int
The green channel of this color in an 8 bit value.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
opacity double
The alpha channel of this color as a double.
no setterinherited
red int
The red channel of this color in an 8 bit value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
step1 Color
For app backgrounds and subtle component backgrounds.
no setter
step2 Color
For app backgrounds and subtle component backgrounds.
no setter
step3 Color
For UI component backgrounds.
no setter
step4 Color
For UI component backgrounds.
no setter
step5 Color
For UI component backgrounds.
no setter
step6 Color
Step 6 is designed for subtle borders on components which are not interactive. For example sidebars, headers, cards, alerts, and separators.
no setter
step7 Color
Step 7 is designed for borders on interactive components, but can also be used for focus rings.
no setter
step8 Color
Step 8 is designed for borders on interactive components in their hover state.
no setter
step9 Color
Designed for solid backgrounds.
no setter
step10 Color
Step 10 is designed for component hover states, where step 9 is the component's normal state background.
no setter
step11 Color
Step 11 is designed for low-contrast text.
no setter
step12 Color
Step 12 is designed for high-contrast text.
no setter
value int
A 32 bit value representing this color.
finalinherited

Methods

computeLuminance() double
Returns a brightness value between 0 for darkest and 1 for lightest.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withAlpha(int a) Color
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
inherited
withBlue(int b) Color
Returns a new color that matches this color with the blue channel replaced with b (which ranges from 0 to 255).
inherited
withGreen(int g) Color
Returns a new color that matches this color with the green channel replaced with g (which ranges from 0 to 255).
inherited
withOpacity(double opacity) Color
Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0).
inherited
withRed(int r) Color
Returns a new color that matches this color with the red channel replaced with r (which ranges from 0 to 255).
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) Color?
Returns an element of the swatch table.
inherited