Decent is a shadcn/ui theme built around a vivid violet primary color (#4310a2) with muted light violet accents (#beb4d0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#4310a2) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #040209black | #f9f8fcghostwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #020104black | #fcfbfdsnow |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #020104black | #fcfbfdsnow |
| Primary | #4310a2indigo | #4310a2indigo |
| Primary foreground | #efe8fdlavender | #efe8fdlavender |
| Secondary | #d7d3dfgainsboro | #28282adarkslategray |
| Secondary foreground | #3d364adarkslategray | #c1c0c4silver |
| Muted | #ddd5ecgainsboro | #1b132ablack |
| Muted foreground | #504e56darkslategray | #aca9b1darkgray |
| Accent | #beb4d0silver | #34303bdarkslategray |
| Accent foreground | #261f32darkslategray | #cdcad3lightgrey |
| Destructive | #a62a07firebrick | #f5410forangered |
| Destructive foreground | #fee8e2mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4310a2indigo | #4310a2indigo |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.63:1 | AAA |
| Text on card | 20.37:1 | AAA |
| Primary button | 9.58:1 | AAA |
| Secondary button | 7.79:1 | AAA |
| Muted text | 5.76:1 | AA |
| Accent | 7.99:1 | AAA |
| Destructive | 6.03:1 | AA |
| Text on background | 19.86:1 | AAA |
| Text on card | 20.04:1 | AAA |
| Primary button | 9.58:1 | AAA |
| Secondary button | 8.15:1 | AAA |
| Muted text | 7.72:1 | AAA |
| Accent | 7.94:1 | AAA |
| Destructive | 3.72:1 | AA Large |
Paste this into your globals.css to use Decent in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.095 0.028 303.154);
--muted: oklch(0.886 0.033 301.634);
--muted-foreground: oklch(0.428 0.014 301.709);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.076 0.022 303.154);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.076 0.022 303.154);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.373 0.202 287.169);
--primary-foreground: oklch(0.942 0.029 301.731);
--secondary: oklch(0.873 0.017 301.903);
--secondary-foreground: oklch(0.347 0.036 300.556);
--accent: oklch(0.786 0.041 301.398);
--accent-foreground: oklch(0.257 0.036 299.977);
--destructive: oklch(0.48 0.166 34.379);
--destructive-foreground: oklch(0.946 0.026 35.95);
--ring: oklch(0.373 0.202 287.169);
--chart-1: oklch(0.373 0.202 287.169);
--chart-2: oklch(0.873 0.017 301.903);
--chart-3: oklch(0.786 0.041 301.398);
--chart-4: oklch(0.899 0.014 301.974);
--chart-5: oklch(0.374 0.206 286.356);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.981 0.006 302.124);
--muted: oklch(0.21 0.046 298.525);
--muted-foreground: oklch(0.741 0.012 301.959);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.99 0.003 302.169);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.99 0.003 302.169);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.373 0.202 287.169);
--primary-foreground: oklch(0.942 0.029 301.731);
--secondary: oklch(0.277 0.005 301.953);
--secondary-foreground: oklch(0.81 0.005 302.111);
--accent: oklch(0.318 0.019 301.251);
--accent-foreground: oklch(0.844 0.014 301.957);
--destructive: oklch(0.64 0.222 34.274);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.373 0.202 287.169);
--chart-1: oklch(0.373 0.202 287.169);
--chart-2: oklch(0.277 0.005 301.953);
--chart-3: oklch(0.318 0.019 301.251);
--chart-4: oklch(0.307 0.005 301.942);
--chart-5: oklch(0.374 0.206 286.356);
}