Expectation for shadcn/ui

Expectation is a shadcn/ui theme built around a muted red primary color (#6e3f49) with muted blue accents (#3f496e). The light mode uses a neutral background (#fdfbfc). Dark mode keeps the muted red primary (#6e3f49) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#fdfbfcsnow
#040102black
Foreground
#150408black
#ffffffwhite
Card
#fdfbfcsnow
#040102black
Card foreground
#150408black
#ffffffwhite
Popover
#fdfbfcsnow
#040102black
Popover foreground
#150408black
#ffffffwhite
Primary
#6e3f49dimgray
#6e3f49dimgray
Primary foreground
#f4ecedlinen
#f4ecedlinen
Secondary
#496e3fdarkolivegreen
#496e3fdarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#daecd5gainsboro
#182a13black
Muted foreground
#5c5c5cdimgray
#a3a3a3darkgray
Accent
#3f496edarkslateblue
#3f496edarkslateblue
Accent foreground
#ecedf4lavender
#ecedf4lavender
Destructive
#d70404red
#fa0505red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6e3f49dimgray
#6e3f49dimgray

Contrast

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

Light mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button7.28:1AAA
Secondary button5.84:1AA
Muted text5.39:1AA
Accent7.48:1AAA
Destructive5.37:1AA
Dark mode
Text on background20.76:1AAA
Text on card20.76:1AAA
Primary button7.28:1AAA
Secondary button5.84:1AA
Muted text6.02:1AA
Accent7.48:1AAA
Destructive4.12:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 2.126);
  --foreground: oklch(0.144 0.034 5.443);
  --muted: oklch(0.923 0.037 138.907);
  --muted-foreground: oklch(0.474 0 198.435);
  --popover: oklch(0.991 0.002 2.126);
  --popover-foreground: oklch(0.144 0.034 5.443);
  --card: oklch(0.991 0.002 2.126);
  --card-foreground: oklch(0.144 0.034 5.443);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.428 0.066 6.269);
  --primary-foreground: oklch(0.949 0.009 2.333);
  --secondary: oklch(0.498 0.083 139.066);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.415 0.063 271.623);
  --accent-foreground: oklch(0.948 0.009 273.758);
  --destructive: oklch(0.553 0.225 29.074);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.428 0.066 6.269);
  --chart-1: oklch(0.428 0.066 6.269);
  --chart-2: oklch(0.498 0.083 139.066);
  --chart-3: oklch(0.415 0.063 271.623);
  --chart-4: oklch(0.529 0.089 139.07);
  --chart-5: oklch(0.427 0.074 6.801);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.012 2.173);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.263 0.048 139.111);
  --muted-foreground: oklch(0.716 0 165.964);
  --popover: oklch(0.085 0.012 2.173);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.085 0.012 2.173);
  --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.428 0.066 6.269);
  --primary-foreground: oklch(0.949 0.009 2.333);
  --secondary: oklch(0.498 0.083 139.066);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.415 0.063 271.623);
  --accent-foreground: oklch(0.948 0.009 273.758);
  --destructive: oklch(0.619 0.253 29.102);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.428 0.066 6.269);
  --chart-1: oklch(0.428 0.066 6.269);
  --chart-2: oklch(0.498 0.083 139.066);
  --chart-3: oklch(0.415 0.063 271.623);
  --chart-4: oklch(0.529 0.089 139.07);
  --chart-5: oklch(0.427 0.074 6.801);
}