Clamp is a shadcn/ui theme built around a light violet primary color (#f9f3fc) with light green accents (#f6fcf3). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#f9f3fc) on a neutral background (#060307).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060307black |
| Foreground | #060109black | #f8f6f9whitesmoke |
| Card | #fcfcfcsnow | #08050bblack |
| Card foreground | #030104black | #faf9fbghostwhite |
| Popover | #fcfcfcsnow | #08050bblack |
| Popover foreground | #030104black | #faf9fbghostwhite |
| Primary | #f9f3fcghostwhite | #f9f3fcghostwhite |
| Primary foreground | #6d2796rebeccapurple | #6d2796rebeccapurple |
| Secondary | #f6fcf3whitesmoke | #f6fcf3whitesmoke |
| Secondary foreground | #254512darkgreen | #254512darkgreen |
| Muted | #dce6d6gainsboro | #1f2919black |
| Muted foreground | #515e4adarkolivegreen | #a8b5a1darkgray |
| Accent | #f6fcf3whitesmoke | #f6fcf3whitesmoke |
| Accent foreground | #254512darkgreen | #254512darkgreen |
| Destructive | #cf190cfirebrick | #f44a3etomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f9f3fcghostwhite | #f9f3fcghostwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.66:1 | AAA |
| Text on card | 20.34:1 | AAA |
| Primary button | 8.07:1 | AAA |
| Secondary button | 10.37:1 | AAA |
| Muted text | 5.35:1 | AA |
| Accent | 10.37:1 | AAA |
| Destructive | 5.51:1 | AA |
| Text on background | 19.08:1 | AAA |
| Text on card | 19.31:1 | AAA |
| Primary button | 8.07:1 | AAA |
| Secondary button | 10.37:1 | AAA |
| Muted text | 7.01:1 | AAA |
| Accent | 10.37:1 | AAA |
| Destructive | 3.56:1 | AA Large |
Paste this into your globals.css to use Clamp in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.1 0.03 316.113);
--muted: oklch(0.913 0.025 133.778);
--muted-foreground: oklch(0.466 0.036 134.11);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.08 0.024 316.113);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.08 0.024 316.113);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.971 0.013 313.521);
--primary-foreground: oklch(0.432 0.175 309.858);
--secondary: oklch(0.984 0.013 133.69);
--secondary-foreground: oklch(0.353 0.087 136.065);
--accent: oklch(0.984 0.013 133.69);
--accent-foreground: oklch(0.353 0.087 136.065);
--destructive: oklch(0.545 0.213 29.75);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.971 0.013 313.521);
--chart-1: oklch(0.971 0.013 313.521);
--chart-2: oklch(0.984 0.013 133.69);
--chart-3: oklch(0.984 0.013 133.69);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.97 0.014 313.516);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.108 0.015 314.832);
--foreground: oklch(0.975 0.004 313.583);
--muted: oklch(0.267 0.033 134.479);
--muted-foreground: oklch(0.757 0.032 133.873);
--popover: oklch(0.124 0.017 314.809);
--popover-foreground: oklch(0.984 0.002 313.591);
--card: oklch(0.124 0.017 314.809);
--card-foreground: oklch(0.984 0.002 313.591);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.971 0.013 313.521);
--primary-foreground: oklch(0.432 0.175 309.858);
--secondary: oklch(0.984 0.013 133.69);
--secondary-foreground: oklch(0.353 0.087 136.065);
--accent: oklch(0.984 0.013 133.69);
--accent-foreground: oklch(0.353 0.087 136.065);
--destructive: oklch(0.65 0.208 28.35);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.971 0.013 313.521);
--chart-1: oklch(0.971 0.013 313.521);
--chart-2: oklch(0.984 0.013 133.69);
--chart-3: oklch(0.984 0.013 133.69);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.97 0.014 313.516);
}