Conventional is a shadcn/ui theme built around a yellow primary color (#7e6020) with blue accents (#203e7e). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#7e6020) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fefdfbsnow | #000000black |
| Foreground | #050301black | #ffffffwhite |
| Card | #fcfbf7snow | #030303black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcfbf7snow | #030303black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #7e6020saddlebrown | #7e6020saddlebrown |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #203e7emidnightblue | #203e7emidnightblue |
| Secondary foreground | #dbe3f6lavender | #dbe3f6lavender |
| Muted | #ecedeewhitesmoke | #111113black |
| Muted foreground | #49505fdarkslategray | #a0a7b6darkgray |
| Accent | #203e7emidnightblue | #203e7emidnightblue |
| Accent foreground | #dbe3f6lavender | #dbe3f6lavender |
| Destructive | #91250dsaddlebrown | #ed5735tomato |
| Destructive foreground | #fbdcd5mistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7e6020saddlebrown | #7e6020saddlebrown |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.23:1 | AAA |
| Text on card | 20.27:1 | AAA |
| Primary button | 5.86:1 | AA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 6.88:1 | AA |
| Accent | 7.96:1 | AAA |
| Destructive | 6.56:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 5.86:1 | AA |
| Secondary button | 7.96:1 | AAA |
| Muted text | 7.79:1 | AAA |
| Accent | 7.96:1 | AAA |
| Destructive | 6.03:1 | AA |
Paste this into your globals.css to use Conventional in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 86.016);
--foreground: oklch(0.101 0.016 93.727);
--muted: oklch(0.945 0.002 265.995);
--muted-foreground: oklch(0.431 0.026 265.622);
--popover: oklch(0.988 0.005 86.026);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.988 0.005 86.026);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.507 0.088 83.154);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.379 0.114 263.298);
--secondary-foreground: oklch(0.915 0.027 265.85);
--accent: oklch(0.379 0.114 263.298);
--accent-foreground: oklch(0.915 0.027 265.85);
--destructive: oklch(0.437 0.148 33.581);
--destructive-foreground: oklch(0.918 0.036 32.722);
--ring: oklch(0.507 0.088 83.154);
--chart-1: oklch(0.507 0.088 83.154);
--chart-2: oklch(0.379 0.114 263.298);
--chart-3: oklch(0.379 0.114 263.298);
--chart-4: oklch(0.403 0.123 263.264);
--chart-5: oklch(0.512 0.091 82.78);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.179 0.004 265.902);
--muted-foreground: oklch(0.727 0.023 265.835);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.092 0 180);
--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.507 0.088 83.154);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.379 0.114 263.298);
--secondary-foreground: oklch(0.915 0.027 265.85);
--accent: oklch(0.379 0.114 263.298);
--accent-foreground: oklch(0.915 0.027 265.85);
--destructive: oklch(0.653 0.192 34.12);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.507 0.088 83.154);
--chart-1: oklch(0.507 0.088 83.154);
--chart-2: oklch(0.379 0.114 263.298);
--chart-3: oklch(0.379 0.114 263.298);
--chart-4: oklch(0.403 0.123 263.264);
--chart-5: oklch(0.512 0.091 82.78);
}