Decent for shadcn/ui

Decent is a shadcn/ui theme built around a neutral gray primary color (#d0cfd3) with neutral gray accents (#e2e1e5). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the neutral gray primary (#d0cfd3) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#020104black
Foreground
#000000black
#fcfbfdsnow
Card
#f9f8fcghostwhite
#020104black
Card foreground
#000000black
#fcfbfdsnow
Popover
#f9f8fcghostwhite
#020104black
Popover foreground
#000000black
#fcfbfdsnow
Primary
#d0cfd3lightgrey
#d0cfd3lightgrey
Primary foreground
#37363adarkslategray
#37363adarkslategray
Secondary
#e2e1e5gainsboro
#2d2839darkslategray
Secondary foreground
#48464edarkslategray
#c6c0d3thistle
Muted
#eae9edlavender
#141216black
Muted foreground
#4e485bdarkslategray
#aaa4b7darkgray
Accent
#e2e1e5gainsboro
#2d2839darkslategray
Accent foreground
#48464edarkslategray
#c6c0d3thistle
Destructive
#d70404red
#e60505red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d0cfd3lightgrey
#d0cfd3lightgrey

Contrast

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

Light mode
Text on background19.83:1AAA
Text on card19.83:1AAA
Primary button7.75:1AAA
Secondary button7.15:1AAA
Muted text7.20:1AAA
Accent7.15:1AAA
Destructive5.37:1AA
Dark mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button7.75:1AAA
Secondary button8.07:1AAA
Muted text7.70:1AAA
Accent8.07:1AAA
Destructive4.79:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 300.67);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.935 0.006 300.669);
  --muted-foreground: oklch(0.415 0.033 299.44);
  --popover: oklch(0.981 0.006 300.67);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.006 300.67);
  --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.857 0.005 300.668);
  --primary-foreground: oklch(0.335 0.008 300.375);
  --secondary: oklch(0.912 0.005 300.684);
  --secondary-foreground: oklch(0.398 0.015 300.14);
  --accent: oklch(0.912 0.005 300.684);
  --accent-foreground: oklch(0.398 0.015 300.14);
  --destructive: oklch(0.553 0.225 29.074);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.857 0.005 300.668);
  --chart-1: oklch(0.857 0.005 300.668);
  --chart-2: oklch(0.912 0.005 300.684);
  --chart-3: oklch(0.912 0.005 300.684);
  --chart-4: oklch(0.936 0.003 300.708);
  --chart-5: oklch(0.855 0.009 300.593);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.078 0.018 301.193);
  --foreground: oklch(0.991 0.003 300.724);
  --muted: oklch(0.187 0.008 300.025);
  --muted-foreground: oklch(0.729 0.029 300.117);
  --popover: oklch(0.078 0.018 301.193);
  --popover-foreground: oklch(0.991 0.003 300.724);
  --card: oklch(0.078 0.018 301.193);
  --card-foreground: oklch(0.991 0.003 300.724);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.857 0.005 300.668);
  --primary-foreground: oklch(0.335 0.008 300.375);
  --secondary: oklch(0.29 0.032 298.9);
  --secondary-foreground: oklch(0.818 0.027 300.214);
  --accent: oklch(0.29 0.032 298.9);
  --accent-foreground: oklch(0.818 0.027 300.214);
  --destructive: oklch(0.582 0.237 29.087);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.857 0.005 300.668);
  --chart-1: oklch(0.857 0.005 300.668);
  --chart-2: oklch(0.29 0.032 298.9);
  --chart-3: oklch(0.29 0.032 298.9);
  --chart-4: oklch(0.317 0.036 298.834);
  --chart-5: oklch(0.855 0.009 300.593);
}