Back for shadcn/ui

Back is a shadcn/ui theme built around a vivid green primary color (#409900) with vivid pink accents (#990040). The light mode uses a neutral background (#fafcf8). Dark mode keeps the vivid green primary (#409900) on a neutral background (#050802).

Color palette

TokenLightDark
Background
#fafcf8snow
#050802black
Foreground
#020401black
#f7faf5whitesmoke
Card
#f7faf5whitesmoke
#070c03black
Card foreground
#000000black
#fafbf8snow
Popover
#fafcf8snow
#050802black
Popover foreground
#020401black
#f7faf5whitesmoke
Primary
#409900forestgreen
#409900forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#004099midnightblue
#004099midnightblue
Secondary foreground
#cce1fflavender
#cce1fflavender
Muted
#f0f2f5whitesmoke
#0a0c0fblack
Muted foreground
#4a4a4adarkslategray
#b5b5b5silver
Accent
#990040brown
#990040brown
Accent foreground
#ffcce1mistyrose
#ffcce1mistyrose
Destructive
#9d2301firebrick
#fe4816orangered
Destructive foreground
#ffdbd1bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#409900forestgreen
#409900forestgreen

Contrast

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

Light mode
Text on background19.88:1AAA
Text on card19.93:1AAA
Primary button3.63:1AA Large
Secondary button7.21:1AAA
Muted text7.89:1AAA
Accent6.16:1AA
Destructive6.09:1AA
Dark mode
Text on background19.15:1AAA
Text on card19.02:1AAA
Primary button3.63:1AA Large
Secondary button7.21:1AAA
Muted text9.53:1AAA
Accent6.16:1AA
Destructive3.41:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 131.766);
  --foreground: oklch(0.102 0.021 129.925);
  --muted: oklch(0.96 0.004 256.67);
  --muted-foreground: oklch(0.409 0 190.305);
  --popover: oklch(0.987 0.005 131.766);
  --popover-foreground: oklch(0.102 0.021 129.925);
  --card: oklch(0.981 0.008 131.787);
  --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.604 0.185 137.655);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.397 0.157 259.434);
  --secondary-foreground: oklch(0.904 0.047 256.792);
  --accent: oklch(0.438 0.175 7.685);
  --accent-foreground: oklch(0.896 0.063 351.568);
  --destructive: oklch(0.456 0.163 34.147);
  --destructive-foreground: oklch(0.919 0.042 35.945);
  --ring: oklch(0.604 0.185 137.655);
  --chart-1: oklch(0.604 0.185 137.655);
  --chart-2: oklch(0.397 0.157 259.434);
  --chart-3: oklch(0.438 0.175 7.685);
  --chart-4: oklch(0.424 0.17 259.615);
  --chart-5: oklch(0.61 0.189 137.803);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.02 130.325);
  --foreground: oklch(0.981 0.007 131.78);
  --muted: oklch(0.155 0.007 256.78);
  --muted-foreground: oklch(0.773 0 180);
  --popover: oklch(0.126 0.02 130.325);
  --popover-foreground: oklch(0.981 0.007 131.78);
  --card: oklch(0.144 0.023 130.497);
  --card-foreground: oklch(0.987 0.004 131.761);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.604 0.185 137.655);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.397 0.157 259.434);
  --secondary-foreground: oklch(0.904 0.047 256.792);
  --accent: oklch(0.438 0.175 7.685);
  --accent-foreground: oklch(0.896 0.063 351.568);
  --destructive: oklch(0.661 0.225 34.631);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.604 0.185 137.655);
  --chart-1: oklch(0.604 0.185 137.655);
  --chart-2: oklch(0.397 0.157 259.434);
  --chart-3: oklch(0.438 0.175 7.685);
  --chart-4: oklch(0.424 0.17 259.615);
  --chart-5: oklch(0.61 0.189 137.803);
}