Sardonic is a shadcn/ui theme built around a near-black primary color (#030d0b) with near-black accents (#0d0b03). The light mode uses a neutral background (#fbfefd). Dark mode keeps the near-black primary (#030d0b) on a neutral background (#030706).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefdwhite | #030706black |
| Foreground | #061412black | #f5f9f9whitesmoke |
| Card | #f7fdfcmintcream | #050a09black |
| Card foreground | #05100eblack | #f8fbfbghostwhite |
| Popover | #f7fdfcmintcream | #050a09black |
| Popover foreground | #05100eblack | #f8fbfbghostwhite |
| Primary | #030d0bblack | #030d0bblack |
| Primary foreground | #26b5a0lightseagreen | #26b5a0lightseagreen |
| Secondary | #0b030dblack | #0b030dblack |
| Secondary foreground | #cc63deorchid | #cc63deorchid |
| Muted | #eeeceewhitesmoke | #121113black |
| Muted foreground | #615463dimgray | #a89cabdarkgray |
| Accent | #0d0b03black | #0d0b03black |
| Accent foreground | #b5a026darkgoldenrod | #b5a026darkgoldenrod |
| Destructive | #ae0a0afirebrick | #f11313red |
| Destructive foreground | #feececlinen | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #030d0bblack | #030d0bblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.52:1 | AAA |
| Text on card | 18.74:1 | AAA |
| Primary button | 7.70:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 6.05:1 | AA |
| Accent | 7.52:1 | AAA |
| Destructive | 6.49:1 | AA |
| Text on background | 19.09:1 | AAA |
| Text on card | 19.12:1 | AAA |
| Primary button | 7.70:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 7.17:1 | AAA |
| Accent | 7.52:1 | AAA |
| Destructive | 4.32:1 | AA Large |
Paste this into your globals.css to use Sardonic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 186.519);
--foreground: oklch(0.176 0.021 183.598);
--muted: oklch(0.946 0.003 321.072);
--muted-foreground: oklch(0.465 0.028 321.193);
--popover: oklch(0.989 0.006 186.443);
--popover-foreground: oklch(0.16 0.018 184.384);
--card: oklch(0.989 0.006 186.443);
--card-foreground: oklch(0.16 0.018 184.384);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.145 0.018 185.297);
--primary-foreground: oklch(0.696 0.119 179.683);
--secondary: oklch(0.121 0.033 322.816);
--secondary-foreground: oklch(0.671 0.2 321.431);
--accent: oklch(0.149 0.021 101.84);
--accent-foreground: oklch(0.703 0.134 98.562);
--destructive: oklch(0.474 0.189 28.659);
--destructive-foreground: oklch(0.957 0.02 17.503);
--ring: oklch(0.145 0.018 185.297);
--chart-1: oklch(0.145 0.018 185.297);
--chart-2: oklch(0.121 0.033 322.816);
--chart-3: oklch(0.149 0.021 101.84);
--chart-4: oklch(0.159 0.048 321.693);
--chart-5: oklch(0.146 0.019 185.204);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.009 186.315);
--foreground: oklch(0.98 0.005 186.475);
--muted: oklch(0.18 0.004 321.117);
--muted-foreground: oklch(0.708 0.025 321.142);
--popover: oklch(0.139 0.01 186.315);
--popover-foreground: oklch(0.987 0.003 186.516);
--card: oklch(0.139 0.01 186.315);
--card-foreground: oklch(0.987 0.003 186.516);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.145 0.018 185.297);
--primary-foreground: oklch(0.696 0.119 179.683);
--secondary: oklch(0.121 0.033 322.816);
--secondary-foreground: oklch(0.671 0.2 321.431);
--accent: oklch(0.149 0.021 101.84);
--accent-foreground: oklch(0.703 0.134 98.562);
--destructive: oklch(0.607 0.242 28.658);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.145 0.018 185.297);
--chart-1: oklch(0.145 0.018 185.297);
--chart-2: oklch(0.121 0.033 322.816);
--chart-3: oklch(0.149 0.021 101.84);
--chart-4: oklch(0.159 0.048 321.693);
--chart-5: oklch(0.146 0.019 185.204);
}