Convention for shadcn/ui

Convention is a shadcn/ui theme built around a light cyan primary color (#e9f6fb) with light blue accents (#e9edfb). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the light cyan primary (#e9f6fb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdfewhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#f7fbfcghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdfewhite
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#e9f6fbaliceblue
#e9f6fbaliceblue
Primary foreground
#0c3141darkslategray
#0c3141darkslategray
Secondary
#e9fbf8aliceblue
#e9fbf8aliceblue
Secondary foreground
#0c4136darkslategray
#0c4136darkslategray
Muted
#d4e7e4gainsboro
#182b27darkslategray
Muted foreground
#4c5755darkslategray
#a8b3b1darkgray
Accent
#e9edfblavender
#e9edfblavender
Accent foreground
#1c3497darkslateblue
#1c3497darkslateblue
Destructive
#721709maroon
#ef4025orangered
Destructive foreground
#f9bcb3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e9f6fbaliceblue
#e9f6fbaliceblue

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.16:1AAA
Primary button12.42:1AAA
Secondary button10.75:1AAA
Muted text5.85:1AA
Accent9.04:1AAA
Destructive7.00:1AAA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button12.42:1AAA
Secondary button10.75:1AAA
Muted text6.91:1AA
Accent9.04:1AAA
Destructive3.88:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 225.007);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.914 0.021 182.546);
  --muted-foreground: oklch(0.447 0.015 182.255);
  --popover: oklch(0.993 0.002 225.007);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.986 0.004 225.031);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.965 0.015 225.162);
  --primary-foreground: oklch(0.295 0.05 230.493);
  --secondary: oklch(0.974 0.019 182.645);
  --secondary-foreground: oklch(0.337 0.057 176.065);
  --accent: oklch(0.947 0.019 274.778);
  --accent-foreground: oklch(0.378 0.163 266.912);
  --destructive: oklch(0.362 0.127 31.647);
  --destructive-foreground: oklch(0.849 0.072 28.604);
  --ring: oklch(0.965 0.015 225.162);
  --chart-1: oklch(0.965 0.015 225.162);
  --chart-2: oklch(0.974 0.019 182.645);
  --chart-3: oklch(0.947 0.019 274.778);
  --chart-4: oklch(0.99 0.008 182.973);
  --chart-5: oklch(0.965 0.016 225.17);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.27 0.026 180.146);
  --muted-foreground: oklch(0.757 0.013 182.705);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.965 0.015 225.162);
  --primary-foreground: oklch(0.295 0.05 230.493);
  --secondary: oklch(0.974 0.019 182.645);
  --secondary-foreground: oklch(0.337 0.057 176.065);
  --accent: oklch(0.947 0.019 274.778);
  --accent-foreground: oklch(0.378 0.163 266.912);
  --destructive: oklch(0.629 0.215 31.66);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.965 0.015 225.162);
  --chart-1: oklch(0.965 0.015 225.162);
  --chart-2: oklch(0.974 0.019 182.645);
  --chart-3: oklch(0.947 0.019 274.778);
  --chart-4: oklch(0.99 0.008 182.973);
  --chart-5: oklch(0.965 0.016 225.17);
}