Practical for shadcn/ui

Practical is a shadcn/ui theme built around a muted blue primary color (#494c5f) with muted green accents (#4c5f49). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the muted blue primary (#494c5f) on a neutral background (#010104).

Color palette

TokenLightDark
Background
#fbfcfewhite
#010104black
Foreground
#010104black
#ffffffwhite
Card
#f8f8fcghostwhite
#020308black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfcfewhite
#010104black
Popover foreground
#010104black
#ffffffwhite
Primary
#494c5fdarkslategray
#494c5fdarkslategray
Primary foreground
#ebebeflavender
#ebebeflavender
Secondary
#5f494cdimgray
#5f494cdimgray
Secondary foreground
#efebeblinen
#efebeblinen
Muted
#f2eeeewhitesmoke
#110d0eblack
Muted foreground
#6d5558dimgray
#aa9296rosybrown
Accent
#4c5f49darkolivegreen
#4c5f49darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6b0201maroon
#e90501red
Destructive foreground
#ffa09flightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#494c5fdarkslategray
#494c5fdarkslategray

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card19.85:1AAA
Primary button7.09:1AAA
Secondary button6.95:1AA
Muted text5.88:1AA
Accent6.89:1AA
Destructive6.61:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.60:1AAA
Primary button7.09:1AAA
Secondary button6.95:1AA
Muted text6.66:1AA
Accent6.89:1AA
Destructive4.66:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.002 279.303);
  --foreground: oklch(0.076 0.017 271.2);
  --muted: oklch(0.951 0.004 7.86);
  --muted-foreground: oklch(0.475 0.031 9.341);
  --popover: oklch(0.99 0.002 279.303);
  --popover-foreground: oklch(0.076 0.017 271.2);
  --card: oklch(0.981 0.005 279.265);
  --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.422 0.032 278.094);
  --primary-foreground: oklch(0.942 0.005 279.254);
  --secondary: oklch(0.43 0.03 9.449);
  --secondary-foreground: oklch(0.943 0.005 7.88);
  --accent: oklch(0.463 0.042 141.34);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.332 0.134 29.512);
  --destructive-foreground: oklch(0.801 0.113 20.923);
  --ring: oklch(0.422 0.032 278.094);
  --chart-1: oklch(0.422 0.032 278.094);
  --chart-2: oklch(0.43 0.03 9.449);
  --chart-3: oklch(0.463 0.042 141.34);
  --chart-4: oklch(0.457 0.032 9.472);
  --chart-5: oklch(0.416 0.039 277.742);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.014 272.844);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.166 0.007 8.753);
  --muted-foreground: oklch(0.683 0.028 8.749);
  --popover: oklch(0.079 0.014 272.844);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.099 0.018 272.844);
  --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.422 0.032 278.094);
  --primary-foreground: oklch(0.942 0.005 279.254);
  --secondary: oklch(0.43 0.03 9.449);
  --secondary-foreground: oklch(0.943 0.005 7.88);
  --accent: oklch(0.463 0.042 141.34);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.588 0.24 29.342);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.422 0.032 278.094);
  --chart-1: oklch(0.422 0.032 278.094);
  --chart-2: oklch(0.43 0.03 9.449);
  --chart-3: oklch(0.463 0.042 141.34);
  --chart-4: oklch(0.457 0.032 9.472);
  --chart-5: oklch(0.416 0.039 277.742);
}