Cushion for shadcn/ui

Cushion is a shadcn/ui theme built around a vivid deep green primary color (#051301) with vivid deep green accents (#011306). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep green primary (#051301) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#020401black
#f6faf4whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#020401black
#f6faf4whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#020401black
#f6faf4whitesmoke
Primary
#051301black
#051301black
Primary foreground
#38d40climegreen
#38d40climegreen
Secondary
#0e1301black
#0e1301black
Secondary foreground
#9bd40cyellowgreen
#9bd40cyellowgreen
Muted
#eeefecwhitesmoke
#121310black
Muted foreground
#54574cdarkolivegreen
#b0b3a8darkgray
Accent
#011306black
#011306black
Accent foreground
#0cd445limegreen
#0cd445limegreen
Destructive
#9f1404darkred
#f91f06red
Destructive foreground
#fedbd7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#051301black
#051301black

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button9.61:1AAA
Secondary button10.60:1AAA
Muted text6.37:1AA
Accent9.56:1AAA
Destructive6.33:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button9.61:1AAA
Secondary button10.60:1AAA
Muted text8.72:1AAA
Accent9.56:1AAA
Destructive4.03:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.015 137.355);
  --muted: oklch(0.949 0.004 119.375);
  --muted-foreground: oklch(0.451 0.019 120.015);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.015 137.355);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.098 0.015 137.355);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.168 0.046 137.026);
  --primary-foreground: oklch(0.76 0.247 140.934);
  --secondary: oklch(0.176 0.039 121.557);
  --secondary-foreground: oklch(0.801 0.204 126.678);
  --accent: oklch(0.166 0.04 152.726);
  --accent-foreground: oklch(0.758 0.231 145.736);
  --destructive: oklch(0.449 0.174 30.572);
  --destructive-foreground: oklch(0.92 0.039 25.395);
  --ring: oklch(0.168 0.046 137.026);
  --chart-1: oklch(0.168 0.046 137.026);
  --chart-2: oklch(0.176 0.039 121.557);
  --chart-3: oklch(0.166 0.04 152.726);
  --chart-4: oklch(0.234 0.054 123.619);
  --chart-5: oklch(0.169 0.048 136.968);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.981 0.009 138.894);
  --muted: oklch(0.186 0.006 119.842);
  --muted-foreground: oklch(0.761 0.016 119.674);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.981 0.009 138.894);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.981 0.009 138.894);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.168 0.046 137.026);
  --primary-foreground: oklch(0.76 0.247 140.934);
  --secondary: oklch(0.176 0.039 121.557);
  --secondary-foreground: oklch(0.801 0.204 126.678);
  --accent: oklch(0.166 0.04 152.726);
  --accent-foreground: oklch(0.758 0.231 145.736);
  --destructive: oklch(0.624 0.245 30.297);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.168 0.046 137.026);
  --chart-1: oklch(0.168 0.046 137.026);
  --chart-2: oklch(0.176 0.039 121.557);
  --chart-3: oklch(0.166 0.04 152.726);
  --chart-4: oklch(0.234 0.054 123.619);
  --chart-5: oklch(0.169 0.048 136.968);
}