Berry for shadcn/ui

Berry is a shadcn/ui theme built around a purple primary color (#c662bc) with pink accents (#c6628a). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#c662bc) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fefbfewhite
#030203black
Foreground
#000000black
#f9f6f8whitesmoke
Card
#fdf7fcsnow
#070306black
Card foreground
#000000black
#fbf9fbsnow
Popover
#fefbfewhite
#030203black
Popover foreground
#000000black
#f9f6f8whitesmoke
Primary
#c662bcmediumorchid
#c662bcmediumorchid
Primary foreground
#000000black
#000000black
Secondary
#9e62c6mediumpurple
#9e62c6mediumpurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f3f1f4whitesmoke
#0d0b0eblack
Muted foreground
#524e55darkslategray
#aeaab1darkgray
Accent
#c6628apalevioletred
#c6628apalevioletred
Accent foreground
#000000black
#000000black
Destructive
#b91c13firebrick
#e7271dcrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c662bcmediumorchid
#c662bcmediumorchid

Contrast

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

Light mode
Text on background20.42:1AAA
Text on card19.86:1AAA
Primary button5.86:1AA
Secondary button4.19:1AA Large
Muted text7.22:1AAA
Accent5.50:1AA
Destructive6.50:1AA
Dark mode
Text on background19.30:1AAA
Text on card19.52:1AAA
Primary button5.86:1AA
Secondary button4.19:1AA Large
Muted text8.56:1AAA
Accent5.50:1AA
Destructive4.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 328.648);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.959 0.005 312.32);
  --muted-foreground: oklch(0.431 0.012 312.156);
  --popover: oklch(0.991 0.005 328.648);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.01 328.704);
  --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.646 0.169 331.216);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.603 0.158 310.173);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.626 0.135 356.478);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.504 0.191 29.178);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.646 0.169 331.216);
  --chart-1: oklch(0.646 0.169 331.216);
  --chart-2: oklch(0.603 0.158 310.173);
  --chart-3: oklch(0.626 0.135 356.478);
  --chart-4: oklch(0.63 0.147 310.479);
  --chart-5: oklch(0.647 0.179 331.355);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.011 329.31);
  --foreground: oklch(0.976 0.004 328.642);
  --muted: oklch(0.154 0.008 311.989);
  --muted-foreground: oklch(0.744 0.01 312.256);
  --popover: oklch(0.089 0.011 329.31);
  --popover-foreground: oklch(0.976 0.004 328.642);
  --card: oklch(0.112 0.013 329.31);
  --card-foreground: oklch(0.984 0.003 328.626);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.646 0.169 331.216);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.603 0.158 310.173);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.626 0.135 356.478);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.597 0.225 29.126);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.646 0.169 331.216);
  --chart-1: oklch(0.646 0.169 331.216);
  --chart-2: oklch(0.603 0.158 310.173);
  --chart-3: oklch(0.626 0.135 356.478);
  --chart-4: oklch(0.63 0.147 310.479);
  --chart-5: oklch(0.647 0.179 331.355);
}