Tile for shadcn/ui

Tile is a shadcn/ui theme built around a green primary color (#1c9c31) with muted light green accents (#c1d7c5). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the green primary (#1c9c31) on a green-tinted background (#050b06).

Color palette

TokenLightDark
Background
#f7fdf8mintcream
#050b06black
Foreground
#010902black
#f9fafaghostwhite
Card
#f7fdf8mintcream
#050b06black
Card foreground
#010902black
#f9fafaghostwhite
Popover
#f7fdf8mintcream
#050b06black
Popover foreground
#010902black
#f9fafaghostwhite
Primary
#1c9c31forestgreen
#1c9c31forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e1eae3gainsboro
#172118black
Secondary foreground
#405944darkslategray
#a7c3acdarkgray
Muted
#e1eae3gainsboro
#151e17black
Muted foreground
#505e52dimgray
#a1afa4darkgray
Accent
#c1d7c5lightgrey
#254129darkslategray
Accent foreground
#283e2cdarkslategray
#bedac2silver
Destructive
#980906darkred
#dc0d09red
Destructive foreground
#fdd4d3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1c9c31forestgreen
#1c9c31forestgreen

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button3.58:1AA Large
Secondary button6.24:1AA
Muted text5.56:1AA
Accent7.60:1AAA
Destructive6.55:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.03:1AAA
Primary button3.58:1AA Large
Secondary button8.68:1AAA
Muted text7.48:1AAA
Accent7.47:1AAA
Destructive5.10:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.01 150.686);
  --foreground: oklch(0.125 0.028 149.438);
  --muted: oklch(0.928 0.013 150.635);
  --muted-foreground: oklch(0.465 0.025 150.053);
  --popover: oklch(0.988 0.01 150.686);
  --popover-foreground: oklch(0.125 0.028 149.438);
  --card: oklch(0.988 0.01 150.686);
  --card-foreground: oklch(0.125 0.028 149.438);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.606 0.18 144.931);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.928 0.013 150.635);
  --secondary-foreground: oklch(0.437 0.045 149.313);
  --accent: oklch(0.858 0.035 150.247);
  --accent-foreground: oklch(0.34 0.043 148.902);
  --destructive: oklch(0.43 0.171 28.985);
  --destructive-foreground: oklch(0.904 0.047 19.199);
  --ring: oklch(0.606 0.18 144.931);
  --chart-1: oklch(0.606 0.18 144.931);
  --chart-2: oklch(0.928 0.013 150.635);
  --chart-3: oklch(0.858 0.035 150.247);
  --chart-4: oklch(0.949 0.009 150.694);
  --chart-5: oklch(0.613 0.185 144.755);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.017 150.096);
  --foreground: oklch(0.985 0.002 150.797);
  --muted: oklch(0.223 0.018 149.669);
  --muted-foreground: oklch(0.74 0.023 150.397);
  --popover: oklch(0.138 0.017 150.096);
  --popover-foreground: oklch(0.985 0.002 150.797);
  --card: oklch(0.138 0.017 150.096);
  --card-foreground: oklch(0.985 0.002 150.797);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.606 0.18 144.931);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.236 0.023 149.408);
  --secondary-foreground: oklch(0.79 0.045 150.017);
  --accent: oklch(0.346 0.054 148.393);
  --accent-foreground: oklch(0.862 0.045 150.09);
  --destructive: oklch(0.565 0.228 29.08);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.606 0.18 144.931);
  --chart-1: oklch(0.606 0.18 144.931);
  --chart-2: oklch(0.236 0.023 149.408);
  --chart-3: oklch(0.346 0.054 148.393);
  --chart-4: oklch(0.271 0.028 149.3);
  --chart-5: oklch(0.613 0.185 144.755);
}