Nifty for shadcn/ui

Nifty is a shadcn/ui theme built around a muted deep cyan primary color (#294042) with muted deep red accents (#422b29). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the muted deep cyan primary (#294042) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#fbfdfewhite
#010304black
Foreground
#050e10black
#f9fafbghostwhite
Card
#f8fcfcmintcream
#030707black
Card foreground
#040b0cblack
#fcfdfdwhite
Popover
#fbfdfewhite
#010304black
Popover foreground
#050e10black
#f9fafbghostwhite
Primary
#294042darkslategray
#294042darkslategray
Primary foreground
#c3d8dalightgrey
#c3d8dalightgrey
Secondary
#422b29darkslategray
#422b29darkslategray
Secondary foreground
#dac5c3thistle
#dac5c3thistle
Muted
#e9d9d8gainsboro
#271816black
Muted foreground
#6d605fdimgray
#a09392rosybrown
Accent
#422b29darkslategray
#422b29darkslategray
Accent foreground
#dac5c3thistle
#dac5c3thistle
Destructive
#bf4912chocolate
#eb692dchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#294042darkslategray
#294042darkslategray

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.14:1AAA
Primary button7.44:1AAA
Secondary button7.89:1AAA
Muted text4.41:1AA Large
Accent7.89:1AAA
Destructive5.02:1AA
Dark mode
Text on background19.73:1AAA
Text on card19.88:1AAA
Primary button7.44:1AAA
Secondary button7.89:1AAA
Muted text5.77:1AA
Accent7.89:1AAA
Destructive6.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 204.974);
  --foreground: oklch(0.156 0.016 203.88);
  --muted: oklch(0.899 0.018 25.162);
  --muted-foreground: oklch(0.502 0.017 25.296);
  --popover: oklch(0.994 0.002 204.974);
  --popover-foreground: oklch(0.156 0.016 203.88);
  --card: oklch(0.987 0.004 204.958);
  --card-foreground: oklch(0.14 0.014 202.916);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.353 0.029 204.703);
  --primary-foreground: oklch(0.867 0.023 204.813);
  --secondary: oklch(0.317 0.035 26.263);
  --secondary-foreground: oklch(0.841 0.024 25.245);
  --accent: oklch(0.317 0.035 26.263);
  --accent-foreground: oklch(0.841 0.024 25.245);
  --destructive: oklch(0.559 0.164 40.831);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.353 0.029 204.703);
  --chart-1: oklch(0.353 0.029 204.703);
  --chart-2: oklch(0.317 0.035 26.263);
  --chart-3: oklch(0.317 0.035 26.263);
  --chart-4: oklch(0.345 0.039 26.309);
  --chart-5: oklch(0.356 0.032 204.731);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.008 202.864);
  --foreground: oklch(0.985 0.001 204.981);
  --muted: oklch(0.227 0.026 26.342);
  --muted-foreground: oklch(0.675 0.015 25.191);
  --popover: oklch(0.096 0.008 202.864);
  --popover-foreground: oklch(0.985 0.001 204.981);
  --card: oklch(0.121 0.01 202.864);
  --card-foreground: oklch(0.993 0.001 204.985);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.353 0.029 204.703);
  --primary-foreground: oklch(0.867 0.023 204.813);
  --secondary: oklch(0.317 0.035 26.263);
  --secondary-foreground: oklch(0.841 0.024 25.245);
  --accent: oklch(0.317 0.035 26.263);
  --accent-foreground: oklch(0.841 0.024 25.245);
  --destructive: oklch(0.673 0.176 42.658);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.353 0.029 204.703);
  --chart-1: oklch(0.353 0.029 204.703);
  --chart-2: oklch(0.317 0.035 26.263);
  --chart-3: oklch(0.317 0.035 26.263);
  --chart-4: oklch(0.345 0.039 26.309);
  --chart-5: oklch(0.356 0.032 204.731);
}