Range for shadcn/ui

Range is a shadcn/ui theme built around a pink primary color (#d3a6be) with red accents (#d3a6a8). The light mode uses a neutral background (#ffffff). Dark mode keeps the pink primary (#d3a6be) on a pink-tinted background (#0b0508).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0508black
Foreground
#0d0308black
#fdfcfdwhite
Card
#ffffffwhite
#0b0508black
Card foreground
#0d0308black
#fdfcfdwhite
Popover
#ffffffwhite
#0b0508black
Popover foreground
#0d0308black
#fdfcfdwhite
Primary
#d3a6besilver
#d3a6besilver
Primary foreground
#301825black
#301825black
Secondary
#d2a6d3plum
#d2a6d3plum
Secondary foreground
#2f1830darkslategray
#2f1830darkslategray
Muted
#f4e6f4lavenderblush
#180b19black
Muted foreground
#525152darkslategray
#aeadaedarkgray
Accent
#d3a6a8tan
#d3a6a8tan
Accent foreground
#301818black
#301818black
Destructive
#762604maroon
#f14e09orangered
Destructive foreground
#fcc7b0peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d3a6besilver
#d3a6besilver

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button7.78:1AAA
Secondary button7.83:1AAA
Muted text6.57:1AA
Accent7.72:1AAA
Destructive6.77:1AA
Dark mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button7.78:1AAA
Secondary button7.83:1AAA
Muted text8.52:1AAA
Accent7.72:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.12 0.028 343.821);
  --muted: oklch(0.94 0.023 324.776);
  --muted-foreground: oklch(0.436 0.003 324.667);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.12 0.028 343.821);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.12 0.028 343.821);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.774 0.062 345.337);
  --primary-foreground: oklch(0.246 0.044 347.592);
  --secondary: oklch(0.78 0.079 325.236);
  --secondary-foreground: oklch(0.251 0.055 325.867);
  --accent: oklch(0.767 0.053 16.147);
  --accent-foreground: oklch(0.241 0.039 18.256);
  --destructive: oklch(0.388 0.119 39.563);
  --destructive-foreground: oklch(0.871 0.068 44.352);
  --ring: oklch(0.774 0.062 345.337);
  --chart-1: oklch(0.774 0.062 345.337);
  --chart-2: oklch(0.78 0.079 325.236);
  --chart-3: oklch(0.767 0.053 16.147);
  --chart-4: oklch(0.805 0.07 325.148);
  --chart-5: oklch(0.772 0.067 345.504);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.017 343.441);
  --foreground: oklch(0.991 0.002 343.498);
  --muted: oklch(0.176 0.035 325.758);
  --muted-foreground: oklch(0.748 0.003 324.643);
  --popover: oklch(0.125 0.017 343.441);
  --popover-foreground: oklch(0.991 0.002 343.498);
  --card: oklch(0.125 0.017 343.441);
  --card-foreground: oklch(0.991 0.002 343.498);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.774 0.062 345.337);
  --primary-foreground: oklch(0.246 0.044 347.592);
  --secondary: oklch(0.78 0.079 325.236);
  --secondary-foreground: oklch(0.251 0.055 325.867);
  --accent: oklch(0.767 0.053 16.147);
  --accent-foreground: oklch(0.241 0.039 18.256);
  --destructive: oklch(0.647 0.209 37.91);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.774 0.062 345.337);
  --chart-1: oklch(0.774 0.062 345.337);
  --chart-2: oklch(0.78 0.079 325.236);
  --chart-3: oklch(0.767 0.053 16.147);
  --chart-4: oklch(0.805 0.07 325.148);
  --chart-5: oklch(0.772 0.067 345.504);
}