Disclosure is a shadcn/ui theme built around a near-black primary color (#040109) with near-black accents (#010904). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the near-black primary (#040109) on a violet-tinted background (#07050a).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f8fcghostwhite | #07050ablack |
| Foreground | #040208black | #ffffffwhite |
| Card | #f9f8fcghostwhite | #07050ablack |
| Card foreground | #040208black | #ffffffwhite |
| Popover | #f9f8fcghostwhite | #07050ablack |
| Popover foreground | #040208black | #ffffffwhite |
| Primary | #040109black | #040109black |
| Primary foreground | #c8acf6plum | #c8acf6plum |
| Secondary | #090401black | #090401black |
| Secondary foreground | #ed8c50coral | #ed8c50coral |
| Muted | #f7f1edlinen | #120c08black |
| Muted foreground | #434242darkslategray | #bdbdbcsilver |
| Accent | #010904black | #010904black |
| Accent foreground | #14c257limegreen | #14c257limegreen |
| Destructive | #b73206firebrick | #f9622ftomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #040109black | #040109black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.48:1 | AAA |
| Text on card | 19.48:1 | AAA |
| Primary button | 10.54:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 8.95:1 | AAA |
| Accent | 8.51:1 | AAA |
| Destructive | 6.04:1 | AA |
| Text on background | 20.29:1 | AAA |
| Text on card | 20.29:1 | AAA |
| Primary button | 10.54:1 | AAA |
| Secondary button | 8.21:1 | AAA |
| Muted text | 10.34:1 | AAA |
| Accent | 8.51:1 | AAA |
| Destructive | 6.78:1 | AA |
Paste this into your globals.css to use Disclosure in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.006 303.544);
--foreground: oklch(0.102 0.02 304.476);
--muted: oklch(0.962 0.009 54.383);
--muted-foreground: oklch(0.38 0.001 54.455);
--popover: oklch(0.981 0.006 303.544);
--popover-foreground: oklch(0.102 0.02 304.476);
--card: oklch(0.981 0.006 303.544);
--card-foreground: oklch(0.102 0.02 304.476);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.092 0.033 305.248);
--primary-foreground: oklch(0.795 0.107 301.596);
--secondary: oklch(0.116 0.019 67.444);
--secondary-foreground: oklch(0.731 0.14 50.865);
--accent: oklch(0.126 0.024 159.227);
--accent-foreground: oklch(0.712 0.196 149.037);
--destructive: oklch(0.518 0.176 35.599);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.092 0.033 305.248);
--chart-1: oklch(0.092 0.033 305.248);
--chart-2: oklch(0.116 0.019 67.444);
--chart-3: oklch(0.126 0.024 159.227);
--chart-4: oklch(0.163 0.03 59.186);
--chart-5: oklch(0.091 0.035 305.345);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.016 304.193);
--foreground: oklch(1 0 180);
--muted: oklch(0.159 0.014 54.554);
--muted-foreground: oklch(0.797 0.001 54.486);
--popover: oklch(0.121 0.016 304.193);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.121 0.016 304.193);
--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.092 0.033 305.248);
--primary-foreground: oklch(0.795 0.107 301.596);
--secondary: oklch(0.116 0.019 67.444);
--secondary-foreground: oklch(0.731 0.14 50.865);
--accent: oklch(0.126 0.024 159.227);
--accent-foreground: oklch(0.712 0.196 149.037);
--destructive: oklch(0.682 0.195 37.882);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.092 0.033 305.248);
--chart-1: oklch(0.092 0.033 305.248);
--chart-2: oklch(0.116 0.019 67.444);
--chart-3: oklch(0.126 0.024 159.227);
--chart-4: oklch(0.163 0.03 59.186);
--chart-5: oklch(0.091 0.035 305.345);
}