Block is a shadcn/ui theme built around a near-black primary color (#090109) with near-black accents (#010901). The light mode uses a neutral background (#fefbfe). Dark mode keeps the near-black primary (#090109) on a purple-tinted background (#0b040b).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfewhite | #0b040bblack |
| Foreground | #040104black | #fdfcfdwhite |
| Card | #fefbfewhite | #0b040bblack |
| Card foreground | #040104black | #fdfcfdwhite |
| Popover | #fefbfewhite | #0b040bblack |
| Popover foreground | #040104black | #fdfcfdwhite |
| Primary | #090109black | #090109black |
| Primary foreground | #e458e4orchid | #e458e4orchid |
| Secondary | #010901black | #010901black |
| Secondary foreground | #1eb81elimegreen | #1eb81elimegreen |
| Muted | #e5f1e5beige | #0e1a0eblack |
| Muted foreground | #3a4a3adarkslategray | #b5c5b5silver |
| Accent | #010901black | #010901black |
| Accent foreground | #1eb81elimegreen | #1eb81elimegreen |
| Destructive | #97110cdarkred | #d91812crimson |
| Destructive foreground | #fcdad9mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #090109black | #090109black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.21:1 | AAA |
| Text on card | 20.21:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 7.62:1 | AAA |
| Muted text | 8.09:1 | AAA |
| Accent | 7.62:1 | AAA |
| Destructive | 6.73:1 | AA |
| Text on background | 19.77:1 | AAA |
| Text on card | 19.77:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 7.62:1 | AAA |
| Muted text | 9.87:1 | AAA |
| Accent | 7.62:1 | AAA |
| Destructive | 5.13:1 | AA |
Paste this into your globals.css to use Block in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.005 325.613);
--foreground: oklch(0.086 0.022 327.304);
--muted: oklch(0.945 0.02 145.414);
--muted-foreground: oklch(0.391 0.033 144.904);
--popover: oklch(0.991 0.005 325.613);
--popover-foreground: oklch(0.086 0.022 327.304);
--card: oklch(0.991 0.005 325.613);
--card-foreground: oklch(0.086 0.022 327.304);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.106 0.033 327.581);
--primary-foreground: oklch(0.693 0.233 327.733);
--secondary: oklch(0.124 0.031 143.427);
--secondary-foreground: oklch(0.682 0.22 142.676);
--accent: oklch(0.124 0.031 143.427);
--accent-foreground: oklch(0.682 0.22 142.676);
--destructive: oklch(0.432 0.167 28.894);
--destructive-foreground: oklch(0.917 0.037 20.208);
--ring: oklch(0.106 0.033 327.581);
--chart-1: oklch(0.106 0.033 327.581);
--chart-2: oklch(0.124 0.031 143.427);
--chart-3: oklch(0.124 0.031 143.427);
--chart-4: oklch(0.177 0.047 143.295);
--chart-5: oklch(0.106 0.034 327.664);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.126 0.022 326.78);
--foreground: oklch(0.992 0.001 325.583);
--muted: oklch(0.204 0.029 144.432);
--muted-foreground: oklch(0.806 0.028 145.308);
--popover: oklch(0.126 0.022 326.78);
--popover-foreground: oklch(0.992 0.001 325.583);
--card: oklch(0.126 0.022 326.78);
--card-foreground: oklch(0.992 0.001 325.583);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.106 0.033 327.581);
--primary-foreground: oklch(0.693 0.233 327.733);
--secondary: oklch(0.124 0.031 143.427);
--secondary-foreground: oklch(0.682 0.22 142.676);
--accent: oklch(0.124 0.031 143.427);
--accent-foreground: oklch(0.682 0.22 142.676);
--destructive: oklch(0.563 0.221 29.071);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.106 0.033 327.581);
--chart-1: oklch(0.106 0.033 327.581);
--chart-2: oklch(0.124 0.031 143.427);
--chart-3: oklch(0.124 0.031 143.427);
--chart-4: oklch(0.177 0.047 143.295);
--chart-5: oklch(0.106 0.034 327.664);
}