Fusion UI LogoFusion UI Logo
Fusion UI LogoFusion UI Logo
/
Getting Started
Concepts
Components
Example Apps
Getting Started
Concepts
Components
Example Apps
Fusion UI LogoFusion UI Logo
Getting Started
Concepts
Components
Example Apps
Overview
Foundations
Color
Typography
Spacing & Radius
Core Concepts
Surfaces & Elevation
States
Nesting
Views & Offsets
Animations
Touch & Mobile

Color

Palettes, semantic colors and how they adapt to light and dark mode.

Semantic palettes

Components never use raw color values. They use semantic palettes that say what a color means, each with ten shades from 50 (lightest) to 900 (darkest). The 500 shade is the main color; light shades serve as backgrounds, dark ones as text on light backgrounds.

Every shade comes with a -contrast color for text on top of it, black or white. The swatches below use it for their labels.

PaletteMeans
primaryMain actions, links, selection and focus
secondaryAccents that complement primary
neutralText, borders, backgrounds and neutral actions
successCompleted, positive outcomes
warnAttention needed, reversible problems
criticalErrors and destructive actions
primary
50
100
200
300
400
500
600
700
800
900
secondary
50
100
200
300
400
500
600
700
800
900
neutral
0
50
100
200
300
400
500
600
700
800
900
1000
success
50
100
200
300
400
500
600
700
800
900
warn
50
100
200
300
400
500
600
700
800
900
critical
50
100
200
300
400
500
600
700
800
900

Spectrum

Further palettes for categories without a meaning of good or bad: chart series, tags, status colors of custom workflows or avatars.

red
50
100
200
300
400
500
600
700
800
900
orange
50
100
200
300
400
500
600
700
800
900
yellow
50
100
200
300
400
500
600
700
800
900
lime
50
100
200
300
400
500
600
700
800
900
green
50
100
200
300
400
500
600
700
800
900
turquoise
50
100
200
300
400
500
600
700
800
900
blue
50
100
200
300
400
500
600
700
800
900
denim
50
100
200
300
400
500
600
700
800
900
purple
50
100
200
300
400
500
600
700
800
900
fuchsia
50
100
200
300
400
500
600
700
800
900

Surfaces, borders & text

A few colors have their own token instead of a shade. Text uses the base font color with different opacities, so it works on any surface.

backdrop-surfaceBackground of the application
elevated-surfaceTiles, menus, dialogs
elevated-surface-alternateFlat areas within elevated surfaces
borderDefault borders and dividers
border-strongBorders that need more contrast
base-fontText, see opacities below
accent-fontHighlighted text
TextOpacity of base-fontToken
Titles100%--opacity--title-base-font
Body text87%--opacity--body-base-font
Subtitles, captions55%--opacity--subtitle-base-font
Placeholders43%--opacity--placeholder-base-font

Light & dark mode

Every token has a value for the light and the dark theme. Switch the theme in the account menu: all colors on this page change, while their meaning stays. In the dark theme the neutral scale runs the other way (neutral-1000 is light, so text stays readable), elevated surfaces are lighter than the backdrop instead of white, and shadows are stronger. That’s why components must only use tokens.

Using colors

In SCSS, use get-color of fusion-css. The second argument sets the opacity. In CSS and inline styles, use the custom properties directly.

@use "@brynlabs/fusion-css/index" as fusioncss;
.selected {
color: fusioncss.get-color("primary-500");
background: fusioncss.get-color("primary-500", 0.06);
border: var(--size--border-width) solid fusioncss.get-color("border");
}
.label {
color: fusioncss.get-color("base-font", var(--opacity--subtitle-base-font));
}
<div style={{background: 'var(--color--success-50)'}}>Saved</div>

Guidelines

  • Use color to support meaning, never as the only carrier: add a label or icon.
  • Reserve critical for errors and destructive actions, so it keeps its signal.
  • Put text on a shade with its -contrast color to keep the contrast sufficient in both themes.
On this page
  • Semantic palettes
  • Spectrum
  • Surfaces, borders & text
  • Light & dark mode
  • Using colors
  • Guidelines