Shack for shadcn/ui

Shack is a shadcn/ui theme built around a vivid light violet primary color (#d099f4) with muted light violet accents (#e6e1ea). The light mode uses a neutral background (#faf8fc). Dark mode keeps the vivid light violet primary (#d099f4) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#030203black
Foreground
#030104black
#faf9fbghostwhite
Card
#f8f4fawhitesmoke
#050407black
Card foreground
#000000black
#fdfcfdwhite
Popover
#f8f4fawhitesmoke
#050407black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#d099f4plum
#d099f4plum
Primary foreground
#350953midnightblue
#350953midnightblue
Secondary
#e6e1ealavender
#2c2631darkslategray
Secondary foreground
#4f4059darkslategray
#c6bdccsilver
Muted
#f0ecf4whitesmoke
#100b13black
Muted foreground
#51435bdarkslategray
#b2a4bcdarkgray
Accent
#e6e1ealavender
#2c2631darkslategray
Accent foreground
#4f4059darkslategray
#c6bdccsilver
Destructive
#7a190bmaroon
#ed4e35tomato
Destructive foreground
#f9c5bdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d099f4plum
#d099f4plum

Contrast

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

Light mode
Text on background19.69:1AAA
Text on card19.35:1AAA
Primary button7.28:1AAA
Secondary button7.40:1AAA
Muted text7.81:1AAA
Accent7.40:1AAA
Destructive6.96:1AA
Dark mode
Text on background19.75:1AAA
Text on card20.01:1AAA
Primary button7.28:1AAA
Secondary button8.09:1AAA
Muted text8.25:1AAA
Accent8.09:1AAA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.006 312.313);
  --foreground: oklch(0.079 0.024 314.905);
  --muted: oklch(0.948 0.011 312.27);
  --muted-foreground: oklch(0.408 0.043 311.575);
  --popover: oklch(0.973 0.009 312.289);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.973 0.009 312.289);
  --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.769 0.138 310.973);
  --primary-foreground: oklch(0.267 0.123 306.497);
  --secondary: oklch(0.917 0.012 312.26);
  --secondary-foreground: oklch(0.398 0.044 311.523);
  --accent: oklch(0.917 0.012 312.26);
  --accent-foreground: oklch(0.398 0.044 311.523);
  --destructive: oklch(0.381 0.133 31.638);
  --destructive-foreground: oklch(0.868 0.061 28.454);
  --ring: oklch(0.769 0.138 310.973);
  --chart-1: oklch(0.769 0.138 310.973);
  --chart-2: oklch(0.917 0.012 312.26);
  --chart-3: oklch(0.917 0.012 312.26);
  --chart-4: oklch(0.942 0.008 312.291);
  --chart-5: oklch(0.767 0.143 310.913);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.009 313.278);
  --foreground: oklch(0.984 0.002 312.342);
  --muted: oklch(0.162 0.017 311.555);
  --muted-foreground: oklch(0.739 0.037 311.986);
  --popover: oklch(0.109 0.012 313.278);
  --popover-foreground: oklch(0.992 0.001 312.35);
  --card: oklch(0.109 0.012 313.278);
  --card-foreground: oklch(0.992 0.001 312.35);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.769 0.138 310.973);
  --primary-foreground: oklch(0.267 0.123 306.497);
  --secondary: oklch(0.28 0.022 311.763);
  --secondary-foreground: oklch(0.81 0.023 312.144);
  --accent: oklch(0.28 0.022 311.763);
  --accent-foreground: oklch(0.81 0.023 312.144);
  --destructive: oklch(0.642 0.2 31.534);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.769 0.138 310.973);
  --chart-1: oklch(0.769 0.138 310.973);
  --chart-2: oklch(0.28 0.022 311.763);
  --chart-3: oklch(0.28 0.022 311.763);
  --chart-4: oklch(0.309 0.026 311.739);
  --chart-5: oklch(0.767 0.143 310.913);
}