Grass for shadcn/ui

Grass is a shadcn/ui theme built around a vivid indigo primary color (#1402d4) with muted light indigo accents (#d3d3da). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the vivid indigo primary (#1402d4) on a neutral background (#010104).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#010104black
Foreground
#000000black
#f9f9fbghostwhite
Card
#f8f7fdghostwhite
#010104black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#f8f7fdghostwhite
#010104black
Popover foreground
#000000black
#f9f9fbghostwhite
Primary
#1402d4mediumblue
#1402d4mediumblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d3d3dalightgrey
#1f1e2ablack
Secondary foreground
#393843darkslategray
#b3b1c8silver
Muted
#dfdfe7gainsboro
#191820black
Muted foreground
#504e65dimgray
#9c9ab1darkgray
Accent
#d3d3dalightgrey
#1f1e2ablack
Accent foreground
#393843darkslategray
#b3b1c8silver
Destructive
#d93c02orangered
#fd4908orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1402d4mediumblue
#1402d4mediumblue

Contrast

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

Light mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button10.55:1AAA
Secondary button7.72:1AAA
Muted text6.04:1AA
Accent7.72:1AAA
Destructive4.57:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button10.55:1AAA
Secondary button7.89:1AAA
Muted text6.44:1AA
Accent7.89:1AAA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 290.111);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.906 0.011 290.009);
  --muted-foreground: oklch(0.434 0.038 288.522);
  --popover: oklch(0.979 0.007 290.111);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 290.111);
  --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.398 0.269 266.251);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.868 0.01 290.028);
  --secondary-foreground: oklch(0.345 0.019 289.178);
  --accent: oklch(0.868 0.01 290.028);
  --accent-foreground: oklch(0.345 0.019 289.178);
  --destructive: oklch(0.587 0.201 35.713);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.398 0.269 266.251);
  --chart-1: oklch(0.398 0.269 266.251);
  --chart-2: oklch(0.868 0.01 290.028);
  --chart-3: oklch(0.868 0.01 290.028);
  --chart-4: oklch(0.893 0.008 290.076);
  --chart-5: oklch(0.401 0.273 265.797);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.075 0.018 286.861);
  --foreground: oklch(0.983 0.002 290.205);
  --muted: oklch(0.213 0.016 288.736);
  --muted-foreground: oklch(0.696 0.034 289.316);
  --popover: oklch(0.075 0.018 286.861);
  --popover-foreground: oklch(0.983 0.002 290.205);
  --card: oklch(0.075 0.018 286.861);
  --card-foreground: oklch(0.983 0.002 290.205);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.398 0.269 266.251);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.24 0.023 288.349);
  --secondary-foreground: oklch(0.77 0.032 289.454);
  --accent: oklch(0.24 0.023 288.349);
  --accent-foreground: oklch(0.77 0.032 289.454);
  --destructive: oklch(0.66 0.224 35.89);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.398 0.269 266.251);
  --chart-1: oklch(0.398 0.269 266.251);
  --chart-2: oklch(0.24 0.023 288.349);
  --chart-3: oklch(0.24 0.023 288.349);
  --chart-4: oklch(0.268 0.027 288.232);
  --chart-5: oklch(0.401 0.273 265.797);
}