MinimalColors class
Minimal's colour roles in one appearance, as Material's ColorScheme:
the grounds, the hairlines, the inks, the one accent and the three
status tones. Every role is materialised — components read values, they
never derive them. MinimalThemeData.preset and MinimalThemeData.from
build them with every contrast bar held; copyWith changes roles as
given and checks nothing.
final t = MinimalThemeData.standard();
final quieter = t.copyWith(
colors: t.colors.copyWith(border: const Color(0xFFF0F0F2)),
);
- Mixed-in types
- Annotations
Constructors
- MinimalColors({required Brightness brightness, required Color background, required Color card, required Color muted, required Color sunken, required Color surfaceInverse, required Color border, required Color borderStrong, required Color input, required Color foreground, required Color mutedForeground, required Color textTertiary, required Color textInverse, required Color primary, required Color primaryForeground, required Color primarySubtle, required Color primaryInk, required Color success, required Color onSuccess, required Color successSubtle, required Color successInk, required Color warning, required Color warningSubtle, required Color warningInk, required Color destructive, required Color destructiveForeground, required Color destructiveSubtle, required Color destructiveInk, required Color info, required Color overlay, required Color ring, required Color selection})
-
Every role, as given.
const
Properties
- background → Color
-
The page ground.
final
- border → Color
-
The hairline every row, bar and container draws.
final
- borderStrong → Color
-
A firmer hairline: a hovered field's rim, a divider that must hold.
final
- brightness → Brightness
-
Which appearance these colours are for.
final
- card → Color
-
Cards, sheets, menus and docked bars.
final
- destructive → Color
-
The danger tone's fill: the destructive button, an error dot.
final
- destructiveForeground → Color
-
Text on a destructive fill (the destructive button's label).
final
- destructiveInk → Color
-
destructive as text: an error line, a
Buglabel, a negative delta.final - destructiveSubtle → Color
-
The danger tone's quiet fill.
final
- foreground → Color
-
The ink every title and value prints in.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- info → Color
-
An informational note or highlight an app wants to name for the job
(a hint, a "new" marker): the accent's INK, so a word in it clears AA
on the ground in every preset (ember's orange fill would not). It is
an app-level role — no Minimal component reads it; a status speaks in
its own tone (work in progress is warning).
final
- input → Color
-
The edge that makes an idle control findable: an unchecked box, a
switch's off track. Unlike the hairlines it clears 3:1 against the
ground, the surface and the quiet fill in every preset, so an empty
checkbox never reads as a missing one.
final
- muted → Color
-
The quiet fill: table headers, the selected filter, a set pill.
final
- mutedForeground → Color
-
The quiet ink: a row's meta, a caption, an idle glyph. Clears AA on
the ground.
final
- onSuccess → Color
-
Text on a success fill: the ink in light, where white on the green
fails AA, and the dark ground in dark.
final
- overlay → Color
-
The scrim under a sheet or a dialog.
final
- primary → Color
-
The one colour spent on the thing to act on.
final
- primaryForeground → Color
-
Text and glyphs on a primary fill, at AA contrast for a 13 px label.
final
- primaryInk → Color
-
The accent as TEXT or a thin glyph (a link, an accent tag, a
selection check): primary itself wherever it clears AA on the ground
and on primarySubtle, a deeper cut where it does not (ember's orange).
primary stays the fill — the primary button, a toggle's track, a bar.
final
- primarySubtle → Color
-
The accent's quiet fill: a selected row, an accent tag.
final
- ring → Color
-
The keyboard focus ring every focusable control draws.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → Color
-
A highlighted row: selected, or the current match.
final
- success → Color
-
A status colour splits in two: the fill (success, warning,
destructive) for dots, bars, heatmap cells and filled glyphs, and the ink
(successInk, ...) for words and thin strokes, which clears AA on the
ground and on the tone's subtle fill in every preset.
final
- successInk → Color
-
success as text:
Paid,+12%, a kept count.final - successSubtle → Color
-
The success tone's quiet fill.
final
- sunken → Color
-
A well BELOW the ground: code blocks, an inset input, an empty track.
final
- surfaceInverse → Color
-
The ink as a ground: a snack bar, a tooltip, an inverted badge.
final
- textInverse → Color
-
Ink on surfaceInverse.
final
- textTertiary → Color
-
Faint ink for decorative marks and secondary icons.
final
- warning → Color
-
The warning tone's fill: a late dot, an in-progress ring.
final
- warningInk → Color
-
warning as text or a thin glyph:
Late, a due time, the in-progress ring.final - warningSubtle → Color
-
The warning tone's quiet fill.
final
Methods
-
copyWith(
{Brightness? brightness, Color? background, Color? card, Color? muted, Color? sunken, Color? surfaceInverse, Color? border, Color? borderStrong, Color? input, Color? foreground, Color? mutedForeground, Color? textTertiary, Color? textInverse, Color? primary, Color? primaryForeground, Color? primarySubtle, Color? primaryInk, Color? success, Color? onSuccess, Color? successSubtle, Color? successInk, Color? warning, Color? warningSubtle, Color? warningInk, Color? destructive, Color? destructiveForeground, Color? destructiveSubtle, Color? destructiveInk, Color? info, Color? overlay, Color? ring, Color? selection}) → MinimalColors - These colours with the named roles changed.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerp(
MinimalColors a, MinimalColors b, double t) → MinimalColors -
Between
aandb, role by role; the appearance flips at the middle.