Impartial for shadcn/ui

Impartial is a shadcn/ui theme built around a yellow primary color (#c2ba66) with green accents (#9cc266). The light mode uses a neutral background (#fbfbf8). Dark mode keeps the yellow primary (#c2ba66) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fbfbf8snow
#070703black
Foreground
#000000black
#ffffffwhite
Card
#fbfbf8snow
#070703black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfbf8snow
#070703black
Popover foreground
#000000black
#ffffffwhite
Primary
#c2ba66darkkhaki
#c2ba66darkkhaki
Primary foreground
#000000black
#000000black
Secondary
#c28c66peru
#c28c66peru
Secondary foreground
#000000black
#000000black
Muted
#f3efedlinen
#120f0cblack
Muted foreground
#706157dimgray
#a8998frosybrown
Accent
#9cc266darkkhaki
#9cc266darkkhaki
Accent foreground
#000000black
#000000black
Destructive
#5c250amaroon
#ea7134tomato
Destructive foreground
#f5bea3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c2ba66darkkhaki
#c2ba66darkkhaki

Contrast

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

Light mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button10.53:1AAA
Secondary button7.24:1AAA
Muted text5.19:1AA
Accent10.30:1AAA
Destructive7.38:1AAA
Dark mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button10.53:1AAA
Secondary button7.24:1AAA
Muted text6.93:1AA
Accent10.30:1AAA
Destructive6.87:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 102.275);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.955 0.005 58.291);
  --muted-foreground: oklch(0.505 0.026 57.647);
  --popover: oklch(0.988 0.004 102.275);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.004 102.275);
  --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.778 0.107 103.982);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.684 0.084 56.338);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.765 0.128 127.721);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.341 0.089 43.699);
  --destructive-foreground: oklch(0.845 0.074 47.826);
  --ring: oklch(0.778 0.107 103.982);
  --chart-1: oklch(0.778 0.107 103.982);
  --chart-2: oklch(0.684 0.084 56.338);
  --chart-3: oklch(0.765 0.128 127.721);
  --chart-4: oklch(0.707 0.078 56.627);
  --chart-5: oklch(0.786 0.113 104.025);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.013 104.675);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.171 0.008 57.743);
  --muted-foreground: oklch(0.694 0.024 57.888);
  --popover: oklch(0.127 0.013 104.675);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.127 0.013 104.675);
  --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.778 0.107 103.982);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.684 0.084 56.338);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.765 0.128 127.721);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.681 0.167 44.542);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.778 0.107 103.982);
  --chart-1: oklch(0.778 0.107 103.982);
  --chart-2: oklch(0.684 0.084 56.338);
  --chart-3: oklch(0.765 0.128 127.721);
  --chart-4: oklch(0.707 0.078 56.627);
  --chart-5: oklch(0.786 0.113 104.025);
}