Diction is a shadcn/ui theme built around a deep violet primary color (#3e145d) with deep teal accents (#145d3e). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#3e145d) on a neutral background (#030104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030104black |
| Foreground | #0c0212black | #fdfbfdsnow |
| Card | #fcfcfcsnow | #060208black |
| Card foreground | #09020eblack | #ffffffwhite |
| Popover | #ffffffwhite | #030104black |
| Popover foreground | #0c0212black | #fdfbfdsnow |
| Primary | #3e145dmidnightblue | #3e145dmidnightblue |
| Primary foreground | #d6b3efthistle | #d6b3efthistle |
| Secondary | #5d3e14saddlebrown | #5d3e14saddlebrown |
| Secondary foreground | #efd6b3wheat | #efd6b3wheat |
| Muted | #e7e1dagainsboro | #252018black |
| Muted foreground | #43403ddarkslategray | #c2c0bcsilver |
| Accent | #145d3edarkslategray | #145d3edarkslategray |
| Accent foreground | #b3efd6powderblue | #b3efd6powderblue |
| Destructive | #c52f11firebrick | #d83413firebrick |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3e145dmidnightblue | #3e145dmidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.32:1 | AAA |
| Text on card | 20.01:1 | AAA |
| Primary button | 7.91:1 | AAA |
| Secondary button | 6.90:1 | AA |
| Muted text | 7.95:1 | AAA |
| Accent | 6.12:1 | AA |
| Destructive | 5.53:1 | AA |
| Text on background | 20.19:1 | AAA |
| Text on card | 20.58:1 | AAA |
| Primary button | 7.91:1 | AAA |
| Secondary button | 6.90:1 | AA |
| Muted text | 8.92:1 | AAA |
| Accent | 6.12:1 | AA |
| Destructive | 4.76:1 | AA |
Paste this into your globals.css to use Diction in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.124 0.044 311.946);
--muted: oklch(0.913 0.012 76.59);
--muted-foreground: oklch(0.374 0.007 76.552);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.124 0.044 311.946);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.112 0.038 313.747);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.3 0.124 306.924);
--primary-foreground: oklch(0.818 0.09 310.833);
--secondary: oklch(0.391 0.071 71.684);
--secondary-foreground: oklch(0.888 0.054 76.194);
--accent: oklch(0.425 0.086 160.556);
--accent-foreground: oklch(0.905 0.069 167.271);
--destructive: oklch(0.541 0.19 32.715);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.3 0.124 306.924);
--chart-1: oklch(0.3 0.124 306.924);
--chart-2: oklch(0.391 0.071 71.684);
--chart-3: oklch(0.425 0.086 160.556);
--chart-4: oklch(0.426 0.078 71.438);
--chart-5: oklch(0.3 0.128 306.587);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.019 313.619);
--foreground: oklch(0.991 0.003 311.7);
--muted: oklch(0.246 0.016 76.141);
--muted-foreground: oklch(0.808 0.006 76.618);
--popover: oklch(0.082 0.019 313.619);
--popover-foreground: oklch(0.991 0.003 311.7);
--card: oklch(0.103 0.024 313.619);
--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.3 0.124 306.924);
--primary-foreground: oklch(0.818 0.09 310.833);
--secondary: oklch(0.391 0.071 71.684);
--secondary-foreground: oklch(0.888 0.054 76.194);
--accent: oklch(0.425 0.086 160.556);
--accent-foreground: oklch(0.905 0.069 167.271);
--destructive: oklch(0.578 0.205 32.67);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.3 0.124 306.924);
--chart-1: oklch(0.3 0.124 306.924);
--chart-2: oklch(0.391 0.071 71.684);
--chart-3: oklch(0.425 0.086 160.556);
--chart-4: oklch(0.426 0.078 71.438);
--chart-5: oklch(0.3 0.128 306.587);
}