Caliber for shadcn/ui

Caliber is a shadcn/ui theme built around a deep yellow primary color (#4b3911) with deep violet accents (#39114b). The light mode uses a neutral background (#fefdfb). Dark mode keeps the deep yellow primary (#4b3911) on a yellow-tinted background (#0b0905).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0b0905black
Foreground
#000000black
#fbfaf9snow
Card
#fefdfbsnow
#0b0905black
Card foreground
#000000black
#fbfaf9snow
Popover
#fefdfbsnow
#0b0905black
Popover foreground
#000000black
#fbfaf9snow
Primary
#4b3911darkolivegreen
#4b3911darkolivegreen
Primary foreground
#ead4a4wheat
#ead4a4wheat
Secondary
#114b39darkslategray
#114b39darkslategray
Secondary foreground
#a4ead4powderblue
#a4ead4powderblue
Muted
#d6e6e1gainsboro
#192924black
Muted foreground
#42524ddarkslategray
#adbdb8silver
Accent
#39114bmidnightblue
#39114bmidnightblue
Accent foreground
#d4a4eaplum
#d4a4eaplum
Destructive
#8b2304darkred
#f93f06orangered
Destructive foreground
#fdd1c3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4b3911darkolivegreen
#4b3911darkolivegreen

Contrast

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

Light mode
Text on background20.65:1AAA
Text on card20.65:1AAA
Primary button7.68:1AAA
Secondary button7.34:1AAA
Muted text6.38:1AA
Accent7.61:1AAA
Destructive6.42:1AA
Dark mode
Text on background19.12:1AAA
Text on card19.12:1AAA
Primary button7.68:1AAA
Secondary button7.34:1AAA
Muted text7.73:1AAA
Accent7.61:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 86.018);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.911 0.019 174.996);
  --muted-foreground: oklch(0.423 0.022 173.997);
  --popover: oklch(0.994 0.003 86.018);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.003 86.018);
  --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.354 0.061 83.412);
  --primary-foreground: oklch(0.876 0.068 85.983);
  --secondary: oklch(0.37 0.067 167.44);
  --secondary-foreground: oklch(0.885 0.077 172.731);
  --accent: oklch(0.273 0.105 312.892);
  --accent-foreground: oklch(0.786 0.111 314.818);
  --destructive: oklch(0.423 0.144 35.31);
  --destructive-foreground: oklch(0.895 0.054 37.592);
  --ring: oklch(0.354 0.061 83.412);
  --chart-1: oklch(0.354 0.061 83.412);
  --chart-2: oklch(0.37 0.067 167.44);
  --chart-3: oklch(0.273 0.105 312.892);
  --chart-4: oklch(0.411 0.075 167.17);
  --chart-5: oklch(0.357 0.063 83.09);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.011 90.027);
  --foreground: oklch(0.986 0.002 86.016);
  --muted: oklch(0.266 0.024 172.566);
  --muted-foreground: oklch(0.785 0.019 174.881);
  --popover: oklch(0.139 0.011 90.027);
  --popover-foreground: oklch(0.986 0.002 86.016);
  --card: oklch(0.139 0.011 90.027);
  --card-foreground: oklch(0.986 0.002 86.016);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.354 0.061 83.412);
  --primary-foreground: oklch(0.876 0.068 85.983);
  --secondary: oklch(0.37 0.067 167.44);
  --secondary-foreground: oklch(0.885 0.077 172.731);
  --accent: oklch(0.273 0.105 312.892);
  --accent-foreground: oklch(0.786 0.111 314.818);
  --destructive: oklch(0.644 0.228 34.286);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.354 0.061 83.412);
  --chart-1: oklch(0.354 0.061 83.412);
  --chart-2: oklch(0.37 0.067 167.44);
  --chart-3: oklch(0.273 0.105 312.892);
  --chart-4: oklch(0.411 0.075 167.17);
  --chart-5: oklch(0.357 0.063 83.09);
}