Refuge for shadcn/ui

Refuge is a shadcn/ui theme built around a light indigo primary color (#c7c5f2) with neutral gray accents (#cbcbcd). The light mode uses a neutral background (#ffffff). Dark mode keeps the light indigo primary (#c7c5f2) on a neutral background (#030208).

Color palette

TokenLightDark
Background
#ffffffwhite
#030208black
Foreground
#040316black
#ffffffwhite
Card
#fcfcfcsnow
#04040cblack
Card foreground
#030312black
#ffffffwhite
Popover
#ffffffwhite
#030208black
Popover foreground
#040316black
#ffffffwhite
Primary
#c7c5f2lightsteelblue
#c7c5f2lightsteelblue
Primary foreground
#1d196cmidnightblue
#1d196cmidnightblue
Secondary
#cbcbcdlightgrey
#262537darkslategray
Secondary foreground
#323234darkslategray
#bdbcd2silver
Muted
#dad9edgainsboro
#131226black
Muted foreground
#61616bdimgray
#94949edarkgray
Accent
#cbcbcdlightgrey
#262537darkslategray
Accent foreground
#323234darkslategray
#bdbcd2silver
Destructive
#860a03darkred
#f92f24orangered
Destructive foreground
#fdc2belightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c7c5f2lightsteelblue
#c7c5f2lightsteelblue

Contrast

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

Light mode
Text on background20.39:1AAA
Text on card20.03:1AAA
Primary button9.00:1AAA
Secondary button7.89:1AAA
Muted text4.39:1AA Large
Accent7.89:1AAA
Destructive6.61:1AA
Dark mode
Text on background20.63:1AAA
Text on card20.45:1AAA
Primary button9.00:1AAA
Secondary button8.07:1AAA
Muted text6.13:1AA
Accent8.07:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.121 0.044 281.017);
  --muted: oklch(0.891 0.028 288.109);
  --muted-foreground: oklch(0.496 0.016 288.095);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.121 0.044 281.017);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.111 0.039 281.802);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.839 0.062 287.262);
  --primary-foreground: oklch(0.285 0.138 275.386);
  --secondary: oklch(0.843 0.003 288.647);
  --secondary-foreground: oklch(0.318 0.004 288.498);
  --accent: oklch(0.843 0.003 288.647);
  --accent-foreground: oklch(0.318 0.004 288.498);
  --destructive: oklch(0.395 0.155 29.724);
  --destructive-foreground: oklch(0.865 0.069 22.051);
  --ring: oklch(0.839 0.062 287.262);
  --chart-1: oklch(0.839 0.062 287.262);
  --chart-2: oklch(0.843 0.003 288.647);
  --chart-3: oklch(0.843 0.003 288.647);
  --chart-4: oklch(0.867 0.002 288.658);
  --chart-5: oklch(0.837 0.066 287.183);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.019 285.502);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.194 0.041 284.143);
  --muted-foreground: oklch(0.67 0.015 288.291);
  --popover: oklch(0.097 0.019 285.502);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.112 0.022 285.454);
  --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.839 0.062 287.262);
  --primary-foreground: oklch(0.285 0.138 275.386);
  --secondary: oklch(0.273 0.034 286.219);
  --secondary-foreground: oklch(0.802 0.031 287.964);
  --accent: oklch(0.273 0.034 286.219);
  --accent-foreground: oklch(0.802 0.031 287.964);
  --destructive: oklch(0.635 0.236 28.987);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.839 0.062 287.262);
  --chart-1: oklch(0.839 0.062 287.262);
  --chart-2: oklch(0.273 0.034 286.219);
  --chart-3: oklch(0.273 0.034 286.219);
  --chart-4: oklch(0.3 0.038 286.114);
  --chart-5: oklch(0.837 0.066 287.183);
}