Rite for shadcn/ui

Rite is a shadcn/ui theme built around a vivid green primary color (#4ef490) with vivid orange accents (#f4904e). The light mode uses a neutral background (#f8fbfa). Dark mode keeps the vivid green primary (#4ef490) on a green-tinted background (#051009).

Color palette

TokenLightDark
Background
#f8fbfamintcream
#051009black
Foreground
#030c07black
#f8fcfamintcream
Card
#f5faf7whitesmoke
#06140bblack
Card foreground
#020805black
#fcfdfcwhite
Popover
#f5faf7whitesmoke
#06140bblack
Popover foreground
#020805black
#fcfdfcwhite
Primary
#4ef490mediumaquamarine
#4ef490mediumaquamarine
Primary foreground
#010e06black
#010e06black
Secondary
#904ef4mediumslateblue
#904ef4mediumslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d7d1e0gainsboro
#251f2edarkslategray
Muted foreground
#46414edarkslategray
#b6b1besilver
Accent
#f4904ecoral
#f4904ecoral
Accent foreground
#0e0601black
#0e0601black
Destructive
#853405saddlebrown
#f76d1dchocolate
Destructive foreground
#fdd6bfpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4ef490mediumaquamarine
#4ef490mediumaquamarine

Contrast

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

Light mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button13.71:1AAA
Secondary button4.59:1AA
Muted text6.63:1AA
Accent8.54:1AAA
Destructive6.25:1AA
Dark mode
Text on background18.75:1AAA
Text on card18.55:1AAA
Primary button13.71:1AAA
Secondary button4.59:1AA
Muted text7.65:1AAA
Accent8.54:1AAA
Destructive7.13:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.004 160.137);
  --foreground: oklch(0.142 0.02 159.857);
  --muted: oklch(0.87 0.022 303.986);
  --muted-foreground: oklch(0.385 0.022 303.509);
  --popover: oklch(0.98 0.006 160.087);
  --popover-foreground: oklch(0.123 0.018 160.112);
  --card: oklch(0.98 0.006 160.087);
  --card-foreground: oklch(0.123 0.018 160.112);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.858 0.194 152.732);
  --primary-foreground: oklch(0.147 0.031 159.237);
  --secondary: oklch(0.59 0.234 296.898);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.747 0.145 52.28);
  --accent-foreground: oklch(0.134 0.025 68.991);
  --destructive: oklch(0.433 0.123 43.87);
  --destructive-foreground: oklch(0.902 0.053 51.826);
  --ring: oklch(0.858 0.194 152.732);
  --chart-1: oklch(0.858 0.194 152.732);
  --chart-2: oklch(0.59 0.234 296.898);
  --chart-3: oklch(0.747 0.145 52.28);
  --chart-4: oklch(0.618 0.218 298.132);
  --chart-5: oklch(0.864 0.199 152.5);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.023 158.54);
  --foreground: oklch(0.987 0.005 160.124);
  --muted: oklch(0.252 0.03 302.635);
  --muted-foreground: oklch(0.769 0.019 303.993);
  --popover: oklch(0.173 0.027 156.982);
  --popover-foreground: oklch(0.993 0.002 160.179);
  --card: oklch(0.173 0.027 156.982);
  --card-foreground: oklch(0.993 0.002 160.179);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.858 0.194 152.732);
  --primary-foreground: oklch(0.147 0.031 159.237);
  --secondary: oklch(0.59 0.234 296.898);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.747 0.145 52.28);
  --accent-foreground: oklch(0.134 0.025 68.991);
  --destructive: oklch(0.693 0.188 44.838);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.858 0.194 152.732);
  --chart-1: oklch(0.858 0.194 152.732);
  --chart-2: oklch(0.59 0.234 296.898);
  --chart-3: oklch(0.747 0.145 52.28);
  --chart-4: oklch(0.618 0.218 298.132);
  --chart-5: oklch(0.864 0.199 152.5);
}