Fair for shadcn/ui

Fair is a shadcn/ui theme built around a muted orange primary color (#a18b78) with muted blue accents (#788ea1). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the muted orange primary (#a18b78) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfaf7snow
#000000black
Foreground
#040201black
#ffffffwhite
Card
#fcf7f3floralwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfaf7snow
#000000black
Popover foreground
#040201black
#ffffffwhite
Primary
#a18b78gray
#a18b78gray
Primary foreground
#000000black
#000000black
Secondary
#788ea1lightslategray
#788ea1lightslategray
Secondary foreground
#000000black
#000000black
Muted
#d6dee5gainsboro
#1a2229black
Muted foreground
#4d4f51darkslategray
#aeb0b2darkgray
Accent
#788ea1lightslategray
#788ea1lightslategray
Accent foreground
#000000black
#000000black
Destructive
#8e390bsaddlebrown
#f07b3dcoral
Destructive foreground
#fbdfd0blanchedalmond
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a18b78gray
#a18b78gray

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.73:1AAA
Primary button6.46:1AA
Secondary button6.15:1AA
Muted text6.06:1AA
Accent6.15:1AA
Destructive6.04:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button6.46:1AA
Secondary button6.15:1AA
Muted text7.42:1AAA
Accent6.15:1AA
Destructive7.64:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.005 64.022);
  --foreground: oklch(0.094 0.011 73.2);
  --muted: oklch(0.898 0.013 244.271);
  --muted-foreground: oklch(0.427 0.005 244.233);
  --popover: oklch(0.986 0.005 64.022);
  --popover-foreground: oklch(0.094 0.011 73.2);
  --card: oklch(0.979 0.008 63.988);
  --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.651 0.039 63.264);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.635 0.039 244.857);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.635 0.039 244.857);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.456 0.128 43.363);
  --destructive-foreground: oklch(0.923 0.038 50.162);
  --ring: oklch(0.651 0.039 63.264);
  --chart-1: oklch(0.651 0.039 63.264);
  --chart-2: oklch(0.635 0.039 244.857);
  --chart-3: oklch(0.635 0.039 244.857);
  --chart-4: oklch(0.66 0.036 244.768);
  --chart-5: oklch(0.653 0.045 63.105);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.246 0.018 245.029);
  --muted-foreground: oklch(0.756 0.004 244.16);
  --popover: oklch(0 0 0);
  --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.651 0.039 63.264);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.635 0.039 244.857);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.635 0.039 244.857);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.708 0.162 46.452);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.651 0.039 63.264);
  --chart-1: oklch(0.651 0.039 63.264);
  --chart-2: oklch(0.635 0.039 244.857);
  --chart-3: oklch(0.635 0.039 244.857);
  --chart-4: oklch(0.66 0.036 244.768);
  --chart-5: oklch(0.653 0.045 63.105);
}