Surprised for shadcn/ui

Surprised is a shadcn/ui theme built around a yellow primary color (#adb063) with muted light yellow accents (#ced0b4). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#adb063) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#ffffffwhite
#070703black
Foreground
#0f1005black
#fdfdfcwhite
Card
#fcfcfcsnow
#0a0a05black
Card foreground
#0b0c04black
#ffffffwhite
Popover
#ffffffwhite
#070703black
Popover foreground
#0f1005black
#fdfdfcwhite
Primary
#adb063darkkhaki
#adb063darkkhaki
Primary foreground
#000000black
#000000black
Secondary
#dfdfd2gainsboro
#30302cdarkslategray
Secondary foreground
#4a4b35darkolivegreen
#c9cac4silver
Muted
#eeeee7linen
#181811black
Muted foreground
#4f5044darkslategray
#babbafsilver
Accent
#ced0b4silver
#494a3bdarkslategray
Accent foreground
#31321fdarkslategray
#dfdfd7gainsboro
Destructive
#802000maroon
#ff5319orangered
Destructive foreground
#ffc6b3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#adb063darkkhaki
#adb063darkkhaki

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.22:1AAA
Primary button9.18:1AAA
Secondary button6.65:1AA
Muted text7.04:1AAA
Accent8.28:1AAA
Destructive6.60:1AA
Dark mode
Text on background19.84:1AAA
Text on card19.81:1AAA
Primary button9.18:1AAA
Secondary button8.01:1AAA
Muted text9.18:1AAA
Accent6.77:1AA
Destructive6.49:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.167 0.023 110.904);
  --muted: oklch(0.948 0.01 108.9);
  --muted-foreground: oklch(0.426 0.019 109.517);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.167 0.023 110.904);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.149 0.02 110.596);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.738 0.101 111.127);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.9 0.017 109.066);
  --secondary-foreground: oklch(0.404 0.034 110.233);
  --accent: oklch(0.849 0.038 109.522);
  --accent-foreground: oklch(0.311 0.031 110.507);
  --destructive: oklch(0.397 0.135 36.211);
  --destructive-foreground: oklch(0.872 0.071 39.231);
  --ring: oklch(0.738 0.101 111.127);
  --chart-1: oklch(0.738 0.101 111.127);
  --chart-2: oklch(0.9 0.017 109.066);
  --chart-3: oklch(0.849 0.038 109.522);
  --chart-4: oklch(0.92 0.014 108.988);
  --chart-5: oklch(0.748 0.108 111.275);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.011 109.899);
  --foreground: oklch(0.993 0.001 108.731);
  --muted: oklch(0.206 0.014 109.926);
  --muted-foreground: oklch(0.788 0.016 109.092);
  --popover: oklch(0.125 0.011 109.899);
  --popover-foreground: oklch(0.993 0.001 108.731);
  --card: oklch(0.143 0.013 109.899);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.738 0.101 111.127);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.308 0.008 109.187);
  --secondary-foreground: oklch(0.836 0.008 108.879);
  --accent: oklch(0.402 0.024 109.767);
  --accent-foreground: oklch(0.902 0.011 108.925);
  --destructive: oklch(0.674 0.217 36.546);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.738 0.101 111.127);
  --chart-1: oklch(0.738 0.101 111.127);
  --chart-2: oklch(0.308 0.008 109.187);
  --chart-3: oklch(0.402 0.024 109.767);
  --chart-4: oklch(0.339 0.009 109.203);
  --chart-5: oklch(0.748 0.108 111.275);
}