Pseudocode for shadcn/ui

Pseudocode is a shadcn/ui theme built around a neutral gray primary color (#51515d) with neutral gray accents (#56515d). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the neutral gray primary (#51515d) on a neutral background (#030308).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#030308black
Foreground
#000000black
#f6f6f8whitesmoke
Card
#f7f8fdghostwhite
#04040bblack
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#f7f8fdghostwhite
#04040bblack
Popover foreground
#000000black
#f9f9fbghostwhite
Primary
#51515ddimgray
#51515ddimgray
Primary foreground
#efeff1whitesmoke
#efeff1whitesmoke
Secondary
#51585ddimgray
#51585ddimgray
Secondary foreground
#eff0f1whitesmoke
#eff0f1whitesmoke
Muted
#d5dce2gainsboro
#1d252adarkslategray
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#56515ddimgray
#56515ddimgray
Accent foreground
#f0eff1whitesmoke
#f0eff1whitesmoke
Destructive
#ad1801firebrick
#f42201red
Destructive foreground
#ffe5e1mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#51515ddimgray
#51515ddimgray

Contrast

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

Light mode
Text on background20.37:1AAA
Text on card19.75:1AAA
Primary button6.78:1AA
Secondary button6.38:1AA
Muted text5.06:1AA
Accent6.74:1AA
Destructive6.06:1AA
Dark mode
Text on background19.08:1AAA
Text on card19.41:1AAA
Primary button6.78:1AA
Secondary button6.38:1AA
Muted text6.40:1AA
Accent6.74:1AA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 283.05);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.891 0.012 240.463);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.979 0.007 282.992);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 282.992);
  --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.44 0.019 282.364);
  --primary-foreground: oklch(0.952 0.003 283.059);
  --secondary: oklch(0.454 0.012 240.66);
  --secondary-foreground: oklch(0.954 0.002 240.309);
  --accent: oklch(0.443 0.021 305.12);
  --accent-foreground: oklch(0.952 0.003 305.697);
  --destructive: oklch(0.478 0.184 31.316);
  --destructive-foreground: oklch(0.941 0.029 28.122);
  --ring: oklch(0.44 0.019 282.364);
  --chart-1: oklch(0.44 0.019 282.364);
  --chart-2: oklch(0.454 0.012 240.66);
  --chart-3: oklch(0.443 0.021 305.12);
  --chart-4: oklch(0.482 0.013 240.665);
  --chart-5: oklch(0.433 0.027 282.001);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.017 278.381);
  --foreground: oklch(0.975 0.003 283.057);
  --muted: oklch(0.258 0.016 241.174);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.114 0.02 278.386);
  --popover-foreground: oklch(0.983 0.002 283.074);
  --card: oklch(0.114 0.02 278.386);
  --card-foreground: oklch(0.983 0.002 283.074);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.44 0.019 282.364);
  --primary-foreground: oklch(0.952 0.003 283.059);
  --secondary: oklch(0.454 0.012 240.66);
  --secondary-foreground: oklch(0.954 0.002 240.309);
  --accent: oklch(0.443 0.021 305.12);
  --accent-foreground: oklch(0.952 0.003 305.697);
  --destructive: oklch(0.616 0.24 30.914);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.44 0.019 282.364);
  --chart-1: oklch(0.44 0.019 282.364);
  --chart-2: oklch(0.454 0.012 240.66);
  --chart-3: oklch(0.443 0.021 305.12);
  --chart-4: oklch(0.482 0.013 240.665);
  --chart-5: oklch(0.433 0.027 282.001);
}