Dutiful is a shadcn/ui theme built around a vivid light violet primary color (#f9f2fd) with vivid light purple accents (#fdf2fb). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid light violet primary (#f9f2fd) on a neutral background (#060307).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfewhite | #060307black |
| Foreground | #0d0212black | #f8f5fawhitesmoke |
| Card | #fdfbfewhite | #060307black |
| Card foreground | #0d0212black | #f8f5fawhitesmoke |
| Popover | #fdfbfewhite | #060307black |
| Popover foreground | #0d0212black | #f8f5fawhitesmoke |
| Primary | #f9f2fdghostwhite | #f9f2fdghostwhite |
| Primary foreground | #7417a6rebeccapurple | #7417a6rebeccapurple |
| Secondary | #f3f2fdaliceblue | #f3f2fdaliceblue |
| Secondary foreground | #2c17a6indigo | #2c17a6indigo |
| Muted | #dcdaecgainsboro | #161325black |
| Muted foreground | #515152darkslategray | #adadaedarkgray |
| Accent | #fdf2fblavenderblush | #fdf2fblavenderblush |
| Accent foreground | #a61791mediumvioletred | #a61791mediumvioletred |
| Destructive | #87130ddarkred | #ea251acrimson |
| Destructive foreground | #faceccpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f9f2fdghostwhite | #f9f2fdghostwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.72:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 10.60:1 | AAA |
| Muted text | 5.76:1 | AA |
| Accent | 6.09:1 | AA |
| Destructive | 6.92:1 | AA |
| Text on background | 18.97:1 | AAA |
| Text on card | 18.97:1 | AAA |
| Primary button | 7.90:1 | AAA |
| Secondary button | 10.60:1 | AAA |
| Muted text | 8.12:1 | AAA |
| Accent | 6.09:1 | AA |
| Destructive | 4.40:1 | AA Large |
Paste this into your globals.css to use Dutiful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 314.197);
--foreground: oklch(0.127 0.043 314.707);
--muted: oklch(0.895 0.025 292.772);
--muted-foreground: oklch(0.435 0.003 293.191);
--popover: oklch(0.99 0.004 314.197);
--popover-foreground: oklch(0.127 0.043 314.707);
--card: oklch(0.99 0.004 314.197);
--card-foreground: oklch(0.127 0.043 314.707);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.969 0.017 314.121);
--primary-foreground: oklch(0.441 0.207 309.062);
--secondary: oklch(0.964 0.016 293.002);
--secondary-foreground: oklch(0.362 0.206 275.434);
--accent: oklch(0.972 0.018 330.483);
--accent-foreground: oklch(0.503 0.21 335.786);
--destructive: oklch(0.402 0.151 29.099);
--destructive-foreground: oklch(0.889 0.05 21.678);
--ring: oklch(0.969 0.017 314.121);
--chart-1: oklch(0.969 0.017 314.121);
--chart-2: oklch(0.964 0.016 293.002);
--chart-3: oklch(0.972 0.018 330.483);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.969 0.018 314.117);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.108 0.016 315.495);
--foreground: oklch(0.973 0.008 314.173);
--muted: oklch(0.199 0.037 289.53);
--muted-foreground: oklch(0.747 0.002 293.248);
--popover: oklch(0.108 0.016 315.495);
--popover-foreground: oklch(0.973 0.008 314.173);
--card: oklch(0.108 0.016 315.495);
--card-foreground: oklch(0.973 0.008 314.173);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.969 0.017 314.121);
--primary-foreground: oklch(0.441 0.207 309.062);
--secondary: oklch(0.964 0.016 293.002);
--secondary-foreground: oklch(0.362 0.206 275.434);
--accent: oklch(0.972 0.018 330.483);
--accent-foreground: oklch(0.503 0.21 335.786);
--destructive: oklch(0.601 0.229 29.217);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.969 0.017 314.121);
--chart-1: oklch(0.969 0.017 314.121);
--chart-2: oklch(0.964 0.016 293.002);
--chart-3: oklch(0.972 0.018 330.483);
--chart-4: oklch(1 0 180);
--chart-5: oklch(0.969 0.018 314.117);
}