Sour is a shadcn/ui theme built around a light yellow primary color (#eeeed8) with neutral gray accents (#e5e5e1). The light mode uses a neutral background (#fdfdf6). Dark mode keeps the light yellow primary (#eeeed8) on a neutral background (#070703).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdf6snow | #070703black |
| Foreground | #0c0b04black | #fdfdfcwhite |
| Card | #fcfcf2floralwhite | #0b0a05black |
| Card foreground | #080802black | #ffffffwhite |
| Popover | #fdfdf6snow | #070703black |
| Popover foreground | #0c0b04black | #fdfdfcwhite |
| Primary | #eeeed8beige | #eeeed8beige |
| Primary foreground | #20200eblack | #20200eblack |
| Secondary | #e5e5e1gainsboro | #24241eblack |
| Secondary foreground | #4f4f45darkslategray | #c0bfb5silver |
| Muted | #f2f2e8linen | #17170dblack |
| Muted foreground | #6c6b56dimgray | #a9a893darkgray |
| Accent | #e5e5e1gainsboro | #24241eblack |
| Accent foreground | #4f4f45darkslategray | #c0bfb5silver |
| Destructive | #6c1e04maroon | #f86230tomato |
| Destructive foreground | #fcbca6lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #eeeed8beige | #eeeed8beige |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.33:1 | AAA |
| Text on card | 19.50:1 | AAA |
| Primary button | 13.99:1 | AAA |
| Secondary button | 6.54:1 | AA |
| Muted text | 4.81:1 | AA |
| Accent | 6.54:1 | AA |
| Destructive | 7.04:1 | AAA |
| Text on background | 19.82:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 13.99:1 | AAA |
| Secondary button | 8.46:1 | AAA |
| Muted text | 7.48:1 | AAA |
| Accent | 8.46:1 | AAA |
| Destructive | 6.76:1 | AA |
Paste this into your globals.css to use Sour in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.009 105.774);
--foreground: oklch(0.149 0.019 107.778);
--muted: oklch(0.959 0.013 105.865);
--muted-foreground: oklch(0.523 0.032 106.643);
--popover: oklch(0.993 0.009 105.774);
--popover-foreground: oklch(0.149 0.019 107.778);
--card: oklch(0.989 0.013 105.853);
--card-foreground: oklch(0.13 0.016 107.822);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.943 0.029 106.154);
--primary-foreground: oklch(0.238 0.031 107.702);
--secondary: oklch(0.92 0.005 105.717);
--secondary-foreground: oklch(0.424 0.016 106.283);
--accent: oklch(0.92 0.005 105.717);
--accent-foreground: oklch(0.424 0.016 106.283);
--destructive: oklch(0.359 0.116 36.906);
--destructive-foreground: oklch(0.848 0.08 39.219);
--ring: oklch(0.943 0.029 106.154);
--chart-1: oklch(0.943 0.029 106.154);
--chart-2: oklch(0.92 0.005 105.717);
--chart-3: oklch(0.92 0.005 105.717);
--chart-4: oklch(0.942 0.004 105.688);
--chart-5: oklch(0.945 0.031 106.191);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.126 0.012 107.359);
--foreground: oklch(0.994 0.002 105.65);
--muted: oklch(0.201 0.019 107.179);
--muted-foreground: oklch(0.727 0.029 106.315);
--popover: oklch(0.126 0.012 107.359);
--popover-foreground: oklch(0.994 0.002 105.65);
--card: oklch(0.145 0.014 107.341);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.943 0.029 106.154);
--primary-foreground: oklch(0.238 0.031 107.702);
--secondary: oklch(0.257 0.01 106.256);
--secondary-foreground: oklch(0.803 0.015 105.944);
--accent: oklch(0.257 0.01 106.256);
--accent-foreground: oklch(0.803 0.015 105.944);
--destructive: oklch(0.681 0.194 37.941);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.943 0.029 106.154);
--chart-1: oklch(0.943 0.029 106.154);
--chart-2: oklch(0.257 0.01 106.256);
--chart-3: oklch(0.257 0.01 106.256);
--chart-4: oklch(0.291 0.011 106.29);
--chart-5: oklch(0.945 0.031 106.191);
}