Apartment for shadcn/ui

Apartment is a shadcn/ui theme built around a vivid green primary color (#5dd303) with vivid violet accents (#7903d3). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#5dd303) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#ffffffwhite
#020401black
Foreground
#000000black
#f7f9f6whitesmoke
Card
#ffffffwhite
#020401black
Card foreground
#000000black
#f7f9f6whitesmoke
Popover
#ffffffwhite
#020401black
Popover foreground
#000000black
#f7f9f6whitesmoke
Primary
#5dd303lawngreen
#5dd303lawngreen
Primary foreground
#040a00black
#040a00black
Secondary
#7903d3darkviolet
#7903d3darkviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d9d5dcgainsboro
#27232adarkslategray
Muted foreground
#524e56darkslategray
#aea9b1darkgray
Accent
#7903d3darkviolet
#7903d3darkviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d91b02red
#f21e02red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5dd303lawngreen
#5dd303lawngreen

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button10.28:1AAA
Secondary button7.59:1AAA
Muted text5.62:1AA
Accent7.59:1AAA
Destructive5.10:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button10.28:1AAA
Secondary button7.59:1AAA
Muted text6.71:1AA
Accent7.59:1AAA
Destructive4.21:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.879 0.01 310.983);
  --muted-foreground: oklch(0.43 0.015 310.792);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.768 0.234 137.414);
  --primary-foreground: oklch(0.133 0.034 128.88);
  --secondary: oklch(0.48 0.255 300.074);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.48 0.255 300.074);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.564 0.221 30.68);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.768 0.234 137.414);
  --chart-1: oklch(0.768 0.234 137.414);
  --chart-2: oklch(0.48 0.255 300.074);
  --chart-3: oklch(0.48 0.255 300.074);
  --chart-4: oklch(0.505 0.268 299.939);
  --chart-5: oklch(0.776 0.238 137.591);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.015 129.775);
  --foreground: oklch(0.98 0.004 131.124);
  --muted: oklch(0.263 0.014 310.628);
  --muted-foreground: oklch(0.742 0.013 310.936);
  --popover: oklch(0.1 0.015 129.775);
  --popover-foreground: oklch(0.98 0.004 131.124);
  --card: oklch(0.1 0.015 129.775);
  --card-foreground: oklch(0.98 0.004 131.124);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.768 0.234 137.414);
  --primary-foreground: oklch(0.133 0.034 128.88);
  --secondary: oklch(0.48 0.255 300.074);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.48 0.255 300.074);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.612 0.24 30.59);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.768 0.234 137.414);
  --chart-1: oklch(0.768 0.234 137.414);
  --chart-2: oklch(0.48 0.255 300.074);
  --chart-3: oklch(0.48 0.255 300.074);
  --chart-4: oklch(0.505 0.268 299.939);
  --chart-5: oklch(0.776 0.238 137.591);
}