Modern for shadcn/ui

Modern is a shadcn/ui theme built around a muted light blue primary color (#d8dde9) with muted light green accents (#dde9d8). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the muted light blue primary (#d8dde9) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#020203black
Foreground
#060b13black
#f4f6fawhitesmoke
Card
#f8f9fcghostwhite
#020203black
Card foreground
#060b13black
#f4f6fawhitesmoke
Popover
#f8f9fcghostwhite
#020203black
Popover foreground
#060b13black
#f4f6fawhitesmoke
Primary
#d8dde9gainsboro
#d8dde9gainsboro
Primary foreground
#33405cdarkslategray
#33405cdarkslategray
Secondary
#e9d8ddgainsboro
#e9d8ddgainsboro
Secondary foreground
#5c3340darkslategray
#5c3340darkslategray
Muted
#f3ecefwhitesmoke
#130c0eblack
Muted foreground
#635f60dimgray
#a09c9ddarkgray
Accent
#dde9d8gainsboro
#dde9d8gainsboro
Accent foreground
#121a0eblack
#121a0eblack
Destructive
#9b410dsaddlebrown
#ec6c22chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d8dde9gainsboro
#d8dde9gainsboro

Contrast

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

Light mode
Text on background18.74:1AAA
Text on card18.74:1AAA
Primary button7.62:1AAA
Secondary button7.63:1AAA
Muted text5.42:1AA
Accent14.20:1AAA
Destructive6.64:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button7.62:1AAA
Secondary button7.63:1AAA
Muted text7.12:1AAA
Accent14.20:1AAA
Destructive6.74:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 264.539);
  --foreground: oklch(0.147 0.02 261.764);
  --muted: oklch(0.95 0.007 354.814);
  --muted-foreground: oklch(0.489 0.005 354.9);
  --popover: oklch(0.983 0.004 264.539);
  --popover-foreground: oklch(0.147 0.02 261.764);
  --card: oklch(0.983 0.004 264.539);
  --card-foreground: oklch(0.147 0.02 261.764);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.898 0.017 264.481);
  --primary-foreground: oklch(0.374 0.051 263.661);
  --secondary: oklch(0.897 0.021 355.255);
  --secondary-foreground: oklch(0.376 0.062 359.147);
  --accent: oklch(0.921 0.027 134.973);
  --accent-foreground: oklch(0.207 0.025 135.523);
  --destructive: oklch(0.489 0.133 44.818);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.898 0.017 264.481);
  --chart-1: oklch(0.898 0.017 264.481);
  --chart-2: oklch(0.897 0.021 355.255);
  --chart-3: oklch(0.921 0.027 134.973);
  --chart-4: oklch(0.923 0.016 355.072);
  --chart-5: oklch(0.897 0.019 264.472);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.006 260.183);
  --foreground: oklch(0.974 0.006 264.533);
  --muted: oklch(0.164 0.012 356.58);
  --muted-foreground: oklch(0.697 0.005 354.789);
  --popover: oklch(0.088 0.006 260.183);
  --popover-foreground: oklch(0.974 0.006 264.533);
  --card: oklch(0.088 0.006 260.183);
  --card-foreground: oklch(0.974 0.006 264.533);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.898 0.017 264.481);
  --primary-foreground: oklch(0.374 0.051 263.661);
  --secondary: oklch(0.897 0.021 355.255);
  --secondary-foreground: oklch(0.376 0.062 359.147);
  --accent: oklch(0.921 0.027 134.973);
  --accent-foreground: oklch(0.207 0.025 135.523);
  --destructive: oklch(0.677 0.177 45.723);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.898 0.017 264.481);
  --chart-1: oklch(0.898 0.017 264.481);
  --chart-2: oklch(0.897 0.021 355.255);
  --chart-3: oklch(0.921 0.027 134.973);
  --chart-4: oklch(0.923 0.016 355.072);
  --chart-5: oklch(0.897 0.019 264.472);
}