Steering class final

One attempt's steering.

Constructors

Steering(ThemeIntent intent, {bool centred = false, bool tonal = false, bool v4Leans = false})

Properties

baseRange → ({int lo, int span})?
The steered base hue range as (lo tenths, clockwise span tenths), or null when the intent sets no base hue.
no setter
brightness → ThemeBrightness?
The brightness the intent asks for, explicitly or by a colour's lean.
no setter
centred → bool
final
chroma → IntentChroma?
The chroma the intent asks for, explicitly or by a colour's lean.
no setter
hashCode → int
The hash code for this object.
no setterinherited
intent → ThemeIntent
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tonal → bool
Keep the drawn harmony tonal (monochrome or analogous) when the intent sets none, so one colour reads through the whole theme (engine v5, M3 Expressive).
final
v4Leans → bool
Read colour leans the engine v4 way (any colour, not just the first).
final

Methods

accentHue(Rng r, int index) → int?
The steered operator (index 0) or = (index 1) hue (tenths), drawn from r; null when the intent names no accent colour, or names a harmony (which then places the accents).
baseHue(Rng r) → int?
The steered base hue (tenths), drawn from r; null when the intent sets no base hue. Always draws once when steering hues, so the accent draws keep their place.
brightnessFor(FamilyDefinition def) → ThemeBrightness?
The brightness to use instead of the drawn one, when def can draw it; null keeps the draw.
closestHero(int seed, ThemeFamily family) → ThemeSpec
The deterministic last resort for a steered (seed, family) when every attempt fails: the hero closest to the intent (brightness first, then base hue), preferring the family's own heroes.
nameOr(String generated()) → String
The theme's name: the intent's, else generated.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickIn(int lo, int span, int u32) → int
A hue in the clockwise range (lo, span) from the 32-bit draw u32 (its middle when centred).
recolour(ThemeSpec spec, Rng r, {bool bodyAnchor = false, bool scaleChroma = true, bool accentsOnly = false, bool honoursHarmony = true, int pullPermille = 1000, double? keyChromaFloor, int minEqualsApartTenths = 0, bool keepLightness = false, bool neon = false}) → ThemeSpec
spec turned to the intent (engine v5): every colour's hue turns by the angle that puts the anchor (the most colourful of the operator, = and accent colours; the background when bodyAnchor) on the intent's base hue; a second colour turns the = key on its own and a third the function keys; a neutral first colour quietens everything; with scaleChroma, chroma scales to the intent's level (capped to the gamut). Lightness and alpha are kept. keyChromaFloor keeps colourful key colours at least that colourful when chroma scales down. A second colour within minEqualsApartTenths of the first leaves = its own hue. keepLightness stops key colours moving in lightness; neon moves colourful key colours towards their hue's most saturated lightness. With pullPermille below 1000 every hue also moves towards its colour, keeping that share of its distance. A harmony the family honoursHarmony places the second and third colours' keys instead. With accentsOnly (the generator's fallback before a hero), only the operator, = and accent colours turn. Draws three times from r.
revise(FamilyDefinition def) → FamilyDefinition
def with every role's chroma range narrowed to the intent's chroma level (and the base roles quietened for a neutral first colour).
schemeFor(List<Weighted<HarmonyScheme>> schemes, {HarmonyScheme? drawn}) → HarmonyScheme?
The harmony scheme to use instead of the drawn one, when schemes offers it; null keeps the draw.
toString() → String
A string representation of this object.
inherited
withBrightness(FamilyDefinition def) → FamilyDefinition
def with its brightness draw fixed to the intent's, when def can draw it (engine v5 families with their own palettes).
withoutHues({bool tonal = false}) → Steering
This steering without its hues (colours and hue range), keeping the brightness and chroma they imply. With tonal, the harmony stays tonal while the intent sets none.

Operators

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