CompleteAdaptiveColor class

A color with explicit values for each profile, with light and dark variants.

Combines CompleteColor with adaptive background detection. Use this when you need full control over color appearance at each capability level AND need to adapt to light/dark backgrounds.

final brand = CompleteAdaptiveColor(
  light: CompleteColor(
    trueColor: '#0044aa',
    ansi256: '25',
    ansi: '4',  // Blue
  ),
  dark: CompleteColor(
    trueColor: '#66aaff',
    ansi256: '117',
    ansi: '6',  // Cyan
  ),
);
Inheritance

Constructors

CompleteAdaptiveColor({required CompleteColor light, required CompleteColor dark})
Creates a complete adaptive color with light and dark variants.
const

Properties

dark CompleteColor
Complete color to use on dark backgrounds.
final
dim Color
Returns a dimmed version of this color (if applicable).
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
light CompleteColor
Complete color to use on light backgrounds.
final
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
toAnsi(ColorProfile profile, {bool background = false, bool underline = false, bool hasDarkBackground = true}) String
Produces the ANSI escape sequence for this color.
override
toHex() String
Returns the hex representation of this color.
override
toString() String
A string representation of this object.
override

Operators

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