Plastic for shadcn/ui

Plastic is a shadcn/ui theme built around a muted indigo primary color (#817e95) with muted green accents (#7e9581). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted indigo primary (#817e95) on a neutral background (#030208).

Color palette

TokenLightDark
Background
#fcfbfewhite
#030208black
Foreground
#010105black
#f9f9fbghostwhite
Card
#f8f8fcghostwhite
#04030cblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#fcfbfewhite
#030208black
Popover foreground
#010105black
#f9f9fbghostwhite
Primary
#817e95lightslategray
#817e95lightslategray
Primary foreground
#000000black
#000000black
Secondary
#95817egray
#95817egray
Secondary foreground
#000000black
#000000black
Muted
#f2eeeewhitesmoke
#110e0dblack
Muted foreground
#535050darkslategray
#afacacdarkgray
Accent
#7e9581gray
#7e9581gray
Accent foreground
#000000black
#000000black
Destructive
#6a2e0csaddlebrown
#eb8347coral
Destructive foreground
#f6cab1peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#817e95lightslategray
#817e95lightslategray

Contrast

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

Light mode
Text on background20.23:1AAA
Text on card19.79:1AAA
Primary button5.34:1AA
Secondary button5.71:1AA
Muted text6.93:1AA
Accent6.52:1AA
Destructive6.98:1AA
Dark mode
Text on background19.63:1AAA
Text on card19.97:1AAA
Primary button5.34:1AA
Secondary button5.71:1AA
Muted text8.53:1AAA
Accent6.52:1AA
Destructive7.87:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 291.724);
  --foreground: oklch(0.068 0.025 287.459);
  --muted: oklch(0.952 0.004 26.465);
  --muted-foreground: oklch(0.435 0.004 26.5);
  --popover: oklch(0.99 0.003 291.724);
  --popover-foreground: oklch(0.068 0.025 287.459);
  --card: oklch(0.98 0.006 291.668);
  --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.604 0.035 290.649);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.62 0.026 26.772);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.647 0.04 148.369);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.378 0.096 46.281);
  --destructive-foreground: oklch(0.872 0.061 51.696);
  --ring: oklch(0.604 0.035 290.649);
  --chart-1: oklch(0.604 0.035 290.649);
  --chart-2: oklch(0.62 0.026 26.772);
  --chart-3: oklch(0.647 0.04 148.369);
  --chart-4: oklch(0.647 0.024 26.728);
  --chart-5: oklch(0.595 0.046 290.267);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.021 289.397);
  --foreground: oklch(0.982 0.003 291.72);
  --muted: oklch(0.167 0.006 26.696);
  --muted-foreground: oklch(0.747 0.003 26.47);
  --popover: oklch(0.096 0.021 289.397);
  --popover-foreground: oklch(0.982 0.003 291.72);
  --card: oklch(0.11 0.024 289.286);
  --card-foreground: oklch(0.991 0.002 291.75);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.604 0.035 290.649);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.62 0.026 26.772);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.647 0.04 148.369);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.713 0.147 48.797);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.604 0.035 290.649);
  --chart-1: oklch(0.604 0.035 290.649);
  --chart-2: oklch(0.62 0.026 26.772);
  --chart-3: oklch(0.647 0.04 148.369);
  --chart-4: oklch(0.647 0.024 26.728);
  --chart-5: oklch(0.595 0.046 290.267);
}