A Theme 2 for shadcn/ui

A Theme 2 is a shadcn/ui theme built around a vivid green primary color (#dafb59) with vivid green accents (#dafb59). The light mode uses a neutral background (#f7f9fb). Dark mode keeps the vivid green primary (#baff66) on a blue-tinted background (#1b1e27).

Color palette

TokenLightDark
Background
#f7f9fbghostwhite
#1b1e27black
Foreground
#1b1e27black
#ffffffwhite
Card
#ffffffwhite
#23262fdarkslategray
Card foreground
#1b1e27black
#ffffffwhite
Popover
#ffffffwhite
#23262fdarkslategray
Popover foreground
#09090bblack
#fafafasnow
Primary
#dafb59khaki
#baff66greenyellow
Primary foreground
#23262fdarkslategray
#23262fdarkslategray
Secondary
#6179facornflowerblue
#6179facornflowerblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f2f3f9whitesmoke
#353535darkslategray
Muted foreground
#71717adimgray
#a0acc3darkgray
Accent
#dafb59khaki
#dafb59khaki
Accent foreground
#23262fdarkslategray
#23262fdarkslategray
Destructive
#ff665btomato
#ff665btomato
Destructive foreground
#ffffffwhite
#fafafasnow
Border
#ebecedlavender
#2c313fdarkslategray
Input
#ebecedlavender
#2c313fdarkslategray
Ring
#1b1e27black
#dafb59khaki

Contrast

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

Light mode
Text on background15.77:1AAA
Text on card16.64:1AAA
Primary button12.89:1AAA
Secondary button3.73:1AA Large
Muted text4.36:1AA Large
Accent12.89:1AAA
Destructive2.87:1Fail
Dark mode
Text on background16.64:1AAA
Text on card15.10:1AAA
Primary button12.65:1AAA
Secondary button3.73:1AA Large
Muted text5.36:1AA
Accent12.89:1AAA
Destructive2.75:1Fail

CSS variables

Paste this into your globals.css to use A Theme 2 in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.003 247.858);
  --foreground: oklch(0.236 0.018 270.549);
  --muted: oklch(0.965 0.008 278.638);
  --muted-foreground: oklch(0.552 0.014 285.942);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.141 0.004 285.824);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.236 0.018 270.549);
  --border: oklch(0.943 0.002 247.84);
  --input: oklch(0.942 0.002 271.388);
  --primary: oklch(0.935 0.186 120.027);
  --primary-foreground: oklch(0.27 0.017 270.7);
  --secondary: oklch(0.625 0.193 271.765);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.935 0.186 120.027);
  --accent-foreground: oklch(0.27 0.017 270.7);
  --destructive: oklch(0.703 0.189 27.095);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.236 0.018 270.549);
  --chart-1: oklch(0.935 0.186 120.027);
  --chart-2: oklch(0.625 0.193 271.765);
  --chart-3: oklch(0.935 0.186 120.027);
  --chart-4: oklch(0.658 0.174 272.812);
  --chart-5: oklch(0.941 0.191 120.135);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.236 0.018 270.549);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.329 0 180);
  --muted-foreground: oklch(0.743 0.036 263.519);
  --popover: oklch(0.27 0.017 270.7);
  --popover-foreground: oklch(0.985 0 180);
  --card: oklch(0.27 0.017 270.7);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.314 0.026 270.452);
  --input: oklch(0.314 0.026 269.507);
  --primary: oklch(0.924 0.195 129.996);
  --primary-foreground: oklch(0.27 0.017 270.7);
  --secondary: oklch(0.625 0.193 271.765);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.935 0.186 120.027);
  --accent-foreground: oklch(0.27 0.017 270.7);
  --destructive: oklch(0.703 0.189 27.095);
  --destructive-foreground: oklch(0.985 0 180);
  --ring: oklch(0.935 0.186 120.027);
  --chart-1: oklch(0.924 0.195 129.996);
  --chart-2: oklch(0.625 0.193 271.765);
  --chart-3: oklch(0.935 0.186 120.027);
  --chart-4: oklch(0.658 0.174 272.812);
  --chart-5: oklch(0.929 0.2 130.101);
}