Diagram is a shadcn/ui theme built around a neutral gray primary color (#bfbcc2) with neutral gray accents (#bcc2bf). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the neutral gray primary (#bfbcc2) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #050307black |
| Foreground | #020104black | #ffffffwhite |
| Card | #fcfbfewhite | #050307black |
| Card foreground | #020104black | #ffffffwhite |
| Popover | #fcfbfewhite | #050307black |
| Popover foreground | #020104black | #ffffffwhite |
| Primary | #bfbcc2silver | #bfbcc2silver |
| Primary foreground | #262428darkslategray | #262428darkslategray |
| Secondary | #c2bfbcsilver | #c2bfbcsilver |
| Secondary foreground | #282624darkslategray | #282624darkslategray |
| Muted | #f4efeclinen | #130e0bblack |
| Muted foreground | #5e5e5edimgray | #a1a1a1darkgray |
| Accent | #bcc2bfsilver | #bcc2bfsilver |
| Accent foreground | #242826darkslategray | #242826darkslategray |
| Destructive | #61230amaroon | #e75318chocolate |
| Destructive foreground | #f6bea7lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #bfbcc2silver | #bfbcc2silver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.24:1 | AAA |
| Text on card | 20.24:1 | AAA |
| Primary button | 8.19:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 5.67:1 | AA |
| Accent | 8.27:1 | AAA |
| Destructive | 7.34:1 | AAA |
| Text on background | 20.55:1 | AAA |
| Text on card | 20.55:1 | AAA |
| Primary button | 8.19:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 7.40:1 | AAA |
| Accent | 8.27:1 | AAA |
| Destructive | 3.72:1 | AA Large |
Paste this into your globals.css to use Diagram in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 303.595);
--foreground: oklch(0.075 0.024 305.037);
--muted: oklch(0.954 0.006 54.413);
--muted-foreground: oklch(0.483 0 180);
--popover: oklch(0.99 0.003 303.595);
--popover-foreground: oklch(0.075 0.024 305.037);
--card: oklch(0.99 0.003 303.595);
--card-foreground: oklch(0.075 0.024 305.037);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.799 0.009 303.468);
--primary-foreground: oklch(0.265 0.007 303.231);
--secondary: oklch(0.806 0.006 54.41);
--secondary-foreground: oklch(0.27 0.004 54.281);
--accent: oklch(0.809 0.009 159.223);
--accent-foreground: oklch(0.273 0.007 158.888);
--destructive: oklch(0.345 0.097 39.884);
--destructive-foreground: oklch(0.845 0.072 42.583);
--ring: oklch(0.799 0.009 303.468);
--chart-1: oklch(0.799 0.009 303.468);
--chart-2: oklch(0.806 0.006 54.41);
--chart-3: oklch(0.809 0.009 159.223);
--chart-4: oklch(0.829 0.005 54.424);
--chart-5: oklch(0.796 0.015 303.364);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.104 0.017 304.335);
--foreground: oklch(1 0 180);
--muted: oklch(0.171 0.01 53.72);
--muted-foreground: oklch(0.708 0 158.199);
--popover: oklch(0.104 0.017 304.335);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.104 0.017 304.335);
--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.799 0.009 303.468);
--primary-foreground: oklch(0.265 0.007 303.231);
--secondary: oklch(0.806 0.006 54.41);
--secondary-foreground: oklch(0.27 0.004 54.281);
--accent: oklch(0.809 0.009 159.223);
--accent-foreground: oklch(0.273 0.007 158.888);
--destructive: oklch(0.635 0.194 38.677);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.799 0.009 303.468);
--chart-1: oklch(0.799 0.009 303.468);
--chart-2: oklch(0.806 0.006 54.41);
--chart-3: oklch(0.809 0.009 159.223);
--chart-4: oklch(0.829 0.005 54.424);
--chart-5: oklch(0.796 0.015 303.364);
}