Garb for shadcn/ui

Garb is a shadcn/ui theme built around a light violet primary color (#e4cdf4) with light teal accents (#cdf4e4). The light mode uses a neutral background (#faf7fc). Dark mode keeps the light violet primary (#e4cdf4) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#faf7fcghostwhite
#030104black
Foreground
#030104black
#f8f6f9whitesmoke
Card
#faf7fcghostwhite
#030104black
Card foreground
#030104black
#f8f6f9whitesmoke
Popover
#faf7fcghostwhite
#030104black
Popover foreground
#030104black
#f8f6f9whitesmoke
Primary
#e4cdf4lavender
#e4cdf4lavender
Primary foreground
#4f1a75indigo
#4f1a75indigo
Secondary
#f4e4cdblanchedalmond
#f4e4cdblanchedalmond
Secondary foreground
#211707black
#211707black
Muted
#e9e2d8gainsboro
#272016black
Muted foreground
#685e50dimgray
#afa597darkgray
Accent
#cdf4e4gainsboro
#cdf4e4gainsboro
Accent foreground
#072117black
#072117black
Destructive
#833207saddlebrown
#ed5b0corangered
Destructive foreground
#fcd5c0peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e4cdf4lavender
#e4cdf4lavender

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button8.23:1AAA
Secondary button14.10:1AAA
Muted text4.93:1AA
Accent14.24:1AAA
Destructive6.35:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.34:1AAA
Primary button8.23:1AAA
Secondary button14.10:1AAA
Muted text6.62:1AA
Accent14.24:1AAA
Destructive3.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.007 311.665);
  --foreground: oklch(0.082 0.018 313.542);
  --muted: oklch(0.915 0.016 76.566);
  --muted-foreground: oklch(0.486 0.025 76.293);
  --popover: oklch(0.981 0.007 311.665);
  --popover-foreground: oklch(0.082 0.018 313.542);
  --card: oklch(0.981 0.007 311.665);
  --card-foreground: oklch(0.082 0.018 313.542);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.879 0.058 311.191);
  --primary-foreground: oklch(0.351 0.148 306.715);
  --secondary: oklch(0.925 0.035 76.419);
  --secondary-foreground: oklch(0.212 0.032 74.335);
  --accent: oklch(0.935 0.046 168.195);
  --accent-foreground: oklch(0.226 0.039 163.065);
  --destructive: oklch(0.427 0.122 43.008);
  --destructive-foreground: oklch(0.9 0.052 49.973);
  --ring: oklch(0.879 0.058 311.191);
  --chart-1: oklch(0.879 0.058 311.191);
  --chart-2: oklch(0.925 0.035 76.419);
  --chart-3: oklch(0.935 0.046 168.195);
  --chart-4: oklch(0.944 0.026 76.496);
  --chart-5: oklch(0.877 0.061 311.165);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.082 0.019 313.619);
  --foreground: oklch(0.974 0.005 311.68);
  --muted: oklch(0.249 0.021 75.851);
  --muted-foreground: oklch(0.727 0.023 76.471);
  --popover: oklch(0.082 0.019 313.619);
  --popover-foreground: oklch(0.974 0.005 311.68);
  --card: oklch(0.082 0.019 313.619);
  --card-foreground: oklch(0.974 0.005 311.68);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.879 0.058 311.191);
  --primary-foreground: oklch(0.351 0.148 306.715);
  --secondary: oklch(0.925 0.035 76.419);
  --secondary-foreground: oklch(0.212 0.032 74.335);
  --accent: oklch(0.935 0.046 168.195);
  --accent-foreground: oklch(0.226 0.039 163.065);
  --destructive: oklch(0.655 0.195 41.676);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.879 0.058 311.191);
  --chart-1: oklch(0.879 0.058 311.191);
  --chart-2: oklch(0.925 0.035 76.419);
  --chart-3: oklch(0.935 0.046 168.195);
  --chart-4: oklch(0.944 0.026 76.496);
  --chart-5: oklch(0.877 0.061 311.165);
}