Forthright for shadcn/ui

Forthright is a shadcn/ui theme built around a vivid light red primary color (#f896a1) with near-white accents (#ebeaea). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light red primary (#f896a1) on a neutral background (#070304).

Color palette

TokenLightDark
Background
#ffffffwhite
#070304black
Foreground
#150506black
#ffffffwhite
Card
#fcfcfcsnow
#0b0505black
Card foreground
#110405black
#ffffffwhite
Popover
#ffffffwhite
#070304black
Popover foreground
#150506black
#ffffffwhite
Primary
#f896a1lightcoral
#f896a1lightcoral
Primary foreground
#56060fmaroon
#56060fmaroon
Secondary
#ebeaealinen
#181616black
Secondary foreground
#554e4fdarkslategray
#b4acaddarkgray
Muted
#e3dedfgainsboro
#211c1dblack
Muted foreground
#675f60dimgray
#a09899darkgray
Accent
#ebeaealinen
#181616black
Accent foreground
#554e4fdarkslategray
#b4acaddarkgray
Destructive
#d43008firebrick
#f75026tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f896a1lightcoral
#f896a1lightcoral

Contrast

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

Light mode
Text on background19.88:1AAA
Text on card19.69:1AAA
Primary button6.89:1AA
Secondary button6.75:1AA
Muted text4.66:1AA
Accent6.75:1AA
Destructive4.97:1AA
Dark mode
Text on background20.49:1AAA
Text on card20.25:1AAA
Primary button6.89:1AA
Secondary button8.11:1AAA
Muted text5.95:1AA
Accent8.11:1AAA
Destructive3.41:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.144 0.032 12.498);
  --muted: oklch(0.904 0.005 9.051);
  --muted-foreground: oklch(0.495 0.01 9.4);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.144 0.032 12.498);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.131 0.028 11.445);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.777 0.119 12.691);
  --primary-foreground: oklch(0.292 0.111 22.692);
  --secondary: oklch(0.938 0.002 8.955);
  --secondary-foreground: oklch(0.432 0.009 9.387);
  --accent: oklch(0.938 0.002 8.955);
  --accent-foreground: oklch(0.432 0.009 9.387);
  --destructive: oklch(0.568 0.204 33.319);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.777 0.119 12.691);
  --chart-1: oklch(0.777 0.119 12.691);
  --chart-2: oklch(0.938 0.002 8.955);
  --chart-3: oklch(0.938 0.002 8.955);
  --chart-4: oklch(0.961 0.001 8.937);
  --chart-5: oklch(0.776 0.123 12.844);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.012 9.622);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.008 9.689);
  --muted-foreground: oklch(0.685 0.009 9.235);
  --popover: oklch(0.108 0.012 9.622);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.013 9.632);
  --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.777 0.119 12.691);
  --primary-foreground: oklch(0.292 0.111 22.692);
  --secondary: oklch(0.202 0.004 9.343);
  --secondary-foreground: oklch(0.751 0.009 9.198);
  --accent: oklch(0.202 0.004 9.343);
  --accent-foreground: oklch(0.751 0.009 9.198);
  --destructive: oklch(0.659 0.21 34.673);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.777 0.119 12.691);
  --chart-1: oklch(0.777 0.119 12.691);
  --chart-2: oklch(0.202 0.004 9.343);
  --chart-3: oklch(0.202 0.004 9.343);
  --chart-4: oklch(0.235 0.005 9.389);
  --chart-5: oklch(0.776 0.123 12.844);
}