Consensus for shadcn/ui

Consensus is a shadcn/ui theme built around a vivid cyan primary color (#116e88) with vivid blue accents (#113388). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid cyan primary (#116e88) on a neutral background (#030708).

Color palette

TokenLightDark
Background
#ffffffwhite
#030708black
Foreground
#041216black
#ffffffwhite
Card
#ffffffwhite
#030708black
Card foreground
#041216black
#ffffffwhite
Popover
#ffffffwhite
#030708black
Popover foreground
#041216black
#ffffffwhite
Primary
#116e88teal
#116e88teal
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#118866teal
#118866teal
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dbe6e3gainsboro
#192421black
Muted foreground
#434746darkslategray
#b8bcbbsilver
Accent
#113388midnightblue
#113388midnightblue
Accent foreground
#d2ddf9lavender
#d2ddf9lavender
Destructive
#b43a0efirebrick
#f17041tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#116e88teal
#116e88teal

Contrast

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

Light mode
Text on background19.03:1AAA
Text on card19.03:1AAA
Primary button5.79:1AA
Secondary button4.42:1AA Large
Muted text7.38:1AAA
Accent8.36:1AAA
Destructive5.90:1AA
Dark mode
Text on background20.29:1AAA
Text on card20.29:1AAA
Primary button5.79:1AA
Secondary button4.42:1AA Large
Muted text8.29:1AAA
Accent8.36:1AAA
Destructive7.12:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.17 0.022 216.311);
  --muted: oklch(0.916 0.013 177.293);
  --muted-foreground: oklch(0.393 0.006 177.283);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.17 0.022 216.311);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.17 0.022 216.311);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.502 0.089 222.643);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.559 0.11 167.134);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.357 0.148 263.895);
  --accent-foreground: oklch(0.898 0.041 268.41);
  --destructive: oklch(0.522 0.166 37.371);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.502 0.089 222.643);
  --chart-1: oklch(0.502 0.089 222.643);
  --chart-2: oklch(0.559 0.11 167.134);
  --chart-3: oklch(0.357 0.148 263.895);
  --chart-4: oklch(0.599 0.119 166.997);
  --chart-5: oklch(0.506 0.091 223.063);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.011 212.166);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.25 0.017 175.501);
  --muted-foreground: oklch(0.792 0.005 177.535);
  --popover: oklch(0.119 0.011 212.166);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.119 0.011 212.166);
  --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.502 0.089 222.643);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.559 0.11 167.134);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.357 0.148 263.895);
  --accent-foreground: oklch(0.898 0.041 268.41);
  --destructive: oklch(0.692 0.17 39.821);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.502 0.089 222.643);
  --chart-1: oklch(0.502 0.089 222.643);
  --chart-2: oklch(0.559 0.11 167.134);
  --chart-3: oklch(0.357 0.148 263.895);
  --chart-4: oklch(0.599 0.119 166.997);
  --chart-5: oklch(0.506 0.091 223.063);
}