Machine for shadcn/ui

Machine is a shadcn/ui theme built around a light green primary color (#d7f6d5) with light green accents (#d5f6e3). The light mode uses a neutral background (#fbfefb). Dark mode keeps the light green primary (#d7f6d5) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#030803black
#ffffffwhite
Card
#f8fdf7mintcream
#030303black
Card foreground
#010401black
#ffffffwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#030803black
#ffffffwhite
Primary
#d7f6d5gainsboro
#d7f6d5gainsboro
Primary foreground
#0b2a09black
#0b2a09black
Secondary
#e8f6d5beige
#e8f6d5beige
Secondary foreground
#1c2a09black
#1c2a09black
Muted
#f0f3ecwhitesmoke
#10130cblack
Muted foreground
#566148darkolivegreen
#adb79edarkgray
Accent
#d5f6e3gainsboro
#d5f6e3gainsboro
Accent foreground
#092a17black
#092a17black
Destructive
#862204darkred
#f84f1borangered
Destructive foreground
#fdcdbfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d7f6d5gainsboro
#d7f6d5gainsboro

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.93:1AAA
Primary button13.35:1AAA
Secondary button13.39:1AAA
Muted text5.86:1AA
Accent13.36:1AAA
Destructive6.54:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button13.35:1AAA
Secondary button13.39:1AAA
Muted text8.98:1AAA
Accent13.36:1AAA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 143.613);
  --foreground: oklch(0.122 0.021 142.118);
  --muted: oklch(0.96 0.009 125.871);
  --muted-foreground: oklch(0.475 0.041 126.958);
  --popover: oklch(0.994 0.004 143.613);
  --popover-foreground: oklch(0.122 0.021 142.118);
  --card: oklch(0.987 0.009 143.59);
  --card-foreground: oklch(0.097 0.016 142.118);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.942 0.054 143.329);
  --primary-foreground: oklch(0.253 0.067 142.226);
  --secondary: oklch(0.954 0.045 126.388);
  --secondary-foreground: oklch(0.263 0.056 129.489);
  --accent: oklch(0.944 0.042 160.688);
  --accent-foreground: oklch(0.254 0.052 155.009);
  --destructive: oklch(0.412 0.139 35.452);
  --destructive-foreground: oklch(0.887 0.058 37.592);
  --ring: oklch(0.942 0.054 143.329);
  --chart-1: oklch(0.942 0.054 143.329);
  --chart-2: oklch(0.954 0.045 126.388);
  --chart-3: oklch(0.944 0.042 160.688);
  --chart-4: oklch(0.967 0.032 126.183);
  --chart-5: oklch(0.943 0.056 143.315);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.179 0.014 126.832);
  --muted-foreground: oklch(0.765 0.037 126.4);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.942 0.054 143.329);
  --primary-foreground: oklch(0.253 0.067 142.226);
  --secondary: oklch(0.954 0.045 126.388);
  --secondary-foreground: oklch(0.263 0.056 129.489);
  --accent: oklch(0.944 0.042 160.688);
  --accent-foreground: oklch(0.254 0.052 155.009);
  --destructive: oklch(0.659 0.213 35.863);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.942 0.054 143.329);
  --chart-1: oklch(0.942 0.054 143.329);
  --chart-2: oklch(0.954 0.045 126.388);
  --chart-3: oklch(0.944 0.042 160.688);
  --chart-4: oklch(0.967 0.032 126.183);
  --chart-5: oklch(0.943 0.056 143.315);
}