Altar for shadcn/ui

Altar is a shadcn/ui theme built around a vivid green primary color (#7df285) with vivid red accents (#f2857d). The light mode uses a neutral background (#f7fcf8). Dark mode keeps the vivid green primary (#7df285) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fcf8mintcream
#000000black
Foreground
#041505black
#ffffffwhite
Card
#f7fcf8mintcream
#000000black
Card foreground
#041505black
#ffffffwhite
Popover
#f7fcf8mintcream
#000000black
Popover foreground
#041505black
#ffffffwhite
Primary
#7df285lightgreen
#7df285lightgreen
Primary foreground
#063809darkgreen
#063809darkgreen
Secondary
#857df2mediumslateblue
#857df2mediumslateblue
Secondary foreground
#000000black
#000000black
Muted
#e2e1eagainsboro
#16151eblack
Muted foreground
#484752darkslategray
#aeadb8darkgray
Accent
#f2857dlightcoral
#f2857dlightcoral
Accent foreground
#380906black
#380906black
Destructive
#742206maroon
#f46434tomato
Destructive foreground
#fbc4b1lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7df285lightgreen
#7df285lightgreen

Contrast

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

Light mode
Text on background18.21:1AAA
Text on card18.21:1AAA
Primary button9.46:1AAA
Secondary button6.21:1AA
Muted text7.03:1AAA
Accent6.96:1AA
Destructive6.90:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button9.46:1AAA
Secondary button6.21:1AA
Muted text8.17:1AAA
Accent6.96:1AA
Destructive6.71:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.008 147.463);
  --foreground: oklch(0.176 0.041 145.315);
  --muted: oklch(0.913 0.012 289.223);
  --muted-foreground: oklch(0.403 0.018 288.632);
  --popover: oklch(0.987 0.008 147.463);
  --popover-foreground: oklch(0.176 0.041 145.315);
  --card: oklch(0.987 0.008 147.463);
  --card-foreground: oklch(0.176 0.041 145.315);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.868 0.182 145.133);
  --primary-foreground: oklch(0.297 0.09 143.75);
  --secondary: oklch(0.652 0.17 283.641);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.734 0.135 25.154);
  --accent-foreground: oklch(0.227 0.075 29.213);
  --destructive: oklch(0.379 0.121 36.82);
  --destructive-foreground: oklch(0.864 0.068 39.234);
  --ring: oklch(0.868 0.182 145.133);
  --chart-1: oklch(0.868 0.182 145.133);
  --chart-2: oklch(0.652 0.17 283.641);
  --chart-3: oklch(0.734 0.135 25.154);
  --chart-4: oklch(0.688 0.151 284.732);
  --chart-5: oklch(0.872 0.188 145.056);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.2 0.018 287.685);
  --muted-foreground: oklch(0.752 0.015 289.097);
  --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.868 0.182 145.133);
  --primary-foreground: oklch(0.297 0.09 143.75);
  --secondary: oklch(0.652 0.17 283.641);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.734 0.135 25.154);
  --accent-foreground: oklch(0.227 0.075 29.213);
  --destructive: oklch(0.679 0.188 38.107);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.868 0.182 145.133);
  --chart-1: oklch(0.868 0.182 145.133);
  --chart-2: oklch(0.652 0.17 283.641);
  --chart-3: oklch(0.734 0.135 25.154);
  --chart-4: oklch(0.688 0.151 284.732);
  --chart-5: oklch(0.872 0.188 145.056);
}