Ranksmith option 2 for shadcn/ui

Ranksmith option 2 is a shadcn/ui theme built around a violet primary color (#7e67c1) with light green accents (#d2e2a1). The light mode uses a neutral background (#fdfdfb). Dark mode switches to a muted green primary (#b6bda8) on a green-tinted background (#090c03).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#090c03black
Foreground
#101703black
#f8faf4whitesmoke
Card
#fbfcf8snow
#0c1004black
Card foreground
#0d1202black
#fafcf8snow
Popover
#fdfdfbsnow
#090c03black
Popover foreground
#101703black
#f8faf4whitesmoke
Primary
#7e67c1slateblue
#b6bda8darkgray
Primary foreground
#ffffffwhite
#1b1d16black
Secondary
#e4e0eblavender
#bdbaa8silver
Secondary foreground
#2d253adarkslategray
#1d1c16black
Muted
#f4f8e4beige
#16150eblack
Muted foreground
#444833darkslategray
#aba792darkgray
Accent
#d2e2a1palegoldenrod
#abbda8darkgray
Accent foreground
#171d16black
#171d16black
Destructive
#c92b00firebrick
#e43f11orangered
Destructive foreground
#fef1edseashell
#ffffffwhite
Border
#f0f1efwhitesmoke
#1a1b18black
Input
#f0f1efwhitesmoke
#1a1b18black
Ring
#b6bda8darkgray
#b6bda8darkgray

Contrast

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

Light mode
Text on background18.04:1AAA
Text on card18.42:1AAA
Primary button4.56:1AA
Secondary button11.24:1AAA
Muted text8.73:1AAA
Accent12.36:1AAA
Destructive4.96:1AA
Dark mode
Text on background18.72:1AAA
Text on card18.60:1AAA
Primary button8.78:1AAA
Secondary button8.74:1AAA
Muted text7.57:1AAA
Accent8.65:1AAA
Destructive4.19:1AA Large

CSS variables

Paste this into your globals.css to use Ranksmith option 2 in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 122.257);
  --foreground: oklch(0.19 0.04 124.844);
  --muted: oklch(0.971 0.027 116.081);
  --muted-foreground: oklch(0.392 0.034 116.769);
  --popover: oklch(0.994 0.003 122.257);
  --popover-foreground: oklch(0.19 0.04 124.844);
  --card: oklch(0.989 0.006 122.302);
  --card-foreground: oklch(0.172 0.035 123.847);
  --border: oklch(0.956 0.003 122.255);
  --input: oklch(0.956 0.003 122.255);
  --primary: oklch(0.576 0.136 293.456);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.913 0.015 302.542);
  --secondary-foreground: oklch(0.283 0.039 301.431);
  --accent: oklch(0.885 0.087 119.439);
  --accent-foreground: oklch(0.222 0.016 140.907);
  --destructive: oklch(0.544 0.198 33.582);
  --destructive-foreground: oklch(0.967 0.015 35.966);
  --ring: oklch(0.787 0.031 122.832);
  --chart-1: oklch(0.787 0.031 122.832);
  --chart-2: oklch(0.786 0.025 98.749);
  --chart-3: oklch(0.779 0.036 140.965);
  --chart-4: oklch(0.808 0.023 98.697);
  --chart-5: oklch(0.792 0.037 122.96);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.023 122.123);
  --foreground: oklch(0.983 0.008 122.344);
  --muted: oklch(0.193 0.014 99.162);
  --muted-foreground: oklch(0.725 0.03 98.863);
  --popover: oklch(0.148 0.023 122.123);
  --popover-foreground: oklch(0.983 0.008 122.344);
  --card: oklch(0.165 0.027 123.544);
  --card-foreground: oklch(0.989 0.005 122.299);
  --border: oklch(0.22 0.006 122.648);
  --input: oklch(0.22 0.006 122.648);
  --primary: oklch(0.787 0.031 122.832);
  --primary-foreground: oklch(0.226 0.014 123.199);
  --secondary: oklch(0.786 0.025 98.749);
  --secondary-foreground: oklch(0.225 0.011 98.966);
  --accent: oklch(0.779 0.036 140.965);
  --accent-foreground: oklch(0.222 0.016 140.907);
  --destructive: oklch(0.608 0.208 34.564);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.787 0.031 122.832);
  --chart-1: oklch(0.787 0.031 122.832);
  --chart-2: oklch(0.786 0.025 98.749);
  --chart-3: oklch(0.779 0.036 140.965);
  --chart-4: oklch(0.808 0.023 98.697);
  --chart-5: oklch(0.792 0.037 122.96);
}