Faraway for shadcn/ui

Faraway is a shadcn/ui theme built around a light violet primary color (#d1c4e8) with light purple accents (#e3c4e8). The light mode uses a neutral background (#f9f7fd). Dark mode keeps the light violet primary (#d1c4e8) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f9f7fdghostwhite
#020104black
Foreground
#0b0613black
#f7f5fawhitesmoke
Card
#f6f2fcghostwhite
#040208black
Card foreground
#09050fblack
#f9f8fcghostwhite
Popover
#f9f7fdghostwhite
#020104black
Popover foreground
#0b0613black
#f7f5fawhitesmoke
Primary
#d1c4e8thistle
#d1c4e8thistle
Primary foreground
#352258midnightblue
#352258midnightblue
Secondary
#c4cae8lightsteelblue
#c4cae8lightsteelblue
Secondary foreground
#222a58midnightblue
#222a58midnightblue
Muted
#dadbe1gainsboro
#1e1f25black
Muted foreground
#5b5e71dimgray
#8e91a4lightslategray
Accent
#e3c4e8thistle
#e3c4e8thistle
Accent foreground
#502258indigo
#502258indigo
Destructive
#a72906firebrick
#f64413orangered
Destructive foreground
#fee8e1mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d1c4e8thistle
#d1c4e8thistle

Contrast

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

Light mode
Text on background18.76:1AAA
Text on card18.32:1AAA
Primary button8.40:1AAA
Secondary button8.39:1AAA
Muted text4.64:1AA
Accent7.79:1AAA
Destructive6.00:1AA
Dark mode
Text on background19.22:1AAA
Text on card19.50:1AAA
Primary button8.40:1AAA
Secondary button8.39:1AAA
Muted text5.29:1AA
Accent7.79:1AAA
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 302.065);
  --foreground: oklch(0.14 0.029 299.886);
  --muted: oklch(0.893 0.009 278.179);
  --muted-foreground: oklch(0.487 0.031 277.318);
  --popover: oklch(0.978 0.009 302.065);
  --popover-foreground: oklch(0.14 0.029 299.886);
  --card: oklch(0.968 0.014 301.988);
  --card-foreground: oklch(0.129 0.025 301.479);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.843 0.051 301.259);
  --primary-foreground: oklch(0.307 0.093 296.648);
  --secondary: oklch(0.843 0.043 277.529);
  --secondary-foreground: oklch(0.306 0.082 273.061);
  --accent: oklch(0.858 0.059 321.21);
  --accent-foreground: oklch(0.342 0.104 321.427);
  --destructive: oklch(0.481 0.167 34.305);
  --destructive-foreground: oklch(0.946 0.026 35.949);
  --ring: oklch(0.843 0.051 301.259);
  --chart-1: oklch(0.843 0.051 301.259);
  --chart-2: oklch(0.843 0.043 277.529);
  --chart-3: oklch(0.858 0.059 321.21);
  --chart-4: oklch(0.873 0.034 277.715);
  --chart-5: oklch(0.84 0.055 301.19);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.018 302.932);
  --foreground: oklch(0.972 0.007 302.098);
  --muted: oklch(0.239 0.012 277.544);
  --muted-foreground: oklch(0.661 0.028 277.657);
  --popover: oklch(0.079 0.018 302.932);
  --popover-foreground: oklch(0.972 0.007 302.098);
  --card: oklch(0.099 0.022 302.932);
  --card-foreground: oklch(0.982 0.005 302.137);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.843 0.051 301.259);
  --primary-foreground: oklch(0.307 0.093 296.648);
  --secondary: oklch(0.843 0.043 277.529);
  --secondary-foreground: oklch(0.306 0.082 273.061);
  --accent: oklch(0.858 0.059 321.21);
  --accent-foreground: oklch(0.342 0.104 321.427);
  --destructive: oklch(0.645 0.221 34.513);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.843 0.051 301.259);
  --chart-1: oklch(0.843 0.051 301.259);
  --chart-2: oklch(0.843 0.043 277.529);
  --chart-3: oklch(0.858 0.059 321.21);
  --chart-4: oklch(0.873 0.034 277.715);
  --chart-5: oklch(0.84 0.055 301.19);
}