Relief for shadcn/ui

Relief is a shadcn/ui theme built around a blue primary color (#34477f) with green accents (#477f34). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the blue primary (#34477f) on a blue-tinted background (#050710).

Color palette

TokenLightDark
Background
#fbfcfewhite
#050710black
Foreground
#000000black
#fcfcfdwhite
Card
#fbfcfewhite
#050710black
Card foreground
#000000black
#fcfcfdwhite
Popover
#fbfcfewhite
#050710black
Popover foreground
#000000black
#fcfcfdwhite
Primary
#34477fdarkslateblue
#34477fdarkslateblue
Primary foreground
#edf0f8whitesmoke
#edf0f8whitesmoke
Secondary
#7f3447brown
#7f3447brown
Secondary foreground
#f8edf0lavenderblush
#f8edf0lavenderblush
Muted
#f1e9eblinen
#160e10black
Muted foreground
#616161dimgray
#9e9e9edarkgray
Accent
#477f34darkolivegreen
#477f34darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#aa180efirebrick
#d91f12firebrick
Destructive foreground
#fdedeclinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#34477fdarkslateblue
#34477fdarkslateblue

Contrast

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

Light mode
Text on background20.42:1AAA
Text on card20.42:1AAA
Primary button7.87:1AAA
Secondary button7.41:1AAA
Muted text5.18:1AA
Accent4.84:1AA
Destructive6.50:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button7.87:1AAA
Secondary button7.41:1AAA
Muted text7.11:1AAA
Accent4.84:1AA
Destructive5.05:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 271.382);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.941 0.01 0.155);
  --muted-foreground: oklch(0.492 0 180);
  --popover: oklch(0.99 0.003 271.382);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.003 271.382);
  --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.41 0.097 268.061);
  --primary-foreground: oklch(0.954 0.011 271.298);
  --secondary: oklch(0.433 0.105 6.993);
  --secondary-foreground: oklch(0.955 0.012 0.221);
  --accent: oklch(0.539 0.123 138.561);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.473 0.18 29.664);
  --destructive-foreground: oklch(0.959 0.018 22.427);
  --ring: oklch(0.41 0.097 268.061);
  --chart-1: oklch(0.41 0.097 268.061);
  --chart-2: oklch(0.433 0.105 6.993);
  --chart-3: oklch(0.539 0.123 138.561);
  --chart-4: oklch(0.458 0.113 7.085);
  --chart-5: oklch(0.407 0.104 267.75);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.132 0.02 265.488);
  --foreground: oklch(0.991 0.002 271.395);
  --muted: oklch(0.174 0.015 2.241);
  --muted-foreground: oklch(0.7 0 180);
  --popover: oklch(0.132 0.02 265.488);
  --popover-foreground: oklch(0.991 0.002 271.395);
  --card: oklch(0.132 0.02 265.488);
  --card-foreground: oklch(0.991 0.002 271.395);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.41 0.097 268.061);
  --primary-foreground: oklch(0.954 0.011 271.298);
  --secondary: oklch(0.433 0.105 6.993);
  --secondary-foreground: oklch(0.955 0.012 0.221);
  --accent: oklch(0.539 0.123 138.561);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.566 0.218 29.712);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.41 0.097 268.061);
  --chart-1: oklch(0.41 0.097 268.061);
  --chart-2: oklch(0.433 0.105 6.993);
  --chart-3: oklch(0.539 0.123 138.561);
  --chart-4: oklch(0.458 0.113 7.085);
  --chart-5: oklch(0.407 0.104 267.75);
}