Range for shadcn/ui

Range is a shadcn/ui theme built around a green primary color (#b5de8c) with pink accents (#de8cb5). The light mode uses a neutral background (#fcfefb). Dark mode keeps the green primary (#b5de8c) on a green-tinted background (#080a05).

Color palette

TokenLightDark
Background
#fcfefbwhite
#080a05black
Foreground
#0d1406black
#f7faf5whitesmoke
Card
#fcfefbwhite
#080a05black
Card foreground
#0d1406black
#f7faf5whitesmoke
Popover
#fcfefbwhite
#080a05black
Popover foreground
#0d1406black
#f7faf5whitesmoke
Primary
#b5de8clightgreen
#b5de8clightgreen
Primary foreground
#1c2b0dblack
#1c2b0dblack
Secondary
#8cb5deskyblue
#8cb5deskyblue
Secondary foreground
#0d1c2bblack
#0d1c2bblack
Muted
#e1e8eflavender
#10171eblack
Muted foreground
#41474edarkslategray
#b1b8besilver
Accent
#de8cb5orchid
#de8cb5orchid
Accent foreground
#2b0d1cblack
#2b0d1cblack
Destructive
#bb460cfirebrick
#f16722chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b5de8clightgreen
#b5de8clightgreen

Contrast

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

Light mode
Text on background18.46:1AAA
Text on card18.46:1AAA
Primary button9.82:1AAA
Secondary button8.03:1AAA
Muted text7.60:1AAA
Accent7.25:1AAA
Destructive5.24:1AA
Dark mode
Text on background18.86:1AAA
Text on card18.86:1AAA
Primary button9.82:1AAA
Secondary button8.03:1AAA
Muted text9.00:1AAA
Accent7.25:1AAA
Destructive6.71:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 128.498);
  --foreground: oklch(0.178 0.03 129.872);
  --muted: oklch(0.928 0.012 247.951);
  --muted-foreground: oklch(0.396 0.014 248.175);
  --popover: oklch(0.994 0.003 128.498);
  --popover-foreground: oklch(0.178 0.03 129.872);
  --card: oklch(0.994 0.003 128.498);
  --card-foreground: oklch(0.178 0.03 129.872);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.851 0.115 130.15);
  --primary-foreground: oklch(0.269 0.055 131.436);
  --secondary: oklch(0.758 0.073 248.82);
  --secondary-foreground: oklch(0.221 0.037 249.827);
  --accent: oklch(0.737 0.111 348.786);
  --accent-foreground: oklch(0.214 0.055 351.626);
  --destructive: oklch(0.548 0.162 41.264);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.851 0.115 130.15);
  --chart-1: oklch(0.851 0.115 130.15);
  --chart-2: oklch(0.758 0.073 248.82);
  --chart-3: oklch(0.737 0.111 348.786);
  --chart-4: oklch(0.784 0.065 248.672);
  --chart-5: oklch(0.856 0.121 130.24);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.015 127.692);
  --foreground: oklch(0.981 0.006 128.532);
  --muted: oklch(0.201 0.017 248.673);
  --muted-foreground: oklch(0.778 0.012 247.977);
  --popover: oklch(0.141 0.015 127.692);
  --popover-foreground: oklch(0.981 0.006 128.532);
  --card: oklch(0.141 0.015 127.692);
  --card-foreground: oklch(0.981 0.006 128.532);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.851 0.115 130.15);
  --primary-foreground: oklch(0.269 0.055 131.436);
  --secondary: oklch(0.758 0.073 248.82);
  --secondary-foreground: oklch(0.221 0.037 249.827);
  --accent: oklch(0.737 0.111 348.786);
  --accent-foreground: oklch(0.214 0.055 351.626);
  --destructive: oklch(0.677 0.186 42.945);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.851 0.115 130.15);
  --chart-1: oklch(0.851 0.115 130.15);
  --chart-2: oklch(0.758 0.073 248.82);
  --chart-3: oklch(0.737 0.111 348.786);
  --chart-4: oklch(0.784 0.065 248.672);
  --chart-5: oklch(0.856 0.121 130.24);
}