Fancy for shadcn/ui

Fancy is a shadcn/ui theme built around a neutral gray primary color (#655a68) with neutral gray accents (#5a6865). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#655a68) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#ffffffwhite
#060307black
Foreground
#0d0410black
#fdfcfdwhite
Card
#fcfcfcsnow
#09050bblack
Card foreground
#0a030cblack
#ffffffwhite
Popover
#fcfcfcsnow
#09050bblack
Popover foreground
#0a030cblack
#ffffffwhite
Primary
#655a68dimgray
#655a68dimgray
Primary foreground
#fafafasnow
#fafafasnow
Secondary
#68655adimgray
#68655adimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f0ece0beige
#1f1b0fblack
Muted foreground
#69675ddimgray
#a29f96darkgray
Accent
#5a6865dimgray
#5a6865dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#691407maroon
#f1543btomato
Destructive foreground
#f9b4a9lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#655a68dimgray
#655a68dimgray

Contrast

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

Light mode
Text on background20.15:1AAA
Text on card19.92:1AAA
Primary button6.26:1AA
Secondary button5.87:1AA
Muted text4.82:1AA
Accent5.85:1AA
Destructive7.11:1AAA
Dark mode
Text on background20.03:1AAA
Text on card20.25:1AAA
Primary button6.26:1AA
Secondary button5.87:1AA
Muted text6.47:1AA
Accent5.85:1AA
Destructive6.07:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.031 318.989);
  --muted: oklch(0.944 0.017 92.829);
  --muted-foreground: oklch(0.512 0.015 92.911);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.121 0.027 319.943);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.121 0.027 319.943);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.483 0.025 318.279);
  --primary-foreground: oklch(0.984 0.001 318.329);
  --secondary: oklch(0.505 0.017 92.945);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.504 0.017 179.963);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.342 0.12 31.712);
  --destructive-foreground: oklch(0.831 0.083 28.767);
  --ring: oklch(0.483 0.025 318.279);
  --chart-1: oklch(0.483 0.025 318.279);
  --chart-2: oklch(0.505 0.017 92.945);
  --chart-3: oklch(0.504 0.017 179.963);
  --chart-4: oklch(0.533 0.018 92.947);
  --chart-5: oklch(0.479 0.036 318.255);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.017 319.664);
  --foreground: oklch(0.992 0.001 318.329);
  --muted: oklch(0.224 0.023 93.141);
  --muted-foreground: oklch(0.701 0.013 92.836);
  --popover: oklch(0.124 0.019 319.618);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.019 319.618);
  --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.483 0.025 318.279);
  --primary-foreground: oklch(0.984 0.001 318.329);
  --secondary: oklch(0.505 0.017 92.945);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.504 0.017 179.963);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.656 0.198 31.445);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.483 0.025 318.279);
  --chart-1: oklch(0.483 0.025 318.279);
  --chart-2: oklch(0.505 0.017 92.945);
  --chart-3: oklch(0.504 0.017 179.963);
  --chart-4: oklch(0.533 0.018 92.947);
  --chart-5: oklch(0.479 0.036 318.255);
}