Stretch for shadcn/ui

Stretch is a shadcn/ui theme built around an indigo primary color (#503fe4) with green accents (#3fe450). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the indigo primary (#503fe4) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#020104black
Foreground
#070614black
#ffffffwhite
Card
#f8f7fdghostwhite
#020104black
Card foreground
#070614black
#ffffffwhite
Popover
#f8f7fdghostwhite
#020104black
Popover foreground
#070614black
#ffffffwhite
Primary
#503fe4slateblue
#503fe4slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4503ftomato
#e4503ftomato
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f3e9e7linen
#180d0cblack
Muted foreground
#423e3edarkslategray
#c1bebdsilver
Accent
#3fe450limegreen
#3fe450limegreen
Accent foreground
#0b4c11darkgreen
#0b4c11darkgreen
Destructive
#8f1204darkred
#f21f07red
Destructive foreground
#fdcec9pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#503fe4slateblue
#503fe4slateblue

Contrast

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

Light mode
Text on background18.85:1AAA
Text on card18.85:1AAA
Primary button6.63:1AA
Secondary button3.82:1AA Large
Muted text8.82:1AAA
Accent6.02:1AA
Destructive6.55:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.80:1AAA
Primary button6.63:1AA
Secondary button3.82:1AA Large
Muted text10.31:1AAA
Accent6.02:1AA
Destructive4.20:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.007 290.87);
  --foreground: oklch(0.133 0.031 286.969);
  --muted: oklch(0.941 0.011 25.091);
  --muted-foreground: oklch(0.368 0.005 25.099);
  --popover: oklch(0.978 0.007 290.87);
  --popover-foreground: oklch(0.133 0.031 286.969);
  --card: oklch(0.978 0.007 290.87);
  --card-foreground: oklch(0.133 0.031 286.969);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.5 0.235 278.107);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.63 0.187 29.577);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.806 0.232 144.365);
  --accent-foreground: oklch(0.364 0.109 144.084);
  --destructive: oklch(0.418 0.16 30.635);
  --destructive-foreground: oklch(0.891 0.054 25.606);
  --ring: oklch(0.5 0.235 278.107);
  --chart-1: oklch(0.5 0.235 278.107);
  --chart-2: oklch(0.63 0.187 29.577);
  --chart-3: oklch(0.806 0.232 144.365);
  --chart-4: oklch(0.649 0.174 29.047);
  --chart-5: oklch(0.497 0.243 277.337);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.014 288.941);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.174 0.018 26.165);
  --muted-foreground: oklch(0.803 0.004 25.029);
  --popover: oklch(0.079 0.014 288.941);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.079 0.014 288.941);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.5 0.235 278.107);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.63 0.187 29.577);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.806 0.232 144.365);
  --accent-foreground: oklch(0.364 0.109 144.084);
  --destructive: oklch(0.613 0.24 30.325);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.5 0.235 278.107);
  --chart-1: oklch(0.5 0.235 278.107);
  --chart-2: oklch(0.63 0.187 29.577);
  --chart-3: oklch(0.806 0.232 144.365);
  --chart-4: oklch(0.649 0.174 29.047);
  --chart-5: oklch(0.497 0.243 277.337);
}