Sour for shadcn/ui

Sour is a shadcn/ui theme built around a blue primary color (#6e9dd4) with orange accents (#d4a46e). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#6e9dd4) on a blue-tinted background (#03070c).

Color palette

TokenLightDark
Background
#ffffffwhite
#03070cblack
Foreground
#000000black
#f8fafcghostwhite
Card
#fcfcfcsnow
#040a10black
Card foreground
#000000black
#fcfcfdwhite
Popover
#ffffffwhite
#03070cblack
Popover foreground
#000000black
#f8fafcghostwhite
Primary
#6e9dd4cornflowerblue
#6e9dd4cornflowerblue
Primary foreground
#04070cblack
#04070cblack
Secondary
#d4a46edarksalmon
#d4a46edarksalmon
Secondary foreground
#0c0804black
#0c0804black
Muted
#f1ebe4linen
#1b150eblack
Muted foreground
#67645fdimgray
#a09c98darkgray
Accent
#d4a46edarksalmon
#d4a46edarksalmon
Accent foreground
#0c0804black
#0c0804black
Destructive
#bb3d07firebrick
#e24a08orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6e9dd4cornflowerblue
#6e9dd4cornflowerblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.15:1AAA
Secondary button8.86:1AAA
Muted text4.98:1AA
Accent8.86:1AAA
Destructive5.55:1AA
Dark mode
Text on background19.27:1AAA
Text on card19.40:1AAA
Primary button7.15:1AAA
Secondary button8.86:1AAA
Muted text6.64:1AA
Accent8.86:1AAA
Destructive4.02:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.943 0.012 71.34);
  --muted-foreground: oklch(0.504 0.008 71.306);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.685 0.096 252.471);
  --primary-foreground: oklch(0.127 0.014 244.137);
  --secondary: oklch(0.751 0.091 69.458);
  --secondary-foreground: oklch(0.137 0.015 78.301);
  --accent: oklch(0.751 0.091 69.458);
  --accent-foreground: oklch(0.137 0.015 78.301);
  --destructive: oklch(0.537 0.171 38.363);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.685 0.096 252.471);
  --chart-1: oklch(0.685 0.096 252.471);
  --chart-2: oklch(0.751 0.091 69.458);
  --chart-3: oklch(0.751 0.091 69.458);
  --chart-4: oklch(0.771 0.083 69.819);
  --chart-5: oklch(0.684 0.101 252.542);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.016 243.433);
  --foreground: oklch(0.984 0.003 251.474);
  --muted: oklch(0.2 0.017 70.357);
  --muted-foreground: oklch(0.694 0.008 71.356);
  --popover: oklch(0.127 0.016 243.433);
  --popover-foreground: oklch(0.984 0.003 251.474);
  --card: oklch(0.14 0.018 246.609);
  --card-foreground: oklch(0.992 0.001 251.462);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.685 0.096 252.471);
  --primary-foreground: oklch(0.127 0.014 244.137);
  --secondary: oklch(0.751 0.091 69.458);
  --secondary-foreground: oklch(0.137 0.015 78.301);
  --accent: oklch(0.751 0.091 69.458);
  --accent-foreground: oklch(0.137 0.015 78.301);
  --destructive: oklch(0.617 0.199 38.012);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.685 0.096 252.471);
  --chart-1: oklch(0.685 0.096 252.471);
  --chart-2: oklch(0.751 0.091 69.458);
  --chart-3: oklch(0.751 0.091 69.458);
  --chart-4: oklch(0.771 0.083 69.819);
  --chart-5: oklch(0.684 0.101 252.542);
}