Faraway for shadcn/ui

Faraway is a shadcn/ui theme built around a yellow primary color (#dcd07f) with green accents (#badc7f). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#dcd07f) on a neutral background (#070603).

Color palette

TokenLightDark
Background
#ffffffwhite
#070603black
Foreground
#100f04black
#fdfdfcwhite
Card
#ffffffwhite
#070603black
Card foreground
#100f04black
#fdfdfcwhite
Popover
#ffffffwhite
#070603black
Popover foreground
#100f04black
#fdfdfcwhite
Primary
#dcd07fburlywood
#dcd07fburlywood
Primary foreground
#201d09black
#201d09black
Secondary
#dca17fdarksalmon
#dca17fdarksalmon
Secondary foreground
#201109black
#201109black
Muted
#f1ecealinen
#15110eblack
Muted foreground
#5f5e5ddimgray
#a2a0a0darkgray
Accent
#badc7fdarkkhaki
#badc7fdarkkhaki
Accent foreground
#182009black
#182009black
Destructive
#640402maroon
#fa0905red
Destructive foreground
#fd9d9blightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dcd07fburlywood
#dcd07fburlywood

Contrast

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

Light mode
Text on background19.22:1AAA
Text on card19.22:1AAA
Primary button10.73:1AAA
Secondary button8.24:1AAA
Muted text5.52:1AA
Accent10.89:1AAA
Destructive6.72:1AA
Dark mode
Text on background19.86:1AAA
Text on card19.86:1AAA
Primary button10.73:1AAA
Secondary button8.24:1AAA
Muted text7.21:1AAA
Accent10.89:1AAA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.165 0.023 101.729);
  --muted: oklch(0.946 0.006 52.498);
  --muted-foreground: oklch(0.483 0.002 52.527);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.165 0.023 101.729);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.165 0.023 101.729);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.849 0.103 100.642);
  --primary-foreground: oklch(0.228 0.034 100.702);
  --secondary: oklch(0.757 0.084 51.114);
  --secondary-foreground: oklch(0.197 0.029 50.554);
  --accent: oklch(0.848 0.125 125.43);
  --accent-foreground: oklch(0.229 0.042 126.241);
  --destructive: oklch(0.319 0.127 29.238);
  --destructive-foreground: oklch(0.792 0.116 21.03);
  --ring: oklch(0.849 0.103 100.642);
  --chart-1: oklch(0.849 0.103 100.642);
  --chart-2: oklch(0.757 0.084 51.114);
  --chart-3: oklch(0.848 0.125 125.43);
  --chart-4: oklch(0.779 0.076 51.322);
  --chart-5: oklch(0.854 0.107 100.661);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.011 101.828);
  --foreground: oklch(0.994 0.001 99.362);
  --muted: oklch(0.182 0.009 51.963);
  --muted-foreground: oklch(0.708 0.002 52.547);
  --popover: oklch(0.124 0.011 101.828);
  --popover-foreground: oklch(0.994 0.001 99.362);
  --card: oklch(0.124 0.011 101.828);
  --card-foreground: oklch(0.994 0.001 99.362);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.849 0.103 100.642);
  --primary-foreground: oklch(0.228 0.034 100.702);
  --secondary: oklch(0.757 0.084 51.114);
  --secondary-foreground: oklch(0.197 0.029 50.554);
  --accent: oklch(0.848 0.125 125.43);
  --accent-foreground: oklch(0.229 0.042 126.241);
  --destructive: oklch(0.62 0.252 29.232);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.849 0.103 100.642);
  --chart-1: oklch(0.849 0.103 100.642);
  --chart-2: oklch(0.757 0.084 51.114);
  --chart-3: oklch(0.848 0.125 125.43);
  --chart-4: oklch(0.779 0.076 51.322);
  --chart-5: oklch(0.854 0.107 100.661);
}