Faraway for shadcn/ui

Faraway is a shadcn/ui theme built around a neutral gray primary color (#2f2d2f) with neutral gray accents (#2f2d2e). The light mode uses a neutral background (#fefbfe). Dark mode keeps the neutral gray primary (#2f2d2f) on a neutral background (#070208).

Color palette

TokenLightDark
Background
#fefbfewhite
#070208black
Foreground
#0b030dblack
#fdfbfdsnow
Card
#fcf7fdghostwhite
#0b030cblack
Card foreground
#080209black
#ffffffwhite
Popover
#fefbfewhite
#070208black
Popover foreground
#0b030dblack
#fdfbfdsnow
Primary
#2f2d2fdarkslategray
#2f2d2fdarkslategray
Primary foreground
#c8c6c8silver
#c8c6c8silver
Secondary
#2e2d2fdarkslategray
#2e2d2fdarkslategray
Secondary foreground
#c7c6c8silver
#c7c6c8silver
Muted
#d9d2e5gainsboro
#211a2dblack
Muted foreground
#595266dimgray
#a199addarkgray
Accent
#2f2d2edarkslategray
#2f2d2edarkslategray
Accent foreground
#c8c6c7silver
#c8c6c7silver
Destructive
#a23206saddlebrown
#f76226tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f2d2fdarkslategray
#2f2d2fdarkslategray

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.40:1AAA
Primary button8.05:1AAA
Secondary button8.06:1AAA
Muted text5.06:1AA
Accent8.05:1AAA
Destructive6.98:1AA
Dark mode
Text on background19.94:1AAA
Text on card20.30:1AAA
Primary button8.05:1AAA
Secondary button8.06:1AAA
Muted text6.11:1AA
Accent8.05:1AAA
Destructive6.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 321.606);
  --foreground: oklch(0.121 0.034 323.392);
  --muted: oklch(0.875 0.026 302.471);
  --muted-foreground: oklch(0.452 0.034 301.787);
  --popover: oklch(0.991 0.005 321.606);
  --popover-foreground: oklch(0.121 0.034 323.392);
  --card: oklch(0.982 0.01 321.62);
  --card-foreground: oklch(0.105 0.03 323.767);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.299 0.004 321.629);
  --primary-foreground: oklch(0.828 0.004 321.605);
  --secondary: oklch(0.298 0.003 302.755);
  --secondary-foreground: oklch(0.827 0.003 302.869);
  --accent: oklch(0.299 0.003 338.957);
  --accent-foreground: oklch(0.828 0.003 338.801);
  --destructive: oklch(0.482 0.155 37.689);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.299 0.004 321.629);
  --chart-1: oklch(0.299 0.004 321.629);
  --chart-2: oklch(0.298 0.003 302.755);
  --chart-3: oklch(0.299 0.003 338.957);
  --chart-4: oklch(0.329 0.004 302.749);
  --chart-5: oklch(0.298 0.01 321.684);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.024 323.36);
  --foreground: oklch(0.991 0.003 321.601);
  --muted: oklch(0.237 0.036 300.528);
  --muted-foreground: oklch(0.696 0.03 302.266);
  --popover: oklch(0.107 0.024 323.36);
  --popover-foreground: oklch(0.991 0.003 321.601);
  --card: oklch(0.123 0.027 323.118);
  --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.299 0.004 321.629);
  --primary-foreground: oklch(0.828 0.004 321.605);
  --secondary: oklch(0.298 0.003 302.755);
  --secondary-foreground: oklch(0.827 0.003 302.869);
  --accent: oklch(0.299 0.003 338.957);
  --accent-foreground: oklch(0.828 0.003 338.801);
  --destructive: oklch(0.68 0.196 39.585);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.299 0.004 321.629);
  --chart-1: oklch(0.299 0.004 321.629);
  --chart-2: oklch(0.298 0.003 302.755);
  --chart-3: oklch(0.299 0.003 338.957);
  --chart-4: oklch(0.329 0.004 302.749);
  --chart-5: oklch(0.298 0.01 321.684);
}