Decoder for shadcn/ui

Decoder is a shadcn/ui theme built around a muted deep blue primary color (#364953) with muted light blue accents (#c8d4da). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the muted deep blue primary (#364953) on a neutral background (#030607).

Color palette

TokenLightDark
Background
#fbfdfewhite
#030607black
Foreground
#020608black
#ffffffwhite
Card
#fbfdfewhite
#030607black
Card foreground
#020608black
#ffffffwhite
Popover
#fbfdfewhite
#030607black
Popover foreground
#020608black
#ffffffwhite
Primary
#364953darkslategray
#364953darkslategray
Primary foreground
#d7e0e5gainsboro
#d7e0e5gainsboro
Secondary
#c8d4dalightgrey
#27333adarkslategray
Secondary foreground
#2d3b43darkslategray
#bfcdd4lightsteelblue
Muted
#d4dee3gainsboro
#1c262bdarkslategray
Muted foreground
#525557dimgray
#a8acaddarkgray
Accent
#c8d4dalightgrey
#27333adarkslategray
Accent foreground
#2d3b43darkslategray
#bfcdd4lightsteelblue
Destructive
#6b2000maroon
#ff5b14orangered
Destructive foreground
#ffbb9elightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#364953darkslategray
#364953darkslategray

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button6.99:1AA
Secondary button7.62:1AAA
Muted text5.47:1AA
Accent7.62:1AAA
Destructive7.00:1AAA
Dark mode
Text on background20.35:1AAA
Text on card20.35:1AAA
Primary button6.99:1AA
Secondary button7.93:1AAA
Muted text6.73:1AA
Accent7.93:1AAA
Destructive6.75:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 230.694);
  --foreground: oklch(0.116 0.013 223.634);
  --muted: oklch(0.893 0.013 230.859);
  --muted-foreground: oklch(0.447 0.005 230.818);
  --popover: oklch(0.993 0.002 230.694);
  --popover-foreground: oklch(0.116 0.013 223.634);
  --card: oklch(0.993 0.002 230.694);
  --card-foreground: oklch(0.116 0.013 223.634);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.394 0.029 231.954);
  --primary-foreground: oklch(0.901 0.012 230.842);
  --secondary: oklch(0.862 0.015 230.904);
  --secondary-foreground: oklch(0.344 0.022 231.754);
  --accent: oklch(0.862 0.015 230.904);
  --accent-foreground: oklch(0.344 0.022 231.754);
  --destructive: oklch(0.359 0.113 39.67);
  --destructive-foreground: oklch(0.848 0.088 44.185);
  --ring: oklch(0.394 0.029 231.954);
  --chart-1: oklch(0.394 0.029 231.954);
  --chart-2: oklch(0.862 0.015 230.904);
  --chart-3: oklch(0.862 0.015 230.904);
  --chart-4: oklch(0.885 0.012 230.855);
  --chart-5: oklch(0.395 0.033 232.19);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.007 226.53);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.261 0.017 231.743);
  --muted-foreground: oklch(0.741 0.005 230.743);
  --popover: oklch(0.116 0.007 226.53);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.116 0.007 226.53);
  --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.394 0.029 231.954);
  --primary-foreground: oklch(0.901 0.012 230.842);
  --secondary: oklch(0.314 0.02 231.714);
  --secondary-foreground: oklch(0.839 0.018 230.957);
  --accent: oklch(0.314 0.02 231.714);
  --accent-foreground: oklch(0.839 0.018 230.957);
  --destructive: oklch(0.683 0.211 39.018);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.394 0.029 231.954);
  --chart-1: oklch(0.394 0.029 231.954);
  --chart-2: oklch(0.314 0.02 231.714);
  --chart-3: oklch(0.314 0.02 231.714);
  --chart-4: oklch(0.344 0.022 231.754);
  --chart-5: oklch(0.395 0.033 232.19);
}