Dutiful for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button7.90:1AAA
Secondary button10.60:1AAA
Muted text5.76:1AA
Accent6.09:1AA
Destructive6.92:1AA
Dark mode
Text on background18.97:1AAA
Text on card18.97:1AAA
Primary button7.90:1AAA
Secondary button10.60:1AAA
Muted text8.12:1AAA
Accent6.09:1AA
Destructive4.40:1AA Large

CSS variables

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);
}