Square for shadcn/ui

Square is a shadcn/ui theme built around a deep cyan primary color (#0b2528) with muted cyan accents (#a9babc). The light mode uses a neutral background (#f7fcfd). Dark mode keeps the deep cyan primary (#0b2528) on a cyan-tinted background (#040f10).

Color palette

TokenLightDark
Background
#f7fcfdghostwhite
#040f10black
Foreground
#020c0dblack
#fcfdfdwhite
Card
#f3fbfcmintcream
#051314black
Card foreground
#020809black
#ffffffwhite
Popover
#f7fcfdghostwhite
#040f10black
Popover foreground
#020c0dblack
#fcfdfdwhite
Primary
#0b2528black
#0b2528black
Primary foreground
#37bac8mediumturquoise
#37bac8mediumturquoise
Secondary
#cbcdcdlightgrey
#131616black
Secondary foreground
#323434darkslategray
#a7b3b4darkgray
Muted
#eceeefwhitesmoke
#101313black
Muted foreground
#586d6fdimgray
#90a5a7darkgray
Accent
#a9babcsilver
#1c2526black
Accent foreground
#161c1dblack
#b0c2c4silver
Destructive
#5f0b07maroon
#f13b32crimson
Destructive foreground
#f8a4a0lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0b2528black
#0b2528black

Contrast

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

Light mode
Text on background19.16:1AAA
Text on card19.22:1AAA
Primary button6.87:1AA
Secondary button7.83:1AAA
Muted text4.71:1AA
Accent8.56:1AAA
Destructive7.01:1AAA
Dark mode
Text on background19.06:1AAA
Text on card18.96:1AAA
Primary button6.87:1AA
Secondary button8.46:1AAA
Muted text7.21:1AAA
Accent8.45:1AAA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 204.944);
  --foreground: oklch(0.143 0.018 202.685);
  --muted: oklch(0.948 0.003 204.964);
  --muted-foreground: oklch(0.518 0.026 204.713);
  --popover: oklch(0.988 0.006 204.944);
  --popover-foreground: oklch(0.143 0.018 202.685);
  --card: oklch(0.982 0.009 204.921);
  --card-foreground: oklch(0.124 0.015 201.896);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.246 0.032 205.201);
  --primary-foreground: oklch(0.725 0.111 206.006);
  --secondary: oklch(0.846 0.002 204.971);
  --secondary-foreground: oklch(0.323 0.003 204.929);
  --accent: oklch(0.776 0.018 204.827);
  --accent-foreground: oklch(0.221 0.008 204.757);
  --destructive: oklch(0.314 0.117 29.15);
  --destructive-foreground: oklch(0.801 0.101 22.866);
  --ring: oklch(0.246 0.032 205.201);
  --chart-1: oklch(0.246 0.032 205.201);
  --chart-2: oklch(0.846 0.002 204.971);
  --chart-3: oklch(0.776 0.018 204.827);
  --chart-4: oklch(0.87 0.002 204.975);
  --chart-5: oklch(0.248 0.033 205.291);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.017 203.807);
  --foreground: oklch(0.993 0.002 204.977);
  --muted: oklch(0.184 0.005 204.819);
  --muted-foreground: oklch(0.706 0.024 204.771);
  --popover: oklch(0.157 0.017 203.807);
  --popover-foreground: oklch(0.993 0.002 204.977);
  --card: oklch(0.173 0.02 204.375);
  --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.246 0.032 205.201);
  --primary-foreground: oklch(0.725 0.111 206.006);
  --secondary: oklch(0.196 0.005 204.827);
  --secondary-foreground: oklch(0.757 0.013 204.864);
  --accent: oklch(0.257 0.013 204.713);
  --accent-foreground: oklch(0.802 0.021 204.816);
  --destructive: oklch(0.63 0.219 28.304);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.246 0.032 205.201);
  --chart-1: oklch(0.246 0.032 205.201);
  --chart-2: oklch(0.196 0.005 204.827);
  --chart-3: oklch(0.257 0.013 204.713);
  --chart-4: oklch(0.23 0.006 204.811);
  --chart-5: oklch(0.248 0.033 205.291);
}