Subset for shadcn/ui

Subset is a shadcn/ui theme built around a light yellow primary color (#f0f0bc) with muted yellow accents (#c7c7a8). The light mode uses a neutral background (#fefefb). Dark mode keeps the light yellow primary (#f0f0bc) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefefbwhite
#000000black
Foreground
#040401black
#ffffffwhite
Card
#fefefbwhite
#000000black
Card foreground
#040401black
#ffffffwhite
Popover
#fefefbwhite
#000000black
Popover foreground
#040401black
#ffffffwhite
Primary
#f0f0bcpalegoldenrod
#f0f0bcpalegoldenrod
Primary foreground
#111104black
#111104black
Secondary
#d4d4c4lightgrey
#1f1f1ablack
Secondary foreground
#3b3b2bdarkslategray
#bcbcaesilver
Muted
#e9e9ceantiquewhite
#313116darkslategray
Muted foreground
#5c5c4ddimgray
#b2b2a3darkgray
Accent
#c7c7a8silver
#363626darkslategray
Accent foreground
#252518black
#d1d1bdlightgrey
Destructive
#a01d03darkred
#fa360forangered
Destructive foreground
#feded7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f0f0bcpalegoldenrod
#f0f0bcpalegoldenrod

Contrast

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

Light mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button16.17:1AAA
Secondary button7.56:1AAA
Muted text5.47:1AA
Accent8.99:1AAA
Destructive6.22:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button16.17:1AAA
Secondary button8.66:1AAA
Muted text6.19:1AA
Accent7.90:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 106.454);
  --foreground: oklch(0.106 0.016 108.863);
  --muted: oklch(0.926 0.035 107.063);
  --muted-foreground: oklch(0.469 0.024 107.276);
  --popover: oklch(0.995 0.003 106.454);
  --popover-foreground: oklch(0.106 0.016 108.863);
  --card: oklch(0.995 0.003 106.454);
  --card-foreground: oklch(0.106 0.016 108.863);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.942 0.067 107.611);
  --primary-foreground: oklch(0.171 0.027 108.898);
  --secondary: oklch(0.865 0.021 106.825);
  --secondary-foreground: oklch(0.346 0.025 107.656);
  --accent: oklch(0.822 0.043 107.299);
  --accent-foreground: oklch(0.262 0.024 107.931);
  --destructive: oklch(0.457 0.169 32.38);
  --destructive-foreground: oklch(0.924 0.037 31.174);
  --ring: oklch(0.942 0.067 107.611);
  --chart-1: oklch(0.942 0.067 107.611);
  --chart-2: oklch(0.865 0.021 106.825);
  --chart-3: oklch(0.822 0.043 107.299);
  --chart-4: oklch(0.885 0.018 106.752);
  --chart-5: oklch(0.945 0.07 107.659);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.306 0.042 108.67);
  --muted-foreground: oklch(0.761 0.021 106.891);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.942 0.067 107.611);
  --primary-foreground: oklch(0.171 0.027 108.898);
  --secondary: oklch(0.236 0.009 107.099);
  --secondary-foreground: oklch(0.791 0.018 106.814);
  --accent: oklch(0.328 0.028 107.827);
  --accent-foreground: oklch(0.855 0.027 106.963);
  --destructive: oklch(0.64 0.234 32.32);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.942 0.067 107.611);
  --chart-1: oklch(0.942 0.067 107.611);
  --chart-2: oklch(0.236 0.009 107.099);
  --chart-3: oklch(0.328 0.028 107.827);
  --chart-4: oklch(0.27 0.012 107.148);
  --chart-5: oklch(0.945 0.07 107.659);
}