Negative for shadcn/ui

Negative is a shadcn/ui theme built around a muted deep yellow primary color (#2d271b) with muted yellow accents (#cdc4b2). The light mode uses a neutral background (#fdfbf7). Dark mode keeps the muted deep yellow primary (#2d271b) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#fdfbf7snow
#040301black
Foreground
#000000black
#fdfdfbsnow
Card
#fcf9f3floralwhite
#080603black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf9f3floralwhite
#080603black
Popover foreground
#000000black
#ffffffwhite
Primary
#2d271bblack
#2d271bblack
Primary foreground
#cdc2acsilver
#cdc2acsilver
Secondary
#d3cec5lightgrey
#342e23darkslategray
Secondary foreground
#3a352cdarkslategray
#d0c8b9silver
Muted
#eae7e1gainsboro
#1e1b15black
Muted foreground
#676665dimgray
#9a9998darkgray
Accent
#cdc4b2silver
#4d432ddarkolivegreen
Accent foreground
#2e291edarkslategray
#e1daccgainsboro
Destructive
#770909maroon
#ee1717red
Destructive foreground
#fab8b8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2d271bblack
#2d271bblack

Contrast

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

Light mode
Text on background20.30:1AAA
Text on card19.96:1AAA
Primary button8.43:1AAA
Secondary button7.79:1AAA
Muted text4.63:1AA
Accent8.33:1AAA
Destructive6.92:1AA
Dark mode
Text on background20.24:1AAA
Text on card20.25:1AAA
Primary button8.43:1AAA
Secondary button8.08:1AAA
Muted text6.04:1AA
Accent7.03:1AAA
Destructive4.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 84.566);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.928 0.008 84.572);
  --muted-foreground: oklch(0.512 0.002 84.563);
  --popover: oklch(0.983 0.009 84.573);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.009 84.573);
  --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.274 0.022 84.373);
  --primary-foreground: oklch(0.818 0.033 84.585);
  --secondary: oklch(0.854 0.014 84.585);
  --secondary-foreground: oklch(0.332 0.017 84.554);
  --accent: oklch(0.822 0.026 84.592);
  --accent-foreground: oklch(0.283 0.02 84.458);
  --destructive: oklch(0.362 0.141 28.118);
  --destructive-foreground: oklch(0.843 0.077 18.797);
  --ring: oklch(0.274 0.022 84.373);
  --chart-1: oklch(0.274 0.022 84.373);
  --chart-2: oklch(0.854 0.014 84.585);
  --chart-3: oklch(0.822 0.026 84.592);
  --chart-4: oklch(0.876 0.012 84.581);
  --chart-5: oklch(0.276 0.025 84.285);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.01 89.869);
  --foreground: oklch(0.994 0.002 84.556);
  --muted: oklch(0.223 0.011 84.563);
  --muted-foreground: oklch(0.684 0.002 84.559);
  --popover: oklch(0.122 0.012 89.869);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.012 89.869);
  --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.274 0.022 84.373);
  --primary-foreground: oklch(0.818 0.033 84.585);
  --secondary: oklch(0.305 0.021 84.465);
  --secondary-foreground: oklch(0.836 0.023 84.593);
  --accent: oklch(0.386 0.036 84.236);
  --accent-foreground: oklch(0.889 0.021 84.592);
  --destructive: oklch(0.601 0.238 28.472);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.274 0.022 84.373);
  --chart-1: oklch(0.274 0.022 84.373);
  --chart-2: oklch(0.305 0.021 84.465);
  --chart-3: oklch(0.386 0.036 84.236);
  --chart-4: oklch(0.337 0.025 84.448);
  --chart-5: oklch(0.276 0.025 84.285);
}