Only for shadcn/ui

Only is a shadcn/ui theme built around a muted green primary color (#b5be97) with muted green accents (#a1be97). The light mode uses a neutral background (#fdfefb). Dark mode keeps the muted green primary (#b5be97) on a green-tinted background (#0a0c03).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0a0c03black
Foreground
#000000black
#fbfbf9snow
Card
#fdfefbwhite
#0a0c03black
Card foreground
#000000black
#fbfbf9snow
Popover
#fdfefbwhite
#0a0c03black
Popover foreground
#000000black
#fbfbf9snow
Primary
#b5be97darkgray
#b5be97darkgray
Primary foreground
#14160eblack
#14160eblack
Secondary
#beb597tan
#beb597tan
Secondary foreground
#16140eblack
#16140eblack
Muted
#e6e1d1gainsboro
#2e2919darkslategray
Muted foreground
#424242darkslategray
#bdbdbdsilver
Accent
#a1be97darkseagreen
#a1be97darkseagreen
Accent foreground
#10160eblack
#10160eblack
Destructive
#cc3005firebrick
#f43a06orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b5be97darkgray
#b5be97darkgray

Contrast

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

Light mode
Text on background20.78:1AAA
Text on card20.78:1AAA
Primary button9.37:1AAA
Secondary button8.95:1AAA
Muted text7.66:1AAA
Accent9.05:1AAA
Destructive5.25:1AA
Dark mode
Text on background19.00:1AAA
Text on card19.00:1AAA
Primary button9.37:1AAA
Secondary button8.95:1AAA
Muted text7.70:1AAA
Accent9.05:1AAA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.005 117.908);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.909 0.022 91.606);
  --muted-foreground: oklch(0.38 0 180);
  --popover: oklch(0.996 0.005 117.908);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.996 0.005 117.908);
  --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.784 0.054 119.058);
  --primary-foreground: oklch(0.195 0.016 119.317);
  --secondary: oklch(0.772 0.041 91.765);
  --secondary-foreground: oklch(0.191 0.012 91.799);
  --accent: oklch(0.77 0.063 137.917);
  --accent-foreground: oklch(0.191 0.019 137.958);
  --destructive: oklch(0.554 0.197 33.868);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.784 0.054 119.058);
  --chart-1: oklch(0.784 0.054 119.058);
  --chart-2: oklch(0.772 0.041 91.765);
  --chart-3: oklch(0.77 0.063 137.917);
  --chart-4: oklch(0.793 0.037 91.739);
  --chart-5: oklch(0.79 0.061 119.206);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.022 118.388);
  --foreground: oklch(0.987 0.003 117.886);
  --muted: oklch(0.282 0.028 91.768);
  --muted-foreground: oklch(0.797 0 180);
  --popover: oklch(0.148 0.022 118.388);
  --popover-foreground: oklch(0.987 0.003 117.886);
  --card: oklch(0.148 0.022 118.388);
  --card-foreground: oklch(0.987 0.003 117.886);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.784 0.054 119.058);
  --primary-foreground: oklch(0.195 0.016 119.317);
  --secondary: oklch(0.772 0.041 91.765);
  --secondary-foreground: oklch(0.191 0.012 91.799);
  --accent: oklch(0.77 0.063 137.917);
  --accent-foreground: oklch(0.191 0.019 137.958);
  --destructive: oklch(0.631 0.227 33.635);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.784 0.054 119.058);
  --chart-1: oklch(0.784 0.054 119.058);
  --chart-2: oklch(0.772 0.041 91.765);
  --chart-3: oklch(0.77 0.063 137.917);
  --chart-4: oklch(0.793 0.037 91.739);
  --chart-5: oklch(0.79 0.061 119.206);
}