Derivative for shadcn/ui

Derivative is a shadcn/ui theme built around a deep yellow primary color (#2e260f) with deep violet accents (#260f2e). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep yellow primary (#2e260f) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#151105black
#ffffffwhite
Card
#ffffffwhite
#000000black
Card foreground
#151105black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#151105black
#ffffffwhite
Primary
#2e260fblack
#2e260fblack
Primary foreground
#c2a147peru
#c2a147peru
Secondary
#0f2e26black
#0f2e26black
Secondary foreground
#47c2a1mediumaquamarine
#47c2a1mediumaquamarine
Muted
#d2e4dfgainsboro
#1b2d28darkslategray
Muted foreground
#516761dimgray
#98aea8darkgray
Accent
#260f2eblack
#260f2eblack
Accent foreground
#c894dbplum
#c894dbplum
Destructive
#9d3c0bsaddlebrown
#f17232tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e260fblack
#2e260fblack

Contrast

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

Light mode
Text on background18.84:1AAA
Text on card18.84:1AAA
Primary button6.07:1AA
Secondary button6.60:1AA
Muted text4.60:1AA
Accent7.31:1AAA
Destructive6.80:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.07:1AA
Secondary button6.60:1AA
Muted text6.19:1AA
Accent7.31:1AAA
Destructive7.16:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.177 0.025 91.523);
  --muted: oklch(0.905 0.02 178.133);
  --muted-foreground: oklch(0.493 0.028 177.037);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.177 0.025 91.523);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.177 0.025 91.523);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.271 0.038 89.77);
  --primary-foreground: oklch(0.722 0.115 89.19);
  --secondary: oklch(0.275 0.04 173.209);
  --secondary-foreground: oklch(0.736 0.119 172.048);
  --accent: oklch(0.22 0.064 316.255);
  --accent-foreground: oklch(0.741 0.115 316.809);
  --destructive: oklch(0.485 0.141 41.754);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.271 0.038 89.77);
  --chart-1: oklch(0.271 0.038 89.77);
  --chart-2: oklch(0.275 0.04 173.209);
  --chart-3: oklch(0.22 0.064 316.255);
  --chart-4: oklch(0.315 0.047 172.849);
  --chart-5: oklch(0.273 0.04 89.627);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.278 0.025 175.808);
  --muted-foreground: oklch(0.733 0.026 177.732);
  --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.271 0.038 89.77);
  --primary-foreground: oklch(0.722 0.115 89.19);
  --secondary: oklch(0.275 0.04 173.209);
  --secondary-foreground: oklch(0.736 0.119 172.048);
  --accent: oklch(0.22 0.064 316.255);
  --accent-foreground: oklch(0.741 0.115 316.809);
  --destructive: oklch(0.692 0.174 44.266);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.271 0.038 89.77);
  --chart-1: oklch(0.271 0.038 89.77);
  --chart-2: oklch(0.275 0.04 173.209);
  --chart-3: oklch(0.22 0.064 316.255);
  --chart-4: oklch(0.315 0.047 172.849);
  --chart-5: oklch(0.273 0.04 89.627);
}