Graceful for shadcn/ui

Graceful is a shadcn/ui theme built around a violet primary color (#af9ae0) with purple accents (#d29ae0). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#af9ae0) on a violet-tinted background (#06050b).

Color palette

TokenLightDark
Background
#fcfbfewhite
#06050bblack
Foreground
#020104black
#faf9fasnow
Card
#f8f6fdghostwhite
#09060eblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#f8f6fdghostwhite
#09060eblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#af9ae0lightsteelblue
#af9ae0lightsteelblue
Primary foreground
#1c1137midnightblue
#1c1137midnightblue
Secondary
#9aa8e0lightsteelblue
#9aa8e0lightsteelblue
Secondary foreground
#111837midnightblue
#111837midnightblue
Muted
#f1f1f4whitesmoke
#0b0c0eblack
Muted foreground
#4c4e57darkslategray
#a8aab3darkgray
Accent
#d29ae0plum
#d29ae0plum
Accent foreground
#2f1137midnightblue
#2f1137midnightblue
Destructive
#a4230afirebrick
#f23c18orangered
Destructive foreground
#fde7e2mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#af9ae0lightsteelblue
#af9ae0lightsteelblue

Contrast

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

Light mode
Text on background20.14:1AAA
Text on card19.66:1AAA
Primary button7.15:1AAA
Secondary button7.45:1AAA
Muted text7.36:1AAA
Accent7.48:1AAA
Destructive6.27:1AA
Dark mode
Text on background19.35:1AAA
Text on card19.61:1AAA
Primary button7.15:1AAA
Secondary button7.45:1AAA
Muted text8.45:1AAA
Accent7.48:1AAA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.005 299.957);
  --foreground: oklch(0.076 0.02 300.305);
  --muted: oklch(0.959 0.003 274.992);
  --muted-foreground: oklch(0.426 0.015 274.564);
  --popover: oklch(0.978 0.01 299.874);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.978 0.01 299.874);
  --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.729 0.102 297.592);
  --primary-foreground: oklch(0.216 0.071 293.43);
  --secondary: oklch(0.74 0.083 273.372);
  --secondary-foreground: oklch(0.222 0.06 270.368);
  --accent: oklch(0.762 0.115 319.456);
  --accent-foreground: oklch(0.243 0.077 319.176);
  --destructive: oklch(0.47 0.168 32.57);
  --destructive-foreground: oklch(0.944 0.026 31.116);
  --ring: oklch(0.729 0.102 297.592);
  --chart-1: oklch(0.729 0.102 297.592);
  --chart-2: oklch(0.74 0.083 273.372);
  --chart-3: oklch(0.762 0.115 319.456);
  --chart-4: oklch(0.77 0.073 273.673);
  --chart-5: oklch(0.726 0.108 297.43);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.017 300.152);
  --foreground: oklch(0.984 0.002 300.012);
  --muted: oklch(0.154 0.005 274.587);
  --muted-foreground: oklch(0.739 0.013 274.808);
  --popover: oklch(0.132 0.02 299.238);
  --popover-foreground: oklch(0.992 0.001 300.025);
  --card: oklch(0.132 0.02 299.238);
  --card-foreground: oklch(0.992 0.001 300.025);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.729 0.102 297.592);
  --primary-foreground: oklch(0.216 0.071 293.43);
  --secondary: oklch(0.74 0.083 273.372);
  --secondary-foreground: oklch(0.222 0.06 270.368);
  --accent: oklch(0.762 0.115 319.456);
  --accent-foreground: oklch(0.243 0.077 319.176);
  --destructive: oklch(0.63 0.222 32.714);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.729 0.102 297.592);
  --chart-1: oklch(0.729 0.102 297.592);
  --chart-2: oklch(0.74 0.083 273.372);
  --chart-3: oklch(0.762 0.115 319.456);
  --chart-4: oklch(0.77 0.073 273.673);
  --chart-5: oklch(0.726 0.108 297.43);
}