Corduroy is a shadcn/ui theme built around a yellow primary color (#cbcd65) with indigo accents (#6765cd). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the yellow primary (#cbcd65) on a yellow-tinted background (#0a0a05).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdfcwhite | #0a0a05black |
| Foreground | #040501black | #f8f8f6whitesmoke |
| Card | #fdfdfcwhite | #0a0a05black |
| Card foreground | #040501black | #f8f8f6whitesmoke |
| Popover | #fdfdfcwhite | #0a0a05black |
| Popover foreground | #040501black | #f8f8f6whitesmoke |
| Primary | #cbcd65darkkhaki | #cbcd65darkkhaki |
| Primary foreground | #000000black | #000000black |
| Secondary | #6765cdslateblue | #6765cdslateblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dddde9gainsboro | #161622black |
| Muted foreground | #56565ddimgray | #a2a2a9darkgray |
| Accent | #6765cdslateblue | #6765cdslateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9d3002saddlebrown | #e84702orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #cbcd65darkkhaki | #cbcd65darkkhaki |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.12:1 | AAA |
| Text on card | 20.12:1 | AAA |
| Primary button | 12.46:1 | AAA |
| Secondary button | 4.86:1 | AA |
| Muted text | 5.40:1 | AA |
| Accent | 4.86:1 | AA |
| Destructive | 7.37:1 | AAA |
| Text on background | 18.64:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 12.46:1 | AAA |
| Secondary button | 4.86:1 | AA |
| Muted text | 7.05:1 | AAA |
| Accent | 4.86:1 | AA |
| Destructive | 3.92:1 | AA Large |
Paste this into your globals.css to use Corduroy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 107.209);
--foreground: oklch(0.108 0.019 109.821);
--muted: oklch(0.901 0.016 286.842);
--muted-foreground: oklch(0.455 0.011 286.699);
--popover: oklch(0.994 0.002 107.209);
--popover-foreground: oklch(0.108 0.019 109.821);
--card: oklch(0.994 0.002 107.209);
--card-foreground: oklch(0.108 0.019 109.821);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.826 0.128 109.755);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.561 0.157 280.836);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.561 0.157 280.836);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.469 0.151 38.289);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.826 0.128 109.755);
--chart-1: oklch(0.826 0.128 109.755);
--chart-2: oklch(0.561 0.157 280.836);
--chart-3: oklch(0.561 0.157 280.836);
--chart-4: oklch(0.594 0.144 281.838);
--chart-5: oklch(0.834 0.133 109.841);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.143 0.012 108.528);
--foreground: oklch(0.98 0.003 107.218);
--muted: oklch(0.207 0.023 284.943);
--muted-foreground: oklch(0.715 0.01 286.905);
--popover: oklch(0.143 0.012 108.528);
--popover-foreground: oklch(0.98 0.003 107.218);
--card: oklch(0.143 0.012 108.528);
--card-foreground: oklch(0.98 0.003 107.218);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.826 0.128 109.755);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.561 0.157 280.836);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.561 0.157 280.836);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.624 0.207 37.306);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.826 0.128 109.755);
--chart-1: oklch(0.826 0.128 109.755);
--chart-2: oklch(0.561 0.157 280.836);
--chart-3: oklch(0.561 0.157 280.836);
--chart-4: oklch(0.594 0.144 281.838);
--chart-5: oklch(0.834 0.133 109.841);
}