Envy for shadcn/ui

Envy is a shadcn/ui theme built around a muted blue primary color (#839db9) with muted light blue accents (#d3d9de). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#839db9) on a blue-tinted background (#040a10).

Color palette

TokenLightDark
Background
#ffffffwhite
#040a10black
Foreground
#050a10black
#f9fafbghostwhite
Card
#fcfcfcsnow
#050c14black
Card foreground
#03080cblack
#fcfcfdwhite
Popover
#ffffffwhite
#040a10black
Popover foreground
#050a10black
#f9fafbghostwhite
Primary
#839db9lightslategray
#839db9lightslategray
Primary foreground
#040507black
#040507black
Secondary
#e7e8e9lavender
#262627darkslategray
Secondary foreground
#4a4f54darkslategray
#bfbfc0silver
Muted
#dce0e5gainsboro
#1a1e23black
Muted foreground
#4b5662darkslategray
#9da8b4darkgray
Accent
#d3d9degainsboro
#303336darkslategray
Accent foreground
#373f49darkslategray
#c9cccflightgrey
Destructive
#973511saddlebrown
#d84b18chocolate
Destructive foreground
#fbe6dfmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#839db9lightslategray
#839db9lightslategray

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.68:1AAA
Primary button7.28:1AAA
Secondary button6.74:1AA
Muted text5.64:1AA
Accent7.47:1AAA
Destructive6.16:1AA
Dark mode
Text on background19.02:1AAA
Text on card19.10:1AAA
Primary button7.28:1AAA
Secondary button8.21:1AAA
Muted text6.90:1AA
Accent7.88:1AAA
Destructive4.25:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.141 0.017 245.558);
  --muted: oklch(0.905 0.009 249.739);
  --muted-foreground: oklch(0.449 0.024 250.108);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.141 0.017 245.558);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.128 0.014 242.31);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.686 0.051 250.29);
  --primary-foreground: oklch(0.114 0.006 245.689);
  --secondary: oklch(0.93 0.002 249.675);
  --secondary-foreground: oklch(0.425 0.01 249.865);
  --accent: oklch(0.882 0.009 249.75);
  --accent-foreground: oklch(0.365 0.02 250.119);
  --destructive: oklch(0.466 0.14 38.247);
  --destructive-foreground: oklch(0.941 0.025 41.12);
  --ring: oklch(0.686 0.051 250.29);
  --chart-1: oklch(0.686 0.051 250.29);
  --chart-2: oklch(0.93 0.002 249.675);
  --chart-3: oklch(0.882 0.009 249.75);
  --chart-4: oklch(0.954 0.002 249.666);
  --chart-5: oklch(0.685 0.056 250.36);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.018 245.179);
  --foreground: oklch(0.984 0.002 249.67);
  --muted: oklch(0.234 0.012 250.099);
  --muted-foreground: oklch(0.726 0.021 249.909);
  --popover: oklch(0.141 0.018 245.179);
  --popover-foreground: oklch(0.984 0.002 249.67);
  --card: oklch(0.153 0.021 248.108);
  --card-foreground: oklch(0.992 0.001 249.66);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.686 0.051 250.29);
  --primary-foreground: oklch(0.114 0.006 245.689);
  --secondary: oklch(0.269 0.001 249.682);
  --secondary-foreground: oklch(0.805 0.001 249.664);
  --accent: oklch(0.319 0.007 249.849);
  --accent-foreground: oklch(0.844 0.005 249.711);
  --destructive: oklch(0.602 0.186 37.854);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.686 0.051 250.29);
  --chart-1: oklch(0.686 0.051 250.29);
  --chart-2: oklch(0.269 0.001 249.682);
  --chart-3: oklch(0.319 0.007 249.849);
  --chart-4: oklch(0.3 0.001 249.684);
  --chart-5: oklch(0.685 0.056 250.36);
}