Colors
Your theme has ten colors. Two are brand colors (primary and secondary) and eight are semantic colors with a job: page background, surfaces, text, muted text, borders and the three status colors. Every component picks from these ten, so a well-chosen set gives the whole app a coh
Your theme has ten colors. Two are brand colors (primary and secondary) and eight are semantic colors with a job: page background, surfaces, text, muted text, borders and the three status colors. Every component picks from these ten, so a well-chosen set gives the whole app a coherent look.
When to use
- Match your logo or website.
- Make status badges meaningful (green for paid, amber for pending, red for overdue).
- Soften or sharpen the overall feel through background and border colors.
The colors
| Color | Used for | Default |
|---|---|---|
| Primary | Buttons, links, active navigation, highlights, focus rings | #6055d9 (purple) |
| Secondary | Accents in charts and secondary highlights | #0f9d8a (teal) |
| Background | Page background | #f7f8fc |
| Surface | Cards, panels, inputs, menus | #ffffff |
| Text | Main text | #222638 |
| Muted | Secondary text, labels, captions | #788092 |
| Border | Lines and outlines | #e5e7ef |
| Success | Paid, done, active | #2f9e6e |
| Warning | Pending, due soon | #c98a1b |
| Danger | Overdue, errors, delete buttons | #d14b62 |
How to change colors
- Open Theme.
- Under Brand, click one of the primary swatches (Purple, Blue, Teal, Terracotta, Magenta) or use the color picker to enter your own hex value such as
#1e40af. The secondary color has its own picker. - Under Colors, adjust the semantic colors. Each one shows a hint of where it is used.
- The live preview updates while you drag; the value is saved when you release.
Example
A law firm brand with navy and gold:
Primary #1f2a44 (navy — buttons, links) Secondary #b8860b (gold — chart accents) Background #f6f5f2 (warm off-white) Surface #ffffff Text #1b1b1f Border #e3dfd6
Button text turns white automatically because the primary color is dark.
Using colors on one component
The inspector's Style tab has Background, Text color and Border color fields. These accept hex colors and also theme variables such as var(--mab-primary-soft), which keeps the override in sync with the theme. Prefer the theme and component styles; override individual components only for emphasis.
Common mistakes
- Primary and background too close. Buttons disappear. Keep strong contrast between primary and background.
- Changing text to pure black and borders to pure gray. The defaults are slightly tinted to look softer; very hard contrasts can look harsh on data-heavy pages.
- Entering
redorblue. The pickers expect hex values (#rrggbbor#rgb). - Expecting dark mode. Only the light theme is available for now.
Advanced
Tokens: colors.primary, colors.secondary, colors.background, colors.surface, colors.text, colors.muted, colors.border, colors.success, colors.warning, colors.danger. The runtime derives --mab-primary-ink (readable text on primary, chosen by luminance), --mab-primary-soft, --mab-primary-strong, and --mab-success-soft / --mab-warning-soft / --mab-danger-soft tints. The AI can change colors.primary, colors.secondary, colors.background, colors.surface and colors.text with instructions like "Change the accent color to blue".