Far for shadcn/ui

Far is a shadcn/ui theme built around a deep purple primary color (#53134e) with deep green accents (#135318). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep purple primary (#53134e) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f050fblack
Foreground
#0c030cblack
#fbf9fbsnow
Card
#fcfcfcsnow
#130712black
Card foreground
#080208black
#fdfcfdwhite
Popover
#ffffffwhite
#0f050fblack
Popover foreground
#0c030cblack
#fbf9fbsnow
Primary
#53134eindigo
#53134eindigo
Primary foreground
#ecace7plum
#ecace7plum
Secondary
#135318darkgreen
#135318darkgreen
Secondary foreground
#acecb1palegreen
#acecb1palegreen
Muted
#dee3dfgainsboro
#1c211dblack
Muted foreground
#616b62dimgray
#949e95darkseagreen
Accent
#135318darkgreen
#135318darkgreen
Accent foreground
#acecb1palegreen
#acecb1palegreen
Destructive
#ac1911firebrick
#eb4037tomato
Destructive foreground
#fef2f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#53134eindigo
#53134eindigo

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.09:1AAA
Primary button7.39:1AAA
Secondary button6.78:1AA
Muted text4.25:1AA Large
Accent6.78:1AA
Destructive6.63:1AA
Dark mode
Text on background19.09:1AAA
Text on card19.27:1AAA
Primary button7.39:1AAA
Secondary button6.78:1AA
Muted text5.91:1AA
Accent6.78:1AA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.123 0.032 329.259);
  --muted: oklch(0.91 0.007 147.469);
  --muted-foreground: oklch(0.516 0.019 147.169);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.123 0.032 329.259);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.107 0.027 329.061);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.321 0.119 330.816);
  --primary-foreground: oklch(0.823 0.106 328.74);
  --secondary: oklch(0.388 0.11 143.974);
  --secondary-foreground: oklch(0.884 0.103 146.31);
  --accent: oklch(0.388 0.11 143.974);
  --accent-foreground: oklch(0.884 0.103 146.31);
  --destructive: oklch(0.477 0.181 29.187);
  --destructive-foreground: oklch(0.969 0.013 21.06);
  --ring: oklch(0.321 0.119 330.816);
  --chart-1: oklch(0.321 0.119 330.816);
  --chart-2: oklch(0.388 0.11 143.974);
  --chart-3: oklch(0.388 0.11 143.974);
  --chart-4: oklch(0.427 0.123 143.904);
  --chart-5: oklch(0.323 0.123 330.917);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.028 329.159);
  --foreground: oklch(0.984 0.004 327.584);
  --muted: oklch(0.241 0.01 147.134);
  --muted-foreground: oklch(0.689 0.018 147.284);
  --popover: oklch(0.139 0.028 329.159);
  --popover-foreground: oklch(0.984 0.004 327.584);
  --card: oklch(0.152 0.033 329.376);
  --card-foreground: oklch(0.992 0.002 327.565);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.321 0.119 330.816);
  --primary-foreground: oklch(0.823 0.106 328.74);
  --secondary: oklch(0.388 0.11 143.974);
  --secondary-foreground: oklch(0.884 0.103 146.31);
  --accent: oklch(0.388 0.11 143.974);
  --accent-foreground: oklch(0.884 0.103 146.31);
  --destructive: oklch(0.626 0.209 27.931);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.321 0.119 330.816);
  --chart-1: oklch(0.321 0.119 330.816);
  --chart-2: oklch(0.388 0.11 143.974);
  --chart-3: oklch(0.388 0.11 143.974);
  --chart-4: oklch(0.427 0.123 143.904);
  --chart-5: oklch(0.323 0.123 330.917);
}