Calm is a shadcn/ui theme built around a muted purple primary color (#9e70a4) with neutral gray accents (#cfcfcf). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the muted purple primary (#9e70a4) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf6fdsnow | #030203black |
| Foreground | #130515black | #f9f5faghostwhite |
| Card | #fdf6fdsnow | #030203black |
| Card foreground | #130515black | #f9f5faghostwhite |
| Popover | #fdf6fdsnow | #030203black |
| Popover foreground | #130515black | #f9f5faghostwhite |
| Primary | #9e70a4lightslategray | #9e70a4lightslategray |
| Primary foreground | #000000black | #000000black |
| Secondary | #cfcfcflightgrey | #332734darkslategray |
| Secondary foreground | #363636darkslategray | #cdbfcfthistle |
| Muted | #f2ededlinen | #110d12black |
| Muted foreground | #483d3ddarkslategray | #c1b7c2silver |
| Accent | #cfcfcflightgrey | #332734darkslategray |
| Accent foreground | #363636darkslategray | #cdbfcfthistle |
| Destructive | #98360bsaddlebrown | #ef682etomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9e70a4lightslategray | #9e70a4lightslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.70:1 | AAA |
| Text on card | 18.70:1 | AAA |
| Primary button | 5.30:1 | AA |
| Secondary button | 7.72:1 | AAA |
| Muted text | 9.03:1 | AAA |
| Accent | 7.72:1 | AAA |
| Destructive | 7.35:1 | AAA |
| Text on background | 19.21:1 | AAA |
| Text on card | 19.21:1 | AAA |
| Primary button | 5.30:1 | AA |
| Secondary button | 8.03:1 | AAA |
| Muted text | 9.92:1 | AAA |
| Accent | 8.03:1 | AAA |
| Destructive | 6.70:1 | AA |
Paste this into your globals.css to use Calm in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.011 322.672);
--foreground: oklch(0.149 0.042 323.795);
--muted: oklch(0.951 0.005 17.244);
--muted-foreground: oklch(0.371 0.015 17.839);
--popover: oklch(0.981 0.011 322.672);
--popover-foreground: oklch(0.149 0.042 323.795);
--card: oklch(0.981 0.011 322.672);
--card-foreground: oklch(0.149 0.042 323.795);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.61 0.093 323.186);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.853 0 168.69);
--secondary-foreground: oklch(0.331 0 180);
--accent: oklch(0.853 0 168.69);
--accent-foreground: oklch(0.331 0 180);
--destructive: oklch(0.468 0.14 39.675);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.61 0.093 323.186);
--chart-1: oklch(0.61 0.093 323.186);
--chart-2: oklch(0.853 0 168.69);
--chart-3: oklch(0.853 0 168.69);
--chart-4: oklch(0.877 0 180);
--chart-5: oklch(0.609 0.105 323.25);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.011 323.647);
--foreground: oklch(0.974 0.009 322.663);
--muted: oklch(0.166 0.012 322.898);
--muted-foreground: oklch(0.792 0.018 322.718);
--popover: oklch(0.088 0.011 323.647);
--popover-foreground: oklch(0.974 0.009 322.663);
--card: oklch(0.088 0.011 323.647);
--card-foreground: oklch(0.974 0.009 322.663);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.61 0.093 323.186);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.293 0.028 322.994);
--secondary-foreground: oklch(0.821 0.027 322.756);
--accent: oklch(0.293 0.028 322.994);
--accent-foreground: oklch(0.821 0.027 322.756);
--destructive: oklch(0.677 0.181 41.418);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.61 0.093 323.186);
--chart-1: oklch(0.61 0.093 323.186);
--chart-2: oklch(0.293 0.028 322.994);
--chart-3: oklch(0.293 0.028 322.994);
--chart-4: oklch(0.323 0.032 323.006);
--chart-5: oklch(0.609 0.105 323.25);
}