blackyello for shadcn/ui

blackyello is a shadcn/ui theme built around a deep green primary color (#2f320b) with muted light green accents (#dadbc7). The light mode uses a neutral background (#fbfcf8). Dark mode keeps the deep green primary (#2f320b) on a neutral background (#060704).

Color palette

TokenLightDark
Background
#fbfcf8snow
#060704black
Foreground
#040401black
#ffffffwhite
Card
#fbfcf8snow
#060704black
Card foreground
#040401black
#ffffffwhite
Popover
#fbfcf8snow
#060704black
Popover foreground
#040401black
#ffffffwhite
Primary
#2f320bblack
#2f320bblack
Primary foreground
#c5d237yellowgreen
#c5d237yellowgreen
Secondary
#e2e3d9gainsboro
#323423darkslategray
Secondary foreground
#4e503adarkolivegreen
#cecfb9silver
Muted
#f0f0ealinen
#15150fblack
Muted foreground
#696a5cdimgray
#a1a395darkgray
Accent
#dadbc7lightgrey
#4a4d2edarkolivegreen
Accent foreground
#42442cdarkslategray
#dfe0ccgainsboro
Destructive
#bc0b0bfirebrick
#f22626crimson
Destructive foreground
#fffafasnow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f320bblack
#2f320bblack

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button8.01:1AAA
Secondary button6.41:1AA
Muted text4.81:1AA
Accent7.13:1AAA
Destructive6.36:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button8.01:1AAA
Secondary button8.05:1AAA
Muted text7.14:1AAA
Accent6.59:1AA
Destructive4.12:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 110.328);
  --foreground: oklch(0.107 0.018 112.068);
  --muted: oklch(0.954 0.009 110.414);
  --muted-foreground: oklch(0.52 0.021 111.002);
  --popover: oklch(0.989 0.004 110.328);
  --popover-foreground: oklch(0.107 0.018 112.068);
  --card: oklch(0.989 0.004 110.328);
  --card-foreground: oklch(0.107 0.018 112.068);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.304 0.057 113.862);
  --primary-foreground: oklch(0.827 0.169 114.321);
  --secondary: oklch(0.913 0.014 110.537);
  --secondary-foreground: oklch(0.423 0.035 111.752);
  --accent: oklch(0.885 0.027 110.815);
  --accent-foreground: oklch(0.379 0.039 112.145);
  --destructive: oklch(0.503 0.201 28.71);
  --destructive-foreground: oklch(0.989 0.005 17.239);
  --ring: oklch(0.304 0.057 113.862);
  --chart-1: oklch(0.304 0.057 113.862);
  --chart-2: oklch(0.913 0.014 110.537);
  --chart-3: oklch(0.885 0.027 110.815);
  --chart-4: oklch(0.933 0.011 110.465);
  --chart-5: oklch(0.308 0.059 113.968);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.01 111.165);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.193 0.012 111.432);
  --muted-foreground: oklch(0.709 0.02 110.765);
  --popover: oklch(0.124 0.01 111.165);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.01 111.165);
  --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.304 0.057 113.862);
  --primary-foreground: oklch(0.827 0.169 114.321);
  --secondary: oklch(0.317 0.028 111.853);
  --secondary-foreground: oklch(0.849 0.03 110.906);
  --accent: oklch(0.408 0.047 112.375);
  --accent-foreground: oklch(0.901 0.027 110.809);
  --destructive: oklch(0.618 0.234 27.648);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.304 0.057 113.862);
  --chart-1: oklch(0.304 0.057 113.862);
  --chart-2: oklch(0.317 0.028 111.853);
  --chart-3: oklch(0.408 0.047 112.375);
  --chart-4: oklch(0.351 0.032 111.903);
  --chart-5: oklch(0.308 0.059 113.968);
}