Beck for shadcn/ui

Beck is a shadcn/ui theme built around a purple primary color (#721986) with teal accents (#198672). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the purple primary (#721986) on a purple-tinted background (#09050a).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#09050ablack
Foreground
#000000black
#fdfcfdwhite
Card
#faf3fcghostwhite
#0c070eblack
Card foreground
#000000black
#ffffffwhite
Popover
#faf3fcghostwhite
#0c070eblack
Popover foreground
#000000black
#ffffffwhite
Primary
#721986purple
#721986purple
Primary foreground
#f2d8f8lavender
#f2d8f8lavender
Secondary
#867219olive
#867219olive
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecebealinen
#151513black
Muted foreground
#50504edarkslategray
#b1b0afdarkgray
Accent
#198672teal
#198672teal
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#5f1407maroon
#f04a2dtomato
Destructive foreground
#f8ada0lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#721986purple
#721986purple

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.28:1AAA
Primary button7.29:1AAA
Secondary button4.76:1AA
Muted text6.79:1AA
Accent4.49:1AA Large
Destructive7.20:1AAA
Dark mode
Text on background19.75:1AAA
Text on card19.96:1AAA
Primary button7.29:1AAA
Secondary button4.76:1AA
Muted text8.43:1AAA
Accent4.49:1AA Large
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.009 320);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.941 0.002 96.196);
  --muted-foreground: oklch(0.429 0.002 96.228);
  --popover: oklch(0.972 0.014 320.004);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.014 320.004);
  --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.413 0.177 319.251);
  --primary-foreground: oklch(0.914 0.051 320.041);
  --secondary: oklch(0.554 0.105 95.523);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.556 0.098 176.5);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.322 0.11 32.453);
  --destructive-foreground: oklch(0.816 0.091 30.277);
  --ring: oklch(0.413 0.177 319.251);
  --chart-1: oklch(0.413 0.177 319.251);
  --chart-2: oklch(0.554 0.105 95.523);
  --chart-3: oklch(0.556 0.098 176.5);
  --chart-4: oklch(0.592 0.113 95.458);
  --chart-5: oklch(0.416 0.181 319.133);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.016 321.065);
  --foreground: oklch(0.992 0.002 319.993);
  --muted: oklch(0.196 0.003 96.374);
  --muted-foreground: oklch(0.758 0.002 96.196);
  --popover: oklch(0.139 0.018 320.432);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.018 320.432);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.413 0.177 319.251);
  --primary-foreground: oklch(0.914 0.051 320.041);
  --secondary: oklch(0.554 0.105 95.523);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.556 0.098 176.5);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.643 0.207 32.383);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.413 0.177 319.251);
  --chart-1: oklch(0.413 0.177 319.251);
  --chart-2: oklch(0.554 0.105 95.523);
  --chart-3: oklch(0.556 0.098 176.5);
  --chart-4: oklch(0.592 0.113 95.458);
  --chart-5: oklch(0.416 0.181 319.133);
}