Conventional for shadcn/ui

Conventional is a shadcn/ui theme built around a yellow primary color (#7e6020) with blue accents (#203e7e). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#7e6020) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefdfbsnow
#000000black
Foreground
#050301black
#ffffffwhite
Card
#fcfbf7snow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfbf7snow
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#7e6020saddlebrown
#7e6020saddlebrown
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#203e7emidnightblue
#203e7emidnightblue
Secondary foreground
#dbe3f6lavender
#dbe3f6lavender
Muted
#ecedeewhitesmoke
#111113black
Muted foreground
#49505fdarkslategray
#a0a7b6darkgray
Accent
#203e7emidnightblue
#203e7emidnightblue
Accent foreground
#dbe3f6lavender
#dbe3f6lavender
Destructive
#91250dsaddlebrown
#ed5735tomato
Destructive foreground
#fbdcd5mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7e6020saddlebrown
#7e6020saddlebrown

Contrast

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

Light mode
Text on background20.23:1AAA
Text on card20.27:1AAA
Primary button5.86:1AA
Secondary button7.96:1AAA
Muted text6.88:1AA
Accent7.96:1AAA
Destructive6.56:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button5.86:1AA
Secondary button7.96:1AAA
Muted text7.79:1AAA
Accent7.96:1AAA
Destructive6.03:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 86.016);
  --foreground: oklch(0.101 0.016 93.727);
  --muted: oklch(0.945 0.002 265.995);
  --muted-foreground: oklch(0.431 0.026 265.622);
  --popover: oklch(0.988 0.005 86.026);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.005 86.026);
  --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.507 0.088 83.154);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.379 0.114 263.298);
  --secondary-foreground: oklch(0.915 0.027 265.85);
  --accent: oklch(0.379 0.114 263.298);
  --accent-foreground: oklch(0.915 0.027 265.85);
  --destructive: oklch(0.437 0.148 33.581);
  --destructive-foreground: oklch(0.918 0.036 32.722);
  --ring: oklch(0.507 0.088 83.154);
  --chart-1: oklch(0.507 0.088 83.154);
  --chart-2: oklch(0.379 0.114 263.298);
  --chart-3: oklch(0.379 0.114 263.298);
  --chart-4: oklch(0.403 0.123 263.264);
  --chart-5: oklch(0.512 0.091 82.78);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.179 0.004 265.902);
  --muted-foreground: oklch(0.727 0.023 265.835);
  --popover: oklch(0.092 0 180);
  --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.507 0.088 83.154);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.379 0.114 263.298);
  --secondary-foreground: oklch(0.915 0.027 265.85);
  --accent: oklch(0.379 0.114 263.298);
  --accent-foreground: oklch(0.915 0.027 265.85);
  --destructive: oklch(0.653 0.192 34.12);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.507 0.088 83.154);
  --chart-1: oklch(0.507 0.088 83.154);
  --chart-2: oklch(0.379 0.114 263.298);
  --chart-3: oklch(0.379 0.114 263.298);
  --chart-4: oklch(0.403 0.123 263.264);
  --chart-5: oklch(0.512 0.091 82.78);
}