Xcode Civic (Dark) for shadcn/ui

Xcode Civic (Dark) is a shadcn/ui theme built around a neutral gray primary color (#dedede) with muted blue accents (#4b4e63). The light mode uses a blue-tinted background (#2a2c37). Dark mode keeps the neutral gray primary (#dedede) on a blue-tinted background (#2a2c37).

Color palette

TokenLightDark
Background
#2a2c37darkslategray
#2a2c37darkslategray
Foreground
#e0e0e1gainsboro
#e0e0e1gainsboro
Card
#252731darkslategray
#252731darkslategray
Card foreground
#ededeewhitesmoke
#ededeewhitesmoke
Popover
#23252fdarkslategray
#23252fdarkslategray
Popover foreground
#fafafasnow
#fafafasnow
Primary
#dededegainsboro
#dededegainsboro
Primary foreground
#454545darkslategray
#454545darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#343642darkslategray
#343642darkslategray
Muted foreground
#b2b4c2silver
#b2b4c2silver
Accent
#4b4e63darkslategray
#4b4e63darkslategray
Accent foreground
#eeeef2whitesmoke
#eeeef2whitesmoke
Destructive
#f22e1corangered
#f22e1corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#3b3b40darkslategray
#3b3b40darkslategray
Input
#424348darkslategray
#424348darkslategray
Ring
#dededegainsboro
#dededegainsboro

Contrast

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

Light mode
Text on background10.55:1AAA
Text on card12.67:1AAA
Primary button7.11:1AAA
Secondary button7.37:1AAA
Muted text5.84:1AA
Accent7.05:1AAA
Destructive4.05:1AA Large
Dark mode
Text on background10.55:1AAA
Text on card12.67:1AAA
Primary button7.11:1AAA
Secondary button7.37:1AAA
Muted text5.84:1AA
Accent7.05:1AAA
Destructive4.05:1AA Large

CSS variables

Paste this into your globals.css to use Xcode Civic (Dark) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.295 0.021 277.173);
  --foreground: oklch(0.906 0.002 286.367);
  --muted: oklch(0.335 0.021 277.316);
  --muted-foreground: oklch(0.773 0.02 277.93);
  --popover: oklch(0.266 0.018 277.227);
  --popover-foreground: oklch(0.985 0 286.395);
  --card: oklch(0.276 0.019 277.207);
  --card-foreground: oklch(0.946 0.001 286.381);
  --border: oklch(0.355 0.007 278.017);
  --input: oklch(0.384 0.008 278.01);
  --primary: oklch(0.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.43 0.034 277.022);
  --accent-foreground: oklch(0.95 0.005 278.243);
  --destructive: oklch(0.621 0.231 30.033);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.43 0.034 277.022);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.899 0.002 17.198);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.295 0.021 277.173);
  --foreground: oklch(0.906 0.002 286.367);
  --muted: oklch(0.335 0.021 277.316);
  --muted-foreground: oklch(0.773 0.02 277.93);
  --popover: oklch(0.266 0.018 277.227);
  --popover-foreground: oklch(0.985 0 286.395);
  --card: oklch(0.276 0.019 277.207);
  --card-foreground: oklch(0.946 0.001 286.381);
  --border: oklch(0.355 0.007 278.017);
  --input: oklch(0.384 0.008 278.01);
  --primary: oklch(0.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.43 0.034 277.022);
  --accent-foreground: oklch(0.95 0.005 278.243);
  --destructive: oklch(0.621 0.231 30.033);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.43 0.034 277.022);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.899 0.002 17.198);
}