ExpressiveArtworkScheme class

One picture's content colour, baked: the scheme a page wears when the picture heads it, as Jetcaster's Now Playing and show pages recolour from the cover.

tools/expressive_tokens bakes one per slot an app's media.json marks scheme, at each contrast the app's themes wear: the picture's source colour (material-color-utilities' quantizer and score, falling back to the app's seed, never Google Blue), then a vibrant 2025 scheme, light and dark. An app reads them through its generated ExpressiveArtwork.

Annotations

Constructors

ExpressiveArtworkScheme({required String slot, required String image, required int source, required bool fallback, required double contrast, required Map<String, int> light, required Map<String, int> dark})
An artwork scheme of the given record.
const

Properties

contrast → double
The contrast level the scheme was baked at: 0, 0.5 or 1.
final
dark → Map<String, int>
Every colour role in dark. Baked, never an inversion of light.
final
fallback → bool
Whether the picture had no colour fit for a theme, so source is the app's seed.
final
hashCode → int
The hash code for this object.
no setterinherited
image → String
The picture: its media_corpus id.
final
light → Map<String, int>
Every colour role in light, by ExpressiveColorRole name, as ARGB.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slot → String
The media slot whose picture this is.
final
source → int
The source colour the scheme was baked from, ARGB.
final

Methods

colors(Brightness brightness) → ExpressiveColorScheme
The scheme in brightness. Throws a StateError unless it carries exactly the ExpressiveColorRoles.
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