Black for shadcn/ui

Black is a shadcn/ui theme built around a green primary color (#91dd27) with violet accents (#7327dd). The light mode uses a neutral background (#fafdf7). Dark mode keeps the green primary (#91dd27) on a neutral background (#050703).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#050703black
Foreground
#0b1104black
#ffffffwhite
Card
#fafdf7mintcream
#050703black
Card foreground
#0b1104black
#ffffffwhite
Popover
#fafdf7mintcream
#050703black
Popover foreground
#0b1104black
#ffffffwhite
Primary
#91dd27yellowgreen
#91dd27yellowgreen
Primary foreground
#1f3108black
#1f3108black
Secondary
#7327ddblueviolet
#7327ddblueviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ded4edgainsboro
#1d122bblack
Muted foreground
#41394cdarkslategray
#bbb3c6silver
Accent
#7327ddblueviolet
#7327ddblueviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#750e00maroon
#fa1d00red
Destructive foreground
#ffb2a8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#91dd27yellowgreen
#91dd27yellowgreen

Contrast

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

Light mode
Text on background18.68:1AAA
Text on card18.68:1AAA
Primary button8.39:1AAA
Secondary button6.85:1AA
Muted text7.71:1AAA
Accent6.85:1AA
Destructive6.68:1AA
Dark mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button8.39:1AAA
Secondary button6.85:1AA
Muted text8.83:1AAA
Accent6.85:1AA
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.009 125.17);
  --foreground: oklch(0.166 0.03 126.025);
  --muted: oklch(0.886 0.035 304.501);
  --muted-foreground: oklch(0.36 0.033 303.769);
  --popover: oklch(0.991 0.009 125.17);
  --popover-foreground: oklch(0.166 0.03 126.025);
  --card: oklch(0.991 0.009 125.17);
  --card-foreground: oklch(0.166 0.03 126.025);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.818 0.212 130.886);
  --primary-foreground: oklch(0.286 0.067 129.508);
  --secondary: oklch(0.5 0.247 294.094);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.5 0.247 294.094);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.361 0.138 31.661);
  --destructive-foreground: oklch(0.835 0.091 27.548);
  --ring: oklch(0.818 0.212 130.886);
  --chart-1: oklch(0.818 0.212 130.886);
  --chart-2: oklch(0.5 0.247 294.094);
  --chart-3: oklch(0.5 0.247 294.094);
  --chart-4: oklch(0.523 0.238 295.832);
  --chart-5: oklch(0.827 0.217 131.122);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.016 124.376);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.211 0.048 301.613);
  --muted-foreground: oklch(0.78 0.027 304.561);
  --popover: oklch(0.126 0.016 124.376);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.126 0.016 124.376);
  --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.818 0.212 130.886);
  --primary-foreground: oklch(0.286 0.067 129.508);
  --secondary: oklch(0.5 0.247 294.094);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.5 0.247 294.094);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.626 0.247 30.543);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.818 0.212 130.886);
  --chart-1: oklch(0.818 0.212 130.886);
  --chart-2: oklch(0.5 0.247 294.094);
  --chart-3: oklch(0.5 0.247 294.094);
  --chart-4: oklch(0.523 0.238 295.832);
  --chart-5: oklch(0.827 0.217 131.122);
}