Scratchy for shadcn/ui

Scratchy is a shadcn/ui theme built around a green primary color (#a3e25a) with pink accents (#e25aa3). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the green primary (#a3e25a) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#030401black
Foreground
#050902black
#ffffffwhite
Card
#fafcf8snow
#050802black
Card foreground
#030401black
#ffffffwhite
Popover
#fafcf8snow
#050802black
Popover foreground
#030401black
#ffffffwhite
Primary
#a3e25ayellowgreen
#a3e25ayellowgreen
Primary foreground
#050902black
#050902black
Secondary
#5aa3e2cornflowerblue
#5aa3e2cornflowerblue
Secondary foreground
#020509black
#020509black
Muted
#dadbddgainsboro
#222425darkslategray
Muted foreground
#394047darkslategray
#b8c0c6silver
Accent
#e25aa3palevioletred
#e25aa3palevioletred
Accent foreground
#090205black
#090205black
Destructive
#ae280afirebrick
#f24018orangered
Destructive foreground
#feefecseashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a3e25ayellowgreen
#a3e25ayellowgreen

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.88:1AAA
Primary button12.96:1AAA
Secondary button7.53:1AAA
Muted text7.60:1AAA
Accent6.09:1AA
Destructive6.06:1AA
Dark mode
Text on background20.57:1AAA
Text on card20.16:1AAA
Primary button12.96:1AAA
Secondary button7.53:1AAA
Muted text8.46:1AAA
Accent6.09:1AA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 127.144);
  --foreground: oklch(0.129 0.023 125.926);
  --muted: oklch(0.892 0.003 244.132);
  --muted-foreground: oklch(0.368 0.015 244.599);
  --popover: oklch(0.988 0.005 127.178);
  --popover-foreground: oklch(0.103 0.019 125.926);
  --card: oklch(0.988 0.005 127.178);
  --card-foreground: oklch(0.103 0.019 125.926);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.842 0.179 130.522);
  --primary-foreground: oklch(0.13 0.024 125.897);
  --secondary: oklch(0.694 0.119 246.909);
  --secondary-foreground: oklch(0.112 0.015 234.524);
  --accent: oklch(0.664 0.184 350.186);
  --accent-foreground: oklch(0.104 0.027 343.33);
  --destructive: oklch(0.492 0.174 33.155);
  --destructive-foreground: oklch(0.963 0.017 32.67);
  --ring: oklch(0.842 0.179 130.522);
  --chart-1: oklch(0.842 0.179 130.522);
  --chart-2: oklch(0.694 0.119 246.909);
  --chart-3: oklch(0.664 0.184 350.186);
  --chart-4: oklch(0.717 0.109 246.456);
  --chart-5: oklch(0.849 0.184 130.669);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.014 126.189);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.258 0.004 244.291);
  --muted-foreground: oklch(0.803 0.012 244.282);
  --popover: oklch(0.126 0.018 126.189);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.126 0.018 126.189);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.842 0.179 130.522);
  --primary-foreground: oklch(0.13 0.024 125.897);
  --secondary: oklch(0.694 0.119 246.909);
  --secondary-foreground: oklch(0.112 0.015 234.524);
  --accent: oklch(0.664 0.184 350.186);
  --accent-foreground: oklch(0.104 0.027 343.33);
  --destructive: oklch(0.633 0.219 33.38);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.842 0.179 130.522);
  --chart-1: oklch(0.842 0.179 130.522);
  --chart-2: oklch(0.694 0.119 246.909);
  --chart-3: oklch(0.664 0.184 350.186);
  --chart-4: oklch(0.717 0.109 246.456);
  --chart-5: oklch(0.849 0.184 130.669);
}