Faraway for shadcn/ui

Faraway is a shadcn/ui theme built around a purple primary color (#c361d6) with muted light purple accents (#dccde0). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the purple primary (#c361d6) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#030104black
Foreground
#080109black
#ffffffwhite
Card
#f9f4fawhitesmoke
#070208black
Card foreground
#040104black
#ffffffwhite
Popover
#fbf8fcghostwhite
#030104black
Popover foreground
#080109black
#ffffffwhite
Primary
#c361d6mediumorchid
#c361d6mediumorchid
Primary foreground
#000000black
#000000black
Secondary
#e8e1ealavender
#251c26black
Secondary foreground
#554059darkslategray
#c1afc5silver
Muted
#e4e2e4gainsboro
#1d1b1dblack
Muted foreground
#675e68dimgray
#9f97a1darkgray
Accent
#dccde0gainsboro
#3d2a41darkslategray
Accent foreground
#472f4bdarkslategray
#d6c4d9thistle
Destructive
#8b0404darkred
#f91a1ared
Destructive foreground
#fdc3c3pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c361d6mediumorchid
#c361d6mediumorchid

Contrast

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

Light mode
Text on background19.57:1AAA
Text on card19.19:1AAA
Primary button5.99:1AA
Secondary button7.26:1AAA
Muted text4.81:1AA
Accent7.79:1AAA
Destructive6.49:1AA
Dark mode
Text on background20.76:1AAA
Text on card20.53:1AAA
Primary button5.99:1AA
Secondary button8.03:1AAA
Muted text6.05:1AA
Accent7.94:1AAA
Destructive4.03: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.983 0.006 320.541);
  --foreground: oklch(0.103 0.033 323.02);
  --muted: oklch(0.914 0.005 320.539);
  --muted-foreground: oklch(0.495 0.019 320.589);
  --popover: oklch(0.983 0.006 320.541);
  --popover-foreground: oklch(0.103 0.033 323.02);
  --card: oklch(0.974 0.009 320.546);
  --card-foreground: oklch(0.082 0.026 323.02);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.653 0.192 320.716);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.919 0.013 320.554);
  --secondary-foreground: oklch(0.404 0.048 320.697);
  --accent: oklch(0.866 0.031 320.586);
  --accent-foreground: oklch(0.345 0.057 320.739);
  --destructive: oklch(0.402 0.163 28.898);
  --destructive-foreground: oklch(0.87 0.067 18.52);
  --ring: oklch(0.653 0.192 320.716);
  --chart-1: oklch(0.653 0.192 320.716);
  --chart-2: oklch(0.919 0.013 320.554);
  --chart-3: oklch(0.866 0.031 320.586);
  --chart-4: oklch(0.943 0.009 320.546);
  --chart-5: oklch(0.653 0.2 320.696);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.019 322.344);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.224 0.006 320.575);
  --muted-foreground: oklch(0.685 0.017 320.57);
  --popover: oklch(0.085 0.019 322.344);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.107 0.024 322.344);
  --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.653 0.192 320.716);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.241 0.024 320.673);
  --secondary-foreground: oklch(0.777 0.037 320.604);
  --accent: oklch(0.317 0.049 320.73);
  --accent-foreground: oklch(0.841 0.035 320.595);
  --destructive: oklch(0.624 0.246 28.381);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.653 0.192 320.716);
  --chart-1: oklch(0.653 0.192 320.716);
  --chart-2: oklch(0.241 0.024 320.673);
  --chart-3: oklch(0.317 0.049 320.73);
  --chart-4: oklch(0.271 0.028 320.68);
  --chart-5: oklch(0.653 0.2 320.696);
}