Refusal is a shadcn/ui theme built around a blue primary color (#3a416e) with violet accents (#4d3a6e). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#3a416e) on a blue-tinted background (#040610).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040610black |
| Foreground | #04050cblack | #ffffffwhite |
| Card | #ffffffwhite | #040610black |
| Card foreground | #04050cblack | #ffffffwhite |
| Popover | #ffffffwhite | #040610black |
| Popover foreground | #04050cblack | #ffffffwhite |
| Primary | #3a416edarkslateblue | #3a416edarkslateblue |
| Primary foreground | #e8e9f3lavender | #e8e9f3lavender |
| Secondary | #3a5b6edarkslategray | #3a5b6edarkslategray |
| Secondary foreground | #e8eff3lavender | #e8eff3lavender |
| Muted | #d5dadcgainsboro | #23272adarkslategray |
| Muted foreground | #515b61dimgray | #9ea8aedarkgray |
| Accent | #4d3a6edarkslateblue | #4d3a6edarkslateblue |
| Accent foreground | #ece8f3lavender | #ece8f3lavender |
| Destructive | #6b1306maroon | #f33012orangered |
| Destructive foreground | #fab3a8lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3a416edarkslateblue | #3a416edarkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.34:1 | AAA |
| Text on card | 20.34:1 | AAA |
| Primary button | 8.03:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 4.92:1 | AA |
| Accent | 8.09:1 | AAA |
| Destructive | 7.03:1 | AAA |
| Text on background | 20.23:1 | AAA |
| Text on card | 20.23:1 | AAA |
| Primary button | 8.03:1 | AAA |
| Secondary button | 6.21:1 | AA |
| Muted text | 6.20:1 | AA |
| Accent | 8.09:1 | AAA |
| Destructive | 4.02:1 | AA Large |
Paste this into your globals.css to use Refusal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.116 0.018 273.849);
--muted: oklch(0.885 0.006 232.673);
--muted-foreground: oklch(0.466 0.016 233.098);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.116 0.018 273.849);
--card: oklch(1 0 180);
--card-foreground: oklch(0.116 0.018 273.849);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.391 0.077 275.63);
--primary-foreground: oklch(0.936 0.013 279.129);
--secondary: oklch(0.454 0.05 234.802);
--secondary-foreground: oklch(0.947 0.009 232.719);
--accent: oklch(0.394 0.088 299.265);
--accent-foreground: oklch(0.936 0.015 302.678);
--destructive: oklch(0.344 0.123 31.787);
--destructive-foreground: oklch(0.831 0.086 28.809);
--ring: oklch(0.391 0.077 275.63);
--chart-1: oklch(0.391 0.077 275.63);
--chart-2: oklch(0.454 0.05 234.802);
--chart-3: oklch(0.394 0.088 299.265);
--chart-4: oklch(0.482 0.053 234.838);
--chart-5: oklch(0.387 0.084 275.139);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.026 272.762);
--foreground: oklch(1 0 180);
--muted: oklch(0.27 0.008 233.013);
--muted-foreground: oklch(0.725 0.014 232.867);
--popover: oklch(0.125 0.026 272.762);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.125 0.026 272.762);
--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.391 0.077 275.63);
--primary-foreground: oklch(0.936 0.013 279.129);
--secondary: oklch(0.454 0.05 234.802);
--secondary-foreground: oklch(0.947 0.009 232.719);
--accent: oklch(0.394 0.088 299.265);
--accent-foreground: oklch(0.936 0.015 302.678);
--destructive: oklch(0.622 0.231 31.386);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.391 0.077 275.63);
--chart-1: oklch(0.391 0.077 275.63);
--chart-2: oklch(0.454 0.05 234.802);
--chart-3: oklch(0.394 0.088 299.265);
--chart-4: oklch(0.482 0.053 234.838);
--chart-5: oklch(0.387 0.084 275.139);
}