← Components

Color

The semantic color tokens every BoardUI component is built from — foreground, text, background, and border roles, named 1:1 with the Figma variables.

How the system works

Colors are layered in two tiers. Primitives are the raw palette — Tailwind's default OKLCH scales plus a handful of Figma-tuned overrides in styles/theme.css. Semantic tokens sit on top and reference those primitives by purpose — what the color is for, never what it looks like. --color-text-secondary says “supporting copy”, not “neutral 500”.

Components consume only the semantic layer. That single indirection is what makes the system maintainable: retune a primitive or remap a semantic token and every component updates at once — no component files change. It's also the path to dark mode: the .dark block in theme.css re-points the same tokens at dark values, so components never need dark: prefixes.

Token names mirror the Figma variable paths (text/primary --color-text-primary), so a design spec translates to code without a lookup table. Note the doubled prefix in class names — text-text-primary, bg-background-primary-default — the first segment is the Tailwind utility, the rest is the token's full semantic path.

Foreground

Icon fills and inverse/on-color foregrounds — everything drawn on top of a surface that isn't running text.

TokenTailwind classValue
--color-foreground-fulltext-foreground-fullwhite
--color-foreground-icon-primarytext-foreground-icon-primaryneutral-950
--color-foreground-icon-secondarytext-foreground-icon-secondaryneutral-500
--color-foreground-icon-tertiarytext-foreground-icon-tertiaryneutral-400
--color-foreground-icon-quaternarytext-foreground-icon-quaternaryneutral-300
--color-foreground-icon-errortext-foreground-icon-errorred-600
--color-foreground-icon-disabledtext-foreground-icon-disabledneutral-300
--color-foreground-disabledtext-foreground-disabledneutral-400
--color-foreground-disabled-dangertext-foreground-disabled-dangerred-300

Text

The type hierarchy: primary for headings and key values, secondary for supporting copy, tertiary for hints, plus disabled and error states.

TokenTailwind classValue
--color-text-primarytext-text-primaryneutral-950
--color-text-secondarytext-text-secondaryneutral-500
--color-text-tertiarytext-text-tertiaryneutral-400
--color-text-disabledtext-text-disabledneutral-300
--color-text-disabled-dangertext-text-disabled-dangerred-300
--color-text-error-primarytext-text-error-primaryred-500
--color-text-error-placeholdertext-text-error-placeholderred-400

Background

Surface fills. Primary is the page/card surface, secondary the recessed panel behind it, tertiary the strongest inset — each with interaction states.

TokenTailwind classValue
--color-background-primary-defaultbg-background-primary-defaultwhite
--color-background-primary-hoverbg-background-primary-hoverneutral-100
--color-background-primary-activebg-background-primary-activeneutral-200
--color-background-primary-disabledbg-background-primary-disabledneutral-100
--color-background-secondary-defaultbg-background-secondary-defaultneutral-100
--color-background-secondary-hoverbg-background-secondary-hoverneutral-200
--color-background-tertiary-defaultbg-background-tertiary-defaultneutral-200
--color-background-tertiary-errorbg-background-tertiary-errorred-100

Border

Hairlines and focus rings. Button borders step darker through hover and active; the focus ring is the single blue accent.

TokenTailwind classValue
--color-border-button-defaultborder-border-button-defaultneutral-200
--color-border-button-hoverborder-border-button-hoverneutral-300
--color-border-button-activeborder-border-button-activeneutral-400
--color-border-button-whiteborder-border-button-whitewhite
--color-border-checkbox-defaultborder-border-checkbox-defaultneutral-300
--color-border-focus-ringring-border-focus-ringblue-500

Graphs

Chart colors. Track is the background bar/ring behind a series, cursor the hover outline and dashed reference line, neutral an “other”-style data slice. The numbered accents are a categorical ramp — each pairs a base fill with a one-tone-darker active used for hover emphasis (the 400 → 500 recipe every chart follows). In charts these are consumed as CSS variables (e.g. fill=“var(--color-chart-1)”) rather than classes.

TokenTailwind classValue
--color-chart-trackbg-chart-trackneutral-200
--color-chart-cursorbg-chart-cursorneutral-300
--color-chart-neutralbg-chart-neutralneutral-300
--color-chart-1bg-chart-1teal-400
--color-chart-1-activebg-chart-1-activeteal-500
--color-chart-2bg-chart-2lime-400
--color-chart-2-activebg-chart-2-activelime-500
--color-chart-3bg-chart-3pink-400
--color-chart-3-activebg-chart-3-activepink-500
--color-chart-4bg-chart-4sky-400
--color-chart-4-activebg-chart-4-activesky-500
--color-chart-5bg-chart-5purple-400
--color-chart-5-activebg-chart-5-activepurple-500
--color-chart-6bg-chart-6blue-400
--color-chart-6-activebg-chart-6-activeblue-500
--color-chart-7bg-chart-7emerald-400
--color-chart-7-activebg-chart-7-activeemerald-500
--color-chart-8bg-chart-8yellow-400
--color-chart-8-activebg-chart-8-activeyellow-500