Ray for shadcn/ui

Ray is a shadcn/ui theme built around a green primary color (#58d123) with green accents (#23d146). The light mode uses a neutral background (#f9fdf6). Dark mode keeps the green primary (#58d123) on a neutral background (#040802).

Color palette

TokenLightDark
Background
#f9fdf6mintcream
#040802black
Foreground
#081004black
#f7f8f6whitesmoke
Card
#f5fdf2honeydew
#060c04black
Card foreground
#060c03black
#fafbf9snow
Popover
#f5fdf2honeydew
#060c04black
Popover foreground
#060c03black
#fafbf9snow
Primary
#58d123limegreen
#58d123limegreen
Primary foreground
#0f2306black
#0f2306black
Secondary
#afd123yellowgreen
#afd123yellowgreen
Secondary foreground
#1d2306black
#1d2306black
Muted
#e2e7d0gainsboro
#2b2f18darkslategray
Muted foreground
#595b52dimgray
#abada4darkgray
Accent
#23d146limegreen
#23d146limegreen
Accent foreground
#06230cblack
#06230cblack
Destructive
#8c2703saddlebrown
#fa5114orangered
Destructive foreground
#fed3c3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#58d123limegreen
#58d123limegreen

Contrast

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

Light mode
Text on background18.82:1AAA
Text on card18.99:1AAA
Primary button8.37:1AAA
Secondary button9.25:1AAA
Muted text5.45:1AA
Accent8.22:1AAA
Destructive6.35:1AA
Dark mode
Text on background18.95:1AAA
Text on card19.07:1AAA
Primary button8.37:1AAA
Secondary button9.25:1AAA
Muted text6.04:1AA
Accent8.22:1AAA
Destructive3.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.01 136.06);
  --foreground: oklch(0.161 0.03 135.127);
  --muted: oklch(0.918 0.032 116.212);
  --muted-foreground: oklch(0.467 0.014 116.122);
  --popover: oklch(0.984 0.016 136.08);
  --popover-foreground: oklch(0.144 0.026 134.441);
  --card: oklch(0.984 0.016 136.08);
  --card-foreground: oklch(0.144 0.026 134.441);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.762 0.227 138.814);
  --primary-foreground: oklch(0.23 0.057 137.316);
  --secondary: oklch(0.808 0.186 121.312);
  --secondary-foreground: oklch(0.242 0.048 119.596);
  --accent: oklch(0.753 0.224 145.322);
  --accent-foreground: oklch(0.227 0.056 147.516);
  --destructive: oklch(0.429 0.142 36.909);
  --destructive-foreground: oklch(0.899 0.053 40.971);
  --ring: oklch(0.762 0.227 138.814);
  --chart-1: oklch(0.762 0.227 138.814);
  --chart-2: oklch(0.808 0.186 121.312);
  --chart-3: oklch(0.753 0.224 145.322);
  --chart-4: oklch(0.836 0.19 121.159);
  --chart-5: oklch(0.771 0.233 138.973);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.02 134.469);
  --foreground: oklch(0.979 0.003 136.033);
  --muted: oklch(0.296 0.04 118.152);
  --muted-foreground: oklch(0.743 0.012 115.884);
  --popover: oklch(0.143 0.023 134.563);
  --popover-foreground: oklch(0.986 0.002 136.029);
  --card: oklch(0.143 0.023 134.563);
  --card-foreground: oklch(0.986 0.002 136.029);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.762 0.227 138.814);
  --primary-foreground: oklch(0.23 0.057 137.316);
  --secondary: oklch(0.808 0.186 121.312);
  --secondary-foreground: oklch(0.242 0.048 119.596);
  --accent: oklch(0.753 0.224 145.322);
  --accent-foreground: oklch(0.227 0.056 147.516);
  --destructive: oklch(0.665 0.214 37.082);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.762 0.227 138.814);
  --chart-1: oklch(0.762 0.227 138.814);
  --chart-2: oklch(0.808 0.186 121.312);
  --chart-3: oklch(0.753 0.224 145.322);
  --chart-4: oklch(0.836 0.19 121.159);
  --chart-5: oklch(0.771 0.233 138.973);
}