Melon for shadcn/ui

Melon is a shadcn/ui theme built around a green primary color (#1daf1d) with neutral gray accents (#d4d9d4). The light mode uses a neutral background (#f7fcf7). Dark mode keeps the green primary (#1daf1d) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fcf7mintcream
#000000black
Foreground
#010901black
#f6f9f6whitesmoke
Card
#f4fbf4whitesmoke
#030303black
Card foreground
#010401black
#f9fbf9mintcream
Popover
#f7fcf7mintcream
#000000black
Popover foreground
#010901black
#f6f9f6whitesmoke
Primary
#1daf1dforestgreen
#1daf1dforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d4d9d4lightgrey
#131613black
Secondary foreground
#3a413adarkslategray
#a8b3a8darkgray
Muted
#d9ddd9gainsboro
#222622black
Muted foreground
#495549darkslategray
#aab6aadarkgray
Accent
#d4d9d4lightgrey
#131613black
Accent foreground
#3a413adarkslategray
#a8b3a8darkgray
Destructive
#b03f03saddlebrown
#fc6e22tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1daf1dforestgreen
#1daf1dforestgreen

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.56:1AAA
Primary button2.90:1Fail
Secondary button7.32:1AAA
Muted text5.72:1AA
Accent7.32:1AAA
Destructive5.89:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.88:1AAA
Primary button2.90:1Fail
Secondary button8.41:1AAA
Muted text7.31:1AAA
Accent8.41:1AAA
Destructive7.38:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.008 145.513);
  --foreground: oklch(0.124 0.033 143.298);
  --muted: oklch(0.894 0.007 145.514);
  --muted-foreground: oklch(0.436 0.026 145.113);
  --popover: oklch(0.987 0.008 145.513);
  --popover-foreground: oklch(0.124 0.033 143.298);
  --card: oklch(0.981 0.012 145.48);
  --card-foreground: oklch(0.098 0.026 143.298);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.658 0.212 142.682);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.879 0.008 145.503);
  --secondary-foreground: oklch(0.365 0.016 145.243);
  --accent: oklch(0.879 0.008 145.503);
  --accent-foreground: oklch(0.365 0.016 145.243);
  --destructive: oklch(0.521 0.158 41.241);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.658 0.212 142.682);
  --chart-1: oklch(0.658 0.212 142.682);
  --chart-2: oklch(0.879 0.008 145.503);
  --chart-3: oklch(0.879 0.008 145.503);
  --chart-4: oklch(0.902 0.007 145.519);
  --chart-5: oklch(0.666 0.217 142.646);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.005 145.534);
  --muted: oklch(0.262 0.01 145.282);
  --muted-foreground: oklch(0.764 0.023 145.349);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.005 145.534);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.986 0.004 145.549);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.658 0.212 142.682);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.195 0.007 145.293);
  --secondary-foreground: oklch(0.755 0.021 145.368);
  --accent: oklch(0.195 0.007 145.293);
  --accent-foreground: oklch(0.755 0.021 145.368);
  --destructive: oklch(0.702 0.191 43.995);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.658 0.212 142.682);
  --chart-1: oklch(0.658 0.212 142.682);
  --chart-2: oklch(0.195 0.007 145.293);
  --chart-3: oklch(0.195 0.007 145.293);
  --chart-4: oklch(0.229 0.009 145.258);
  --chart-5: oklch(0.666 0.217 142.646);
}