Size for shadcn/ui

Size is a shadcn/ui theme built around a neutral gray primary color (#545959) with neutral gray accents (#545659). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#545959) on a neutral background (#030707).

Color palette

TokenLightDark
Background
#ffffffwhite
#030707black
Foreground
#031417black
#fcfdfdwhite
Card
#fcfcfcsnow
#040a0bblack
Card foreground
#021012black
#ffffffwhite
Popover
#ffffffwhite
#030707black
Popover foreground
#031417black
#fcfdfdwhite
Primary
#545959dimgray
#545959dimgray
Primary foreground
#eff0f0whitesmoke
#eff0f0whitesmoke
Secondary
#545957dimgray
#545957dimgray
Secondary foreground
#eff0f0whitesmoke
#eff0f0whitesmoke
Muted
#e9f1eewhitesmoke
#0e1613black
Muted foreground
#4e5553darkslategray
#aab1aedarkgray
Accent
#545659dimgray
#545659dimgray
Accent foreground
#eff0f0whitesmoke
#eff0f0whitesmoke
Destructive
#b84314firebrick
#e86430chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#545959dimgray
#545959dimgray

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.93:1AAA
Primary button6.26:1AA
Secondary button6.22:1AA
Muted text6.66:1AA
Accent6.44:1AA
Destructive5.47:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.93:1AAA
Primary button6.26:1AA
Secondary button6.22:1AA
Muted text8.41:1AAA
Accent6.44:1AA
Destructive6.31:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.176 0.026 209.278);
  --muted: oklch(0.952 0.01 173.281);
  --muted-foreground: oklch(0.442 0.009 172.964);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.176 0.026 209.278);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.16 0.023 208.176);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.459 0.006 209.44);
  --primary-foreground: oklch(0.955 0.001 209.466);
  --secondary: oklch(0.46 0.007 173.112);
  --secondary-foreground: oklch(0.955 0.001 173.541);
  --accent: oklch(0.452 0.006 263.027);
  --accent-foreground: oklch(0.954 0.001 263.052);
  --destructive: oklch(0.538 0.161 39.064);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.459 0.006 209.44);
  --chart-1: oklch(0.459 0.006 209.44);
  --chart-2: oklch(0.46 0.007 173.112);
  --chart-3: oklch(0.452 0.006 263.027);
  --chart-4: oklch(0.488 0.008 173.106);
  --chart-5: oklch(0.462 0.011 209.429);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.01 206.836);
  --foreground: oklch(0.993 0.001 209.466);
  --muted: oklch(0.191 0.014 171.289);
  --muted-foreground: oklch(0.753 0.008 173.262);
  --popover: oklch(0.12 0.01 206.836);
  --popover-foreground: oklch(0.993 0.001 209.466);
  --card: oklch(0.138 0.011 207.032);
  --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.459 0.006 209.44);
  --primary-foreground: oklch(0.955 0.001 209.466);
  --secondary: oklch(0.46 0.007 173.112);
  --secondary-foreground: oklch(0.955 0.001 173.541);
  --accent: oklch(0.452 0.006 263.027);
  --accent-foreground: oklch(0.954 0.001 263.052);
  --destructive: oklch(0.661 0.176 40.43);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.459 0.006 209.44);
  --chart-1: oklch(0.459 0.006 209.44);
  --chart-2: oklch(0.46 0.007 173.112);
  --chart-3: oklch(0.452 0.006 263.027);
  --chart-4: oklch(0.488 0.008 173.106);
  --chart-5: oklch(0.462 0.011 209.429);
}