Colors class
Semantic and named color presets.
Provides commonly used colors for CLI applications.
Style().foreground(Colors.success)
Style().foreground(Colors.red)
Style().background(Colors.gray)
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
-
adaptive(
{required Color light, required Color dark}) → AdaptiveColor - Creates an adaptive color from light and dark variants.
-
ansi(
int code) → AnsiColor - Creates a color from an ANSI-256 code.
-
hex(
String value) → BasicColor - Creates a color from a hex string.
-
rgb(
int r, int g, int b) → BasicColor - Creates a color from RGB values.
Constants
- black → const BasicColor
- Black.
- blue → const BasicColor
- Blue.
- brightBlack → const BasicColor
- Bright black (dark gray).
- brightBlue → const BasicColor
- Bright blue.
- brightCyan → const BasicColor
- Bright cyan.
- brightGreen → const BasicColor
- Bright green.
- brightMagenta → const BasicColor
- Bright magenta.
- brightRed → const BasicColor
- Bright red.
- brightWhite → const BasicColor
- Bright white.
- brightYellow → const BasicColor
- Bright yellow.
- cyan → const BasicColor
- Cyan.
- error → const BasicColor
- Error color (red).
- gray → const BasicColor
- Gray.
- gray50 → const BasicColor
- Lightest gray.
- gray100 → const BasicColor
- Very light gray.
- gray200 → const BasicColor
- Light gray.
- gray300 → const BasicColor
- Light-medium gray.
- gray400 → const BasicColor
- Medium gray.
- gray600 → const BasicColor
- Medium-dark gray.
- gray700 → const BasicColor
- Dark gray.
- gray800 → const BasicColor
- Very dark gray.
- gray900 → const BasicColor
- Darkest gray.
- green → const BasicColor
- Green.
- indigo → const BasicColor
- Indigo accent.
- info → const BasicColor
- Info color (blue).
- lime → const BasicColor
- Lime accent.
- magenta → const BasicColor
- Magenta/Purple.
- muted → const BasicColor
- Muted/dimmed color (gray).
- none → const NoColor
- No color (transparent).
- orange → const BasicColor
- Orange accent.
- pink → const BasicColor
- Pink accent.
- purple → const BasicColor
- Purple accent.
- red → const BasicColor
- Red.
- rose → const BasicColor
- Rose accent.
- sky → const BasicColor
- Sky blue accent.
- success → const BasicColor
- Success color (green).
- teal → const BasicColor
- Teal accent.
- warning → const BasicColor
- Warning color (yellow/amber).
- white → const BasicColor
- White.
- yellow → const BasicColor
- Yellow.