Anchored for shadcn/ui

Anchored is a shadcn/ui theme built around a green primary color (#2bda53) with teal accents (#2bdaab). The light mode uses a neutral background (#fbfefc). Dark mode keeps the green primary (#2bda53) on a neutral background (#020804).

Color palette

TokenLightDark
Background
#fbfefcwhite
#020804black
Foreground
#010903black
#f4faf6whitesmoke
Card
#fbfefcwhite
#020804black
Card foreground
#010903black
#f4faf6whitesmoke
Popover
#fbfefcwhite
#020804black
Popover foreground
#010903black
#f4faf6whitesmoke
Primary
#2bda53limegreen
#2bda53limegreen
Primary foreground
#083012black
#083012black
Secondary
#59da2blimegreen
#59da2blimegreen
Secondary foreground
#133008black
#133008black
Muted
#d4e4celightgrey
#21311bdarkslategray
Muted foreground
#4e594adarkslategray
#aab5a6darkgray
Accent
#2bdaablightseagreen
#2bdaablightseagreen
Accent foreground
#083025black
#083025black
Destructive
#c6240cfirebrick
#f4563etomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2bda53limegreen
#2bda53limegreen

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button7.77:1AAA
Secondary button7.86:1AAA
Muted text5.52:1AA
Accent7.99:1AAA
Destructive5.75:1AA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button7.77:1AAA
Secondary button7.86:1AAA
Muted text6.46:1AA
Accent7.99:1AAA
Destructive6.25:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 153.161);
  --foreground: oklch(0.125 0.026 152.262);
  --muted: oklch(0.9 0.034 137.281);
  --muted-foreground: oklch(0.45 0.027 137.339);
  --popover: oklch(0.994 0.005 153.161);
  --popover-foreground: oklch(0.125 0.026 152.262);
  --card: oklch(0.994 0.005 153.161);
  --card-foreground: oklch(0.125 0.026 152.262);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.776 0.223 146.244);
  --primary-foreground: oklch(0.272 0.069 147.621);
  --secondary: oklch(0.784 0.233 139.288);
  --secondary-foreground: oklch(0.275 0.073 138.575);
  --accent: oklch(0.792 0.15 169.188);
  --accent-foreground: oklch(0.278 0.047 171.31);
  --destructive: oklch(0.533 0.199 31.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.776 0.223 146.244);
  --chart-1: oklch(0.776 0.223 146.244);
  --chart-2: oklch(0.784 0.233 139.288);
  --chart-3: oklch(0.792 0.15 169.188);
  --chart-4: oklch(0.794 0.225 138.955);
  --chart-5: oklch(0.785 0.229 146.018);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.019 152.525);
  --foreground: oklch(0.98 0.008 153.099);
  --muted: oklch(0.293 0.044 137.66);
  --muted-foreground: oklch(0.76 0.024 137.264);
  --popover: oklch(0.123 0.019 152.525);
  --popover-foreground: oklch(0.98 0.008 153.099);
  --card: oklch(0.123 0.019 152.525);
  --card-foreground: oklch(0.98 0.008 153.099);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.776 0.223 146.244);
  --primary-foreground: oklch(0.272 0.069 147.621);
  --secondary: oklch(0.784 0.233 139.288);
  --secondary-foreground: oklch(0.275 0.073 138.575);
  --accent: oklch(0.792 0.15 169.188);
  --accent-foreground: oklch(0.278 0.047 171.31);
  --destructive: oklch(0.663 0.197 31.405);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.776 0.223 146.244);
  --chart-1: oklch(0.776 0.223 146.244);
  --chart-2: oklch(0.784 0.233 139.288);
  --chart-3: oklch(0.792 0.15 169.188);
  --chart-4: oklch(0.794 0.225 138.955);
  --chart-5: oklch(0.785 0.229 146.018);
}