NmColors class

The full resolved color set for one palette in one brightness.

Foundation tokens are shared by all palettes (the shades chosen for the NativeMind design system); accent tokens come from the active palette.

Annotations

Constructors

NmColors({required Brightness brightness, required Color bg, required Color surface, required Color surface2, required Color fg1, required Color fgSecondary, required Color fg3, required Color fg2, required Color placeholder, required Color disabled, required Color line, required Color scrim, required Color badge, required Color success, required Color warning, required Color danger, required Color successText, required Color warningText, required Color dangerText, required Color brandLight, required Color brand, required Color brandText, required Color onBrand, required Color brandSoftTop, required Color brandSoftBottom, required Color brandGlow, required Color brandTint, required Color brandBubble, required List<BoxShadow> cardShadow, required List<BoxShadow> strongShadow, required List<BoxShadow> modalShadow, Color? ctaTop, Color? ctaBottom})
Creates an NmColors.
const

Properties

badge → Color
Unread / notification badge fill.
final
bg → Color
Page background.
final
brand → Color
Accent gradient base; primary action fill.
final
brandBubble → Color
Own-message bubble in chats (agent / support).
final
brandGlow → Color
Glow under the primary action.
final
brandGradient → LinearGradient
Vertical accent gradient (light → deep), as in the design system.
no setter
brandLight → Color
Accent gradient top (light) color.
final
brandSoftBottom → Color
Bottom of the soft accent wash.
final
brandSoftGradient → LinearGradient
Soft accent gradient.
no setter
brandSoftTop → Color
Soft accent wash (gradient top/bottom), e.g. chat bubbles.
final
brandText → Color
Accent for links and small text (≥ 4.5:1 on surface).
final
brandTint → Color
Selected row / chip wash.
final
brightness → Brightness
Light or dark.
final
cardHighlight → Color?
1px top highlight for cards in dark mode (replaces the light shadow).
no setter
cardShadow → List<BoxShadow>
Card elevation shadow.
final
ctaBottom → Color?
Bottom of the primary-button gradient when it differs from brand (NmCtaFill.deep).
final
ctaGradient → LinearGradient
Gradient of the primary (call-to-action) button: brandGradient, or the deeper one of NmCtaFill.deep.
no setter
ctaTop → Color?
Top of the primary-button gradient when it differs from brandLight (NmCtaFill.deep).
final
danger → Color
Status fill: danger.
final
dangerText → Color
Text shade of danger (≥ 4.5:1 on surface).
final
dangerTint → Color
Danger wash for pills and banners.
no setter
disabled → Color
Off-state button background.
final
fg1 → Color
Primary text, headings and icons.
final
fg2 → Color
Muted text, placeholders, secondary labels.
final
fg3 → Color
Off-state icon stroke.
final
fgSecondary → Color
Secondary text (captions, meta).
final
hashCode → int
The hash code for this object.
no setterinherited
isDark → bool
Whether these are the dark-mode colors.
no setter
line → Color
Hairline dividers and borders.
final
modalShadow → List<BoxShadow>
Shadow of dialogs and sheets.
final
onBrand → Color
Label color on brand fills.
final
placeholder → Color
Skeleton circles, empty knobs.
final
rowHead → Color
Table header row wash.
no setter
rowOdd → Color
Table row tints.
no setter
rowSelected → Color
Selected table row wash.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrim → Color
Modal backdrop.
final
smallButtonFill → Color
Solid fill for small (< 17 px label) primary buttons of the flat styles: brand when the onBrand label reads at ≥ 4.5:1 on it, otherwise the light-theme brandText shade of the same hue.
no setter
strongShadow → List<BoxShadow>
Shadow of raised elements (popovers, sidebar).
final
success → Color
Status fill: success.
final
successText → Color
Text shades of the status colors (≥ 4.5:1 on surface).
final
successTint → Color
Tints for status pills.
no setter
surface → Color
Cards, tiles, bars.
final
surface2 → Color
Sunken wells, chips, hover.
final
warning → Color
Status fill: warning.
final
warningText → Color
Text shade of warning (≥ 4.5:1 on surface).
final
warningTint → Color
Warning wash for pills and banners.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
tuned({NmSurfaceTone surfaces = NmSurfaceTone.calm, NmCtaFill cta = NmCtaFill.bright}) → NmColors
These colors with the NmSurfaceTone and NmCtaFill of a theme applied; the palette itself is unchanged.

Operators

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