Rhetoric for shadcn/ui

Rhetoric is a shadcn/ui theme built around a deep blue primary color (#191c39) with muted light blue accents (#e0e1eb). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the deep blue primary (#191c39) on a blue-tinted background (#040510).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#040510black
Foreground
#000000black
#f6f6f8whitesmoke
Card
#f7f8fdghostwhite
#050714black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#f7f8fdghostwhite
#050714black
Popover foreground
#000000black
#f9f9fbghostwhite
Primary
#191c39midnightblue
#191c39midnightblue
Primary foreground
#aaafdalightsteelblue
#aaafdalightsteelblue
Secondary
#e0e1ebgainsboro
#27293adarkslategray
Secondary foreground
#3d405cdarkslategray
#bfc1d4lightsteelblue
Muted
#dedfe8gainsboro
#171821black
Muted foreground
#373949darkslategray
#b6b8c8silver
Accent
#e0e1ebgainsboro
#27293adarkslategray
Accent foreground
#3d405cdarkslategray
#bfc1d4lightsteelblue
Destructive
#e04700orangered
#eb4a00orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#191c39midnightblue
#191c39midnightblue

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card19.75:1AAA
Primary button7.78:1AAA
Secondary button7.76:1AAA
Muted text8.56:1AAA
Accent7.76:1AAA
Destructive4.12:1AA Large
Dark mode
Text on background18.77:1AAA
Text on card19.08:1AAA
Primary button7.78:1AAA
Secondary button8.07:1AAA
Muted text8.99:1AAA
Accent8.07:1AAA
Destructive3.81:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 281.231);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.905 0.013 281.051);
  --muted-foreground: oklch(0.348 0.028 279.866);
  --popover: oklch(0.979 0.007 281.174);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.007 281.174);
  --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.24 0.055 276.683);
  --primary-foreground: oklch(0.764 0.062 279.864);
  --secondary: oklch(0.913 0.012 281.064);
  --secondary-foreground: oklch(0.382 0.047 279.014);
  --accent: oklch(0.913 0.012 281.064);
  --accent-foreground: oklch(0.382 0.047 279.014);
  --destructive: oklch(0.611 0.2 38.089);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.24 0.055 276.683);
  --chart-1: oklch(0.24 0.055 276.683);
  --chart-2: oklch(0.913 0.012 281.064);
  --chart-3: oklch(0.913 0.012 281.064);
  --chart-4: oklch(0.939 0.009 281.138);
  --chart-5: oklch(0.238 0.059 276.192);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.026 275.016);
  --foreground: oklch(0.975 0.003 281.245);
  --muted: oklch(0.212 0.019 279.689);
  --muted-foreground: oklch(0.787 0.023 280.807);
  --popover: oklch(0.134 0.031 275.167);
  --popover-foreground: oklch(0.983 0.002 281.259);
  --card: oklch(0.134 0.031 275.167);
  --card-foreground: oklch(0.983 0.002 281.259);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.24 0.055 276.683);
  --primary-foreground: oklch(0.764 0.062 279.864);
  --secondary: oklch(0.286 0.032 279.244);
  --secondary-foreground: oklch(0.815 0.027 280.733);
  --accent: oklch(0.286 0.032 279.244);
  --accent-foreground: oklch(0.815 0.027 280.733);
  --destructive: oklch(0.631 0.207 37.987);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.24 0.055 276.683);
  --chart-1: oklch(0.24 0.055 276.683);
  --chart-2: oklch(0.286 0.032 279.244);
  --chart-3: oklch(0.286 0.032 279.244);
  --chart-4: oklch(0.313 0.036 279.164);
  --chart-5: oklch(0.238 0.059 276.192);
}