Fair for shadcn/ui

Fair is a shadcn/ui theme built around an orange primary color (#7c5031) with violet accents (#50317c). The light mode uses a neutral background (#fefcfb). Dark mode keeps the orange primary (#7c5031) on an orange-tinted background (#0e0a07).

Color palette

TokenLightDark
Background
#fefcfbsnow
#0e0a07black
Foreground
#150b05black
#fbfaf9snow
Card
#fcfaf8snow
#110c08black
Card foreground
#110904black
#fdfcfcsnow
Popover
#fefcfbsnow
#0e0a07black
Popover foreground
#150b05black
#fbfaf9snow
Primary
#7c5031saddlebrown
#7c5031saddlebrown
Primary foreground
#f6efe9linen
#f6efe9linen
Secondary
#317c50seagreen
#317c50seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dde9e2gainsboro
#16221bblack
Muted foreground
#454f49darkslategray
#b0bab4silver
Accent
#50317cdarkslateblue
#50317cdarkslateblue
Accent foreground
#efe9f6lavender
#efe9f6lavender
Destructive
#a9340afirebrick
#ec490eorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7c5031saddlebrown
#7c5031saddlebrown

Contrast

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

Light mode
Text on background18.99:1AAA
Text on card18.89:1AAA
Primary button6.01:1AA
Secondary button5.08:1AA
Muted text6.80:1AA
Accent8.47:1AAA
Destructive6.60:1AA
Dark mode
Text on background18.95:1AAA
Text on card18.97:1AAA
Primary button6.01:1AA
Secondary button5.08:1AA
Muted text8.25:1AAA
Accent8.47:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 58.335);
  --foreground: oklch(0.162 0.022 60.21);
  --muted: oklch(0.922 0.015 160.631);
  --muted-foreground: oklch(0.417 0.017 160.045);
  --popover: oklch(0.993 0.002 58.335);
  --popover-foreground: oklch(0.162 0.022 60.21);
  --card: oklch(0.985 0.004 58.307);
  --card-foreground: oklch(0.149 0.019 63.783);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.475 0.074 55.432);
  --primary-foreground: oklch(0.955 0.011 58.201);
  --secondary: oklch(0.527 0.101 154.975);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.391 0.122 299.994);
  --accent-foreground: oklch(0.942 0.018 304.774);
  --destructive: oklch(0.495 0.159 37.113);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.475 0.074 55.432);
  --chart-1: oklch(0.475 0.074 55.432);
  --chart-2: oklch(0.527 0.101 154.975);
  --chart-3: oklch(0.391 0.122 299.994);
  --chart-4: oklch(0.56 0.108 154.909);
  --chart-5: oklch(0.477 0.079 55.115);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.01 61.041);
  --foreground: oklch(0.985 0.002 58.337);
  --muted: oklch(0.237 0.02 158.814);
  --muted-foreground: oklch(0.78 0.014 160.577);
  --popover: oklch(0.147 0.01 61.041);
  --popover-foreground: oklch(0.985 0.002 58.337);
  --card: oklch(0.16 0.012 58.026);
  --card-foreground: oklch(0.992 0.001 58.35);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.475 0.074 55.432);
  --primary-foreground: oklch(0.955 0.011 58.201);
  --secondary: oklch(0.527 0.101 154.975);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.391 0.122 299.994);
  --accent-foreground: oklch(0.942 0.018 304.774);
  --destructive: oklch(0.633 0.208 36.651);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.475 0.074 55.432);
  --chart-1: oklch(0.475 0.074 55.432);
  --chart-2: oklch(0.527 0.101 154.975);
  --chart-3: oklch(0.391 0.122 299.994);
  --chart-4: oklch(0.56 0.108 154.909);
  --chart-5: oklch(0.477 0.079 55.115);
}