Rust for shadcn/ui

Rust is a shadcn/ui theme built around a vivid light green primary color (#e7f9c3) with vivid light pink accents (#f9c3e7). The light mode uses a neutral background (#fdfefb). Dark mode keeps the vivid light green primary (#e7f9c3) on a green-tinted background (#090c04).

Color palette

TokenLightDark
Background
#fdfefbwhite
#090c04black
Foreground
#0c1004black
#fdfdfcwhite
Card
#fdfefbwhite
#090c04black
Card foreground
#0c1004black
#fdfdfcwhite
Popover
#fdfefbwhite
#090c04black
Popover foreground
#0c1004black
#fdfdfcwhite
Primary
#e7f9c3lightgoldenrodyellow
#e7f9c3lightgoldenrodyellow
Primary foreground
#172003black
#172003black
Secondary
#c3e7f9paleturquoise
#c3e7f9paleturquoise
Secondary foreground
#031720black
#031720black
Muted
#e4e9eclavender
#13181bblack
Muted foreground
#55656ddimgray
#92a2aadarkgray
Accent
#f9c3e7pink
#f9c3e7pink
Accent foreground
#7d0c58purple
#7d0c58purple
Destructive
#8c180ddarkred
#ed4a3btomato
Destructive foreground
#fbd4d0bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7f9c3lightgoldenrodyellow
#e7f9c3lightgoldenrodyellow

Contrast

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

Light mode
Text on background18.99:1AAA
Text on card18.99:1AAA
Primary button15.05:1AAA
Secondary button14.03:1AAA
Muted text4.96:1AA
Accent6.75:1AA
Destructive6.86:1AA
Dark mode
Text on background19.38:1AAA
Text on card19.38:1AAA
Primary button15.05:1AAA
Secondary button14.03:1AAA
Muted text6.77:1AA
Accent6.75:1AA
Destructive3.72:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 121.558);
  --foreground: oklch(0.165 0.026 122.88);
  --muted: oklch(0.932 0.007 228.849);
  --muted-foreground: oklch(0.496 0.023 229.441);
  --popover: oklch(0.995 0.004 121.558);
  --popover-foreground: oklch(0.165 0.026 122.88);
  --card: oklch(0.995 0.004 121.558);
  --card-foreground: oklch(0.165 0.026 122.88);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.955 0.073 122.759);
  --primary-foreground: oklch(0.228 0.051 125.485);
  --secondary: oklch(0.907 0.045 229.521);
  --secondary-foreground: oklch(0.192 0.033 231.746);
  --accent: oklch(0.875 0.077 338.957);
  --accent-foreground: oklch(0.398 0.159 346.715);
  --destructive: oklch(0.415 0.153 30);
  --destructive-foreground: oklch(0.901 0.044 24.122);
  --ring: oklch(0.955 0.073 122.759);
  --chart-1: oklch(0.955 0.073 122.759);
  --chart-2: oklch(0.907 0.045 229.521);
  --chart-3: oklch(0.875 0.077 338.957);
  --chart-4: oklch(0.929 0.035 229.301);
  --chart-5: oklch(0.957 0.076 122.802);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.146 0.021 121.42);
  --foreground: oklch(0.994 0.002 121.533);
  --muted: oklch(0.206 0.01 229.493);
  --muted-foreground: oklch(0.702 0.021 229.172);
  --popover: oklch(0.146 0.021 121.42);
  --popover-foreground: oklch(0.994 0.002 121.533);
  --card: oklch(0.146 0.021 121.42);
  --card-foreground: oklch(0.994 0.002 121.533);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.955 0.073 122.759);
  --primary-foreground: oklch(0.228 0.051 125.485);
  --secondary: oklch(0.907 0.045 229.521);
  --secondary-foreground: oklch(0.192 0.033 231.746);
  --accent: oklch(0.875 0.077 338.957);
  --accent-foreground: oklch(0.398 0.159 346.715);
  --destructive: oklch(0.638 0.202 29.101);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.955 0.073 122.759);
  --chart-1: oklch(0.955 0.073 122.759);
  --chart-2: oklch(0.907 0.045 229.521);
  --chart-3: oklch(0.875 0.077 338.957);
  --chart-4: oklch(0.929 0.035 229.301);
  --chart-5: oklch(0.957 0.076 122.802);
}