Fresh Material for shadcn/ui

Fresh Material is a shadcn/ui theme built around a green primary color (#b0e260) with muted blue accents (#49515f). The light mode uses a blue-tinted background (#282c34). Dark mode keeps the green primary (#b0e260) on a blue-tinted background (#282c34).

Color palette

TokenLightDark
Background
#282c34darkslategray
#282c34darkslategray
Foreground
#abb2bfdarkgray
#abb2bfdarkgray
Card
#23272edarkslategray
#23272edarkslategray
Card foreground
#b9bfcasilver
#b9bfcasilver
Popover
#21252bdarkslategray
#21252bdarkslategray
Popover foreground
#c8cdd5lightgrey
#c8cdd5lightgrey
Primary
#b0e260darkkhaki
#b0e260darkkhaki
Primary foreground
#090d02black
#090d02black
Secondary
#44532ddarkolivegreen
#44532ddarkolivegreen
Secondary foreground
#dbe4cdgainsboro
#dbe4cdgainsboro
Muted
#31363fdarkslategray
#31363fdarkslategray
Muted foreground
#afb5c0silver
#afb5c0silver
Accent
#49515fdarkslategray
#49515fdarkslategray
Accent foreground
#ebeceflavender
#ebeceflavender
Destructive
#df2016crimson
#df2016crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#393a3cdarkslategray
#393a3cdarkslategray
Input
#404244darkslategray
#404244darkslategray
Ring
#b0e260darkkhaki
#b0e260darkkhaki

Contrast

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

Light mode
Text on background6.57:1AA
Text on card8.10:1AAA
Primary button12.95:1AAA
Secondary button6.35:1AA
Muted text5.89:1AA
Accent6.80:1AA
Destructive4.82:1AA
Dark mode
Text on background6.57:1AA
Text on card8.10:1AAA
Primary button12.95:1AAA
Secondary button6.35:1AA
Muted text5.89:1AA
Accent6.80:1AA
Destructive4.82:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.292 0.016 264.298);
  --foreground: oklch(0.762 0.021 262.984);
  --muted: oklch(0.332 0.017 264.31);
  --muted-foreground: oklch(0.771 0.017 264.466);
  --popover: oklch(0.262 0.013 264.313);
  --popover-foreground: oklch(0.846 0.013 263.02);
  --card: oklch(0.272 0.014 264.308);
  --card-foreground: oklch(0.804 0.017 263.005);
  --border: oklch(0.348 0.004 264.509);
  --input: oklch(0.377 0.005 264.508);
  --primary: oklch(0.851 0.168 127.24);
  --primary-foreground: oklch(0.15 0.027 123.417);
  --secondary: oklch(0.419 0.062 126.073);
  --secondary-foreground: oklch(0.907 0.032 124.169);
  --accent: oklch(0.432 0.026 264.255);
  --accent-foreground: oklch(0.944 0.004 264.536);
  --destructive: oklch(0.578 0.222 29.288);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.851 0.168 127.24);
  --chart-1: oklch(0.851 0.168 127.24);
  --chart-2: oklch(0.419 0.062 126.073);
  --chart-3: oklch(0.432 0.026 264.255);
  --chart-4: oklch(0.453 0.068 126.118);
  --chart-5: oklch(0.857 0.173 127.388);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.292 0.016 264.298);
  --foreground: oklch(0.762 0.021 262.984);
  --muted: oklch(0.332 0.017 264.31);
  --muted-foreground: oklch(0.771 0.017 264.466);
  --popover: oklch(0.262 0.013 264.313);
  --popover-foreground: oklch(0.846 0.013 263.02);
  --card: oklch(0.272 0.014 264.308);
  --card-foreground: oklch(0.804 0.017 263.005);
  --border: oklch(0.348 0.004 264.509);
  --input: oklch(0.377 0.005 264.508);
  --primary: oklch(0.851 0.168 127.24);
  --primary-foreground: oklch(0.15 0.027 123.417);
  --secondary: oklch(0.419 0.062 126.073);
  --secondary-foreground: oklch(0.907 0.032 124.169);
  --accent: oklch(0.432 0.026 264.255);
  --accent-foreground: oklch(0.944 0.004 264.536);
  --destructive: oklch(0.578 0.222 29.288);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.851 0.168 127.24);
  --chart-1: oklch(0.851 0.168 127.24);
  --chart-2: oklch(0.419 0.062 126.073);
  --chart-3: oklch(0.432 0.026 264.255);
  --chart-4: oklch(0.453 0.068 126.118);
  --chart-5: oklch(0.857 0.173 127.388);
}