Caramel for shadcn/ui

Caramel is a shadcn/ui theme built around a deep indigo primary color (#211e57) with deep green accents (#1e5721). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the deep indigo primary (#211e57) on an indigo-tinted background (#05040b).

Color palette

TokenLightDark
Background
#fcfbfdsnow
#05040bblack
Foreground
#070614black
#fcfcfdwhite
Card
#fcfbfdsnow
#05040bblack
Card foreground
#070614black
#fcfcfdwhite
Popover
#fcfbfdsnow
#05040bblack
Popover foreground
#070614black
#fcfcfdwhite
Primary
#211e57midnightblue
#211e57midnightblue
Primary foreground
#c1bfe8lightsteelblue
#c1bfe8lightsteelblue
Secondary
#57211emaroon
#57211emaroon
Secondary foreground
#e8c1bflightpink
#e8c1bflightpink
Muted
#f4f1f1whitesmoke
#0e0b0bblack
Muted foreground
#554f4edarkslategray
#b1aaaadarkgray
Accent
#1e5721darkgreen
#1e5721darkgreen
Accent foreground
#bfe8c1lightgrey
#bfe8c1lightgrey
Destructive
#e33702orangered
#fd5826tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#211e57midnightblue
#211e57midnightblue

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button8.52:1AAA
Secondary button7.79:1AAA
Muted text7.13:1AAA
Accent6.37:1AA
Destructive4.36:1AA Large
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button8.52:1AAA
Secondary button7.79:1AAA
Muted text8.57:1AAA
Accent6.37:1AA
Destructive6.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 288.66);
  --foreground: oklch(0.133 0.031 284.231);
  --muted: oklch(0.96 0.003 20.934);
  --muted-foreground: oklch(0.432 0.008 21.137);
  --popover: oklch(0.99 0.003 288.66);
  --popover-foreground: oklch(0.133 0.031 284.231);
  --card: oklch(0.99 0.003 288.66);
  --card-foreground: oklch(0.133 0.031 284.231);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.278 0.099 280.087);
  --primary-foreground: oklch(0.82 0.058 287.333);
  --secondary: oklch(0.327 0.08 25.485);
  --secondary-foreground: oklch(0.844 0.045 21.636);
  --accent: oklch(0.405 0.103 144.208);
  --accent-foreground: oklch(0.892 0.069 146.289);
  --destructive: oklch(0.6 0.214 34.147);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.278 0.099 280.087);
  --chart-1: oklch(0.278 0.099 280.087);
  --chart-2: oklch(0.327 0.08 25.485);
  --chart-3: oklch(0.405 0.103 144.208);
  --chart-4: oklch(0.355 0.089 25.618);
  --chart-5: oklch(0.275 0.104 279.279);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.115 0.019 286.11);
  --foreground: oklch(0.992 0.001 288.695);
  --muted: oklch(0.155 0.005 21.363);
  --muted-foreground: oklch(0.745 0.007 21.012);
  --popover: oklch(0.115 0.019 286.11);
  --popover-foreground: oklch(0.992 0.001 288.695);
  --card: oklch(0.115 0.019 286.11);
  --card-foreground: oklch(0.992 0.001 288.695);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.278 0.099 280.087);
  --primary-foreground: oklch(0.82 0.058 287.333);
  --secondary: oklch(0.327 0.08 25.485);
  --secondary-foreground: oklch(0.844 0.045 21.636);
  --accent: oklch(0.405 0.103 144.208);
  --accent-foreground: oklch(0.892 0.069 146.289);
  --destructive: oklch(0.677 0.209 36.395);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.278 0.099 280.087);
  --chart-1: oklch(0.278 0.099 280.087);
  --chart-2: oklch(0.327 0.08 25.485);
  --chart-3: oklch(0.405 0.103 144.208);
  --chart-4: oklch(0.355 0.089 25.618);
  --chart-5: oklch(0.275 0.104 279.279);
}