IntentColor enum

A named colour a host (or its model) can ask for. Each maps to an OKLCH hue range; some also lean the theme dark, light or muted when the intent does not say otherwise.

code is stable (share codes store it): add colours at the end, never renumber.

Inheritance
Available extensions

Values

red → const IntentColor
const IntentColor(0, 'red', 220, 340, 'true red')
coral → const IntentColor
const IntentColor(1, 'coral', 350, 450, 'pinkish orange-red')
orange → const IntentColor
const IntentColor(2, 'orange', 480, 650, 'orange')
amber → const IntentColor
const IntentColor(3, 'amber', 680, 820, 'deep yellow-orange')
yellow → const IntentColor
const IntentColor(4, 'yellow', 1000, 1100, 'yellow')
lime → const IntentColor
const IntentColor(5, 'lime', 1180, 1320, 'yellow-green')
green → const IntentColor
const IntentColor(6, 'green', 1350, 1520, 'leafy green')
mint → const IntentColor
const IntentColor(7, 'mint', 1550, 1700, 'fresh blue-green')
teal → const IntentColor
const IntentColor(8, 'teal', 1750, 1900, 'green-blue')
cyan → const IntentColor
const IntentColor(9, 'cyan', 1920, 2100, 'bright aqua blue')
sky → const IntentColor
const IntentColor(10, 'sky', 2150, 2350, 'light sky blue')
blue → const IntentColor
const IntentColor(11, 'blue', 2450, 2650, 'true blue')
indigo → const IntentColor
const IntentColor(12, 'indigo', 2680, 2820, 'deep violet-blue')
violet → const IntentColor
const IntentColor(13, 'violet', 2850, 3000, 'blue-purple')
purple → const IntentColor
const IntentColor(14, 'purple', 3020, 3180, 'purple')
magenta → const IntentColor
const IntentColor(15, 'magenta', 3200, 3380, 'hot purple-pink')
pink → const IntentColor
const IntentColor(16, 'pink', 3420, 3580, 'pink')
brown → const IntentColor
const IntentColor(17, 'brown', 400, 620, 'coffee and wood browns', leanBrightness: ThemeBrightness.dark, leanChroma: IntentChroma.muted)
sand → const IntentColor
const IntentColor(18, 'sand', 750, 950, 'beige, sand and cream', leanBrightness: ThemeBrightness.light, leanChroma: IntentChroma.muted)
grey → const IntentColor
const IntentColor(19, 'grey', 0, 3599, 'neutral greys with little colour', leanChroma: IntentChroma.muted, neutral: true)
const IntentColor(20, 'navy', 2550, 2680, 'dark navy blue', leanBrightness: ThemeBrightness.dark)
olive → const IntentColor
const IntentColor(21, 'olive', 1000, 1180, 'muted khaki green', leanChroma: IntentChroma.muted)
lavender → const IntentColor
const IntentColor(22, 'lavender', 2850, 3100, 'pale soft purple', leanBrightness: ThemeBrightness.light, leanChroma: IntentChroma.muted)
peach → const IntentColor
const IntentColor(23, 'peach', 450, 650, 'pale soft orange', leanBrightness: ThemeBrightness.light, leanChroma: IntentChroma.muted)
gold → const IntentColor
const IntentColor(24, 'gold', 850, 980, 'warm gold')
maroon → const IntentColor
const IntentColor(25, 'maroon', 150, 280, 'dark wine red', leanBrightness: ThemeBrightness.dark)

Properties

code → int
Stable numeric code (0–31).
final
description → String
One line for prompts and schema descriptions.
final
hashCode → int
The hash code for this object.
no setterinherited
hiTenths → int
final
index → int
A numeric identifier for the enumerated value.
no setterinherited
leanBrightness → ThemeBrightness?
Brightness this colour implies when the intent sets none.
final
leanChroma → IntentChroma?
Chroma this colour implies when the intent sets none.
final
loTenths → int
OKLCH hue range in tenths of a degree, inclusive.
final
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
neutral → bool
Whether this is a neutral (no hue of its own): it quiets the base surfaces instead of choosing their hue.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
word → String
The vocabulary word.
final

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

fromCode(int code) → IntentColor?
Looks a colour up by code; null if unknown.

Constants

values → const List<IntentColor>
A constant List of the values in this enum, in order of their declaration.