Romance for shadcn/ui

Romance is a shadcn/ui theme built around a deep green primary color (#244c2e) with muted light green accents (#e5ebe6). The light mode uses a neutral background (#fbfefc). Dark mode keeps the deep green primary (#244c2e) on a green-tinted background (#050f08).

Color palette

TokenLightDark
Background
#fbfefcwhite
#050f08black
Foreground
#020e04black
#ffffffwhite
Card
#f8fcf9mintcream
#071309black
Card foreground
#010903black
#ffffffwhite
Popover
#fbfefcwhite
#050f08black
Popover foreground
#020e04black
#ffffffwhite
Primary
#244c2edarkslategray
#244c2edarkslategray
Primary foreground
#c1e1c9lightgrey
#c1e1c9lightgrey
Secondary
#e5ebe6gainsboro
#2d342fdarkslategray
Secondary foreground
#435b49darkslategray
#c6cdc7silver
Muted
#dbe6ddgainsboro
#19241bblack
Muted foreground
#3f403fdarkslategray
#bfc0bfsilver
Accent
#e5ebe6gainsboro
#2d342fdarkslategray
Accent foreground
#435b49darkslategray
#c6cdc7silver
Destructive
#a7250cfirebrick
#db310forangered
Destructive foreground
#fdebe7linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#244c2edarkslategray
#244c2edarkslategray

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card19.48:1AAA
Primary button6.94:1AA
Secondary button6.14:1AA
Muted text8.12:1AAA
Accent6.14:1AA
Destructive6.24:1AA
Dark mode
Text on background19.45:1AAA
Text on card18.99:1AAA
Primary button6.94:1AA
Secondary button7.89:1AAA
Muted text8.75:1AAA
Accent7.89:1AAA
Destructive4.69:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 153.185);
  --foreground: oklch(0.145 0.031 151.918);
  --muted: oklch(0.914 0.017 152.93);
  --muted-foreground: oklch(0.371 0.002 153.136);
  --popover: oklch(0.994 0.003 153.185);
  --popover-foreground: oklch(0.145 0.031 151.918);
  --card: oklch(0.987 0.007 153.127);
  --card-foreground: oklch(0.125 0.027 152.237);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.378 0.068 149.703);
  --primary-foreground: oklch(0.88 0.048 152.321);
  --secondary: oklch(0.935 0.01 153.063);
  --secondary-foreground: oklch(0.446 0.041 151.611);
  --accent: oklch(0.935 0.01 153.063);
  --accent-foreground: oklch(0.446 0.041 151.611);
  --destructive: oklch(0.477 0.169 32.66);
  --destructive-foreground: oklch(0.953 0.021 31.096);
  --ring: oklch(0.378 0.068 149.703);
  --chart-1: oklch(0.378 0.068 149.703);
  --chart-2: oklch(0.935 0.01 153.063);
  --chart-3: oklch(0.935 0.01 153.063);
  --chart-4: oklch(0.957 0.007 153.125);
  --chart-5: oklch(0.381 0.073 149.415);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.023 151.868);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.248 0.023 151.574);
  --muted-foreground: oklch(0.806 0.002 153.201);
  --popover: oklch(0.156 0.023 151.868);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.171 0.027 150.984);
  --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.378 0.068 149.703);
  --primary-foreground: oklch(0.88 0.048 152.321);
  --secondary: oklch(0.316 0.013 152.548);
  --secondary-foreground: oklch(0.841 0.011 153.019);
  --accent: oklch(0.316 0.013 152.548);
  --accent-foreground: oklch(0.841 0.011 153.019);
  --destructive: oklch(0.582 0.21 32.495);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.378 0.068 149.703);
  --chart-1: oklch(0.378 0.068 149.703);
  --chart-2: oklch(0.316 0.013 152.548);
  --chart-3: oklch(0.316 0.013 152.548);
  --chart-4: oklch(0.347 0.015 152.526);
  --chart-5: oklch(0.381 0.073 149.415);
}