Mealy for shadcn/ui

Mealy is a shadcn/ui theme built around a near-black primary color (#050406) with near-black accents (#040605). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the near-black primary (#050406) on a violet-tinted background (#09070e).

Color palette

TokenLightDark
Background
#fcfbfewhite
#09070eblack
Foreground
#040109black
#f9f8fbghostwhite
Card
#f9f7fdghostwhite
#0b0811black
Card foreground
#020104black
#fcfcfdwhite
Popover
#fcfbfewhite
#09070eblack
Popover foreground
#040109black
#f9f8fbghostwhite
Primary
#050406black
#050406black
Primary foreground
#9687b5darkgray
#9687b5darkgray
Secondary
#060504black
#060504black
Secondary foreground
#b59687rosybrown
#b59687rosybrown
Muted
#ded7d3gainsboro
#2c2421darkslategray
Muted foreground
#4b4a49darkslategray
#b6b5b4silver
Accent
#040605black
#040605black
Accent foreground
#87b596darkseagreen
#87b596darkseagreen
Destructive
#880907darkred
#f2110dred
Destructive foreground
#fcc6c5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#050406black
#050406black

Contrast

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

Light mode
Text on background20.07:1AAA
Text on card19.52:1AAA
Primary button6.26:1AA
Secondary button7.45:1AAA
Muted text6.21:1AA
Accent8.77:1AAA
Destructive6.72:1AA
Dark mode
Text on background18.96:1AAA
Text on card19.34:1AAA
Primary button6.26:1AA
Secondary button7.45:1AAA
Muted text7.40:1AAA
Accent8.77:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.005 301.419);
  --foreground: oklch(0.094 0.029 302.271);
  --muted: oklch(0.884 0.009 48.623);
  --muted-foreground: oklch(0.409 0.002 48.704);
  --popover: oklch(0.989 0.005 301.419);
  --popover-foreground: oklch(0.094 0.029 302.271);
  --card: oklch(0.978 0.009 301.344);
  --card-foreground: oklch(0.075 0.023 302.271);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.109 0.009 301.686);
  --primary-foreground: oklch(0.653 0.07 299.735);
  --secondary: oklch(0.115 0.005 51.937);
  --secondary-foreground: oklch(0.698 0.043 48.077);
  --accent: oklch(0.119 0.008 157.111);
  --accent-foreground: oklch(0.732 0.067 155.238);
  --destructive: oklch(0.397 0.157 28.812);
  --destructive-foreground: oklch(0.874 0.062 19.541);
  --ring: oklch(0.109 0.009 301.686);
  --chart-1: oklch(0.109 0.009 301.686);
  --chart-2: oklch(0.115 0.005 51.937);
  --chart-3: oklch(0.119 0.008 157.111);
  --chart-4: oklch(0.158 0.008 48.182);
  --chart-5: oklch(0.109 0.01 301.714);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.017 300.909);
  --foreground: oklch(0.982 0.004 301.429);
  --muted: oklch(0.269 0.013 48.228);
  --muted-foreground: oklch(0.773 0.001 48.73);
  --popover: oklch(0.134 0.017 300.909);
  --popover-foreground: oklch(0.982 0.004 301.429);
  --card: oklch(0.145 0.02 299.559);
  --card-foreground: oklch(0.991 0.002 301.461);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.109 0.009 301.686);
  --primary-foreground: oklch(0.653 0.07 299.735);
  --secondary: oklch(0.115 0.005 51.937);
  --secondary-foreground: oklch(0.698 0.043 48.077);
  --accent: oklch(0.119 0.008 157.111);
  --accent-foreground: oklch(0.732 0.067 155.238);
  --destructive: oklch(0.608 0.244 29.048);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.109 0.009 301.686);
  --chart-1: oklch(0.109 0.009 301.686);
  --chart-2: oklch(0.115 0.005 51.937);
  --chart-3: oklch(0.119 0.008 157.111);
  --chart-4: oklch(0.158 0.008 48.182);
  --chart-5: oklch(0.109 0.01 301.714);
}