Foundations | Colors - Typography - Spacing
Colors
The Bilberry color system defines how we use color for brand, surfaces, and text. Tokens keep colors consistent across components and make theme changes easier.
Overview
Bilberry uses a token-based color system. Base colors like
primary, secondary, and
purple-500 are defined in :root and
reused across buttons, cards, backgrounds, borders, and text. Updating
a token updates the entire interface.
Core tokens
-
--color-primary– main brand color (actions, headings). --color-secondary– supporting accent color.-
--color-purple-500– highlight/accent for UI details. --color-bg– page background.--color-surface– card and panel surfaces.-
--color-border-subtle– subtle borders and dividers. --color-text– main body text.-
--color-text-muted– labels, helper text, secondary info.
Best practices
Do
- Use tokens instead of hard-coded hex values.
-
Use
--color-primaryfor key actions and emphasis. -
Use
--color-bgand--color-surfaceto create clear layers. -
Use
--color-text-mutedfor labels and helper text.
Don’t
- Don’t introduce random colors outside the token set.
- Don’t use bright accents for large background areas.
- Don’t rely only on color to show state; pair it with icons/text.
Color palette
These swatches show the main UI colors, each mapped to a design token.
Typography
Bilberry uses a single sans-serif typeface across the product. Font sizes and weights are defined as tokens so headings, body text, and labels stay consistent between Figma and code.
Spacing
Spacing tokens keep padding and gaps consistent across components. Each token represents a step on a simple 4 px scale, used for layout padding, grid gaps, and distances between elements.