Civilisation for shadcn/ui

Civilisation is a shadcn/ui theme built around a neutral gray primary color (#616465) with muted light blue accents (#d1d7dc). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#616465) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040e16black
#fcfdfdwhite
Card
#ffffffwhite
#000000black
Card foreground
#040e16black
#fcfdfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#040e16black
#fcfdfdwhite
Primary
#616465dimgray
#616465dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d1d7dclightgrey
#212427darkslategray
Secondary foreground
#353f45darkslategray
#b7bec2silver
Muted
#ebeeefwhitesmoke
#101214black
Muted foreground
#45545edarkslategray
#a1afbadarkgray
Accent
#d1d7dclightgrey
#212427darkslategray
Accent foreground
#353f45darkslategray
#b7bec2silver
Destructive
#7b2c04saddlebrown
#dd4f08chocolate
Destructive foreground
#fccdb5peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#616465dimgray
#616465dimgray

Contrast

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

Light mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button5.97:1AA
Secondary button7.42:1AAA
Muted text6.69:1AA
Accent7.42:1AAA
Destructive6.59:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.60:1AAA
Primary button5.97:1AA
Secondary button8.28:1AAA
Muted text8.35:1AAA
Accent8.28:1AAA
Destructive4.02:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.158 0.024 237.534);
  --muted: oklch(0.946 0.004 238.416);
  --muted-foreground: oklch(0.436 0.025 239.228);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.158 0.024 237.534);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.158 0.024 237.534);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.501 0.004 238.473);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.876 0.009 238.51);
  --secondary-foreground: oklch(0.36 0.017 239.065);
  --accent: oklch(0.876 0.009 238.51);
  --accent-foreground: oklch(0.36 0.017 239.065);
  --destructive: oklch(0.404 0.119 41.663);
  --destructive-foreground: oklch(0.883 0.063 47.99);
  --ring: oklch(0.501 0.004 238.473);
  --chart-1: oklch(0.501 0.004 238.473);
  --chart-2: oklch(0.876 0.009 238.51);
  --chart-3: oklch(0.876 0.009 238.51);
  --chart-4: oklch(0.9 0.007 238.478);
  --chart-5: oklch(0.501 0.01 238.643);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 238.374);
  --muted: oklch(0.181 0.005 238.798);
  --muted-foreground: oklch(0.747 0.022 238.785);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 238.374);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 238.374);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.501 0.004 238.473);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.259 0.007 238.732);
  --secondary-foreground: oklch(0.797 0.009 238.528);
  --accent: oklch(0.259 0.007 238.732);
  --accent-foreground: oklch(0.797 0.009 238.528);
  --destructive: oklch(0.615 0.19 40.13);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.501 0.004 238.473);
  --chart-1: oklch(0.501 0.004 238.473);
  --chart-2: oklch(0.259 0.007 238.732);
  --chart-3: oklch(0.259 0.007 238.732);
  --chart-4: oklch(0.29 0.008 238.752);
  --chart-5: oklch(0.501 0.01 238.643);
}