Grace for shadcn/ui

Grace is a shadcn/ui theme built around a light violet primary color (#c8b9da) with light green accents (#cbdab9). The light mode uses a neutral background (#faf8fc). Dark mode keeps the light violet primary (#c8b9da) on a neutral background (#050208).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#050208black
Foreground
#0c0416black
#fcfbfdsnow
Card
#faf8fcghostwhite
#050208black
Card foreground
#0c0416black
#fcfbfdsnow
Popover
#faf8fcghostwhite
#050208black
Popover foreground
#0c0416black
#fcfbfdsnow
Primary
#c8b9dathistle
#c8b9dathistle
Primary foreground
#2f213fdarkslategray
#2f213fdarkslategray
Secondary
#cbdab9lightgrey
#cbdab9lightgrey
Secondary foreground
#313f21darkslategray
#313f21darkslategray
Muted
#f2f6efwhitesmoke
#0d1009black
Muted foreground
#616161dimgray
#9e9e9edarkgray
Accent
#cbdab9lightgrey
#cbdab9lightgrey
Accent foreground
#313f21darkslategray
#313f21darkslategray
Destructive
#871008darkred
#ec1d0ered
Destructive foreground
#fcc9c5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c8b9dathistle
#c8b9dathistle

Contrast

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

Light mode
Text on background19.01:1AAA
Text on card19.01:1AAA
Primary button8.08:1AAA
Secondary button7.65:1AAA
Muted text5.65:1AA
Accent7.65:1AAA
Destructive6.78:1AA
Dark mode
Text on background19.97:1AAA
Text on card19.97:1AAA
Primary button8.08:1AAA
Secondary button7.65:1AAA
Muted text7.14:1AAA
Accent7.65:1AAA
Destructive4.42:1AA Large

CSS variables

Paste this into your globals.css to use Grace in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 307.036);
  --foreground: oklch(0.135 0.042 305.087);
  --muted: oklch(0.968 0.01 127.235);
  --muted-foreground: oklch(0.492 0 180);
  --popover: oklch(0.981 0.006 307.036);
  --popover-foreground: oklch(0.135 0.042 305.087);
  --card: oklch(0.981 0.006 307.036);
  --card-foreground: oklch(0.135 0.042 305.087);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.809 0.049 306.372);
  --primary-foreground: oklch(0.281 0.056 304.53);
  --secondary: oklch(0.868 0.048 127.804);
  --secondary-foreground: oklch(0.348 0.052 129.202);
  --accent: oklch(0.868 0.048 127.804);
  --accent-foreground: oklch(0.348 0.052 129.202);
  --destructive: oklch(0.4 0.153 29.709);
  --destructive-foreground: oklch(0.879 0.058 23.073);
  --ring: oklch(0.809 0.049 306.372);
  --chart-1: oklch(0.809 0.049 306.372);
  --chart-2: oklch(0.868 0.048 127.804);
  --chart-3: oklch(0.868 0.048 127.804);
  --chart-4: oklch(0.887 0.041 127.687);
  --chart-5: oklch(0.806 0.054 306.297);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.023 308.648);
  --foreground: oklch(0.991 0.003 307.078);
  --muted: oklch(0.168 0.015 128.219);
  --muted-foreground: oklch(0.7 0 180);
  --popover: oklch(0.101 0.023 308.648);
  --popover-foreground: oklch(0.991 0.003 307.078);
  --card: oklch(0.101 0.023 308.648);
  --card-foreground: oklch(0.991 0.003 307.078);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.809 0.049 306.372);
  --primary-foreground: oklch(0.281 0.056 304.53);
  --secondary: oklch(0.868 0.048 127.804);
  --secondary-foreground: oklch(0.348 0.052 129.202);
  --accent: oklch(0.868 0.048 127.804);
  --accent-foreground: oklch(0.348 0.052 129.202);
  --destructive: oklch(0.601 0.235 29.755);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.809 0.049 306.372);
  --chart-1: oklch(0.809 0.049 306.372);
  --chart-2: oklch(0.868 0.048 127.804);
  --chart-3: oklch(0.868 0.048 127.804);
  --chart-4: oklch(0.887 0.041 127.687);
  --chart-5: oklch(0.806 0.054 306.297);
}