Platypus for shadcn/ui

Platypus is a shadcn/ui theme built around an indigo primary color (#4045dd) with muted light indigo accents (#cacad8). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the indigo primary (#4045dd) on a neutral background (#030308).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#030308black
Foreground
#000000black
#f9f9fbghostwhite
Card
#f8f8fcghostwhite
#030308black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#f8f8fcghostwhite
#030308black
Popover foreground
#000000black
#f9f9fbghostwhite
Primary
#4045ddroyalblue
#4045ddroyalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cacad8lightgrey
#22232adarkslategray
Secondary foreground
#2f3041darkslategray
#b9b9c6silver
Muted
#e0e0f0lavender
#0f0f1fblack
Muted foreground
#525257darkslategray
#a8a8addarkgray
Accent
#cacad8lightgrey
#22232adarkslategray
Accent foreground
#2f3041darkslategray
#b9b9c6silver
Destructive
#9e1b10firebrick
#eb4637tomato
Destructive foreground
#fce5e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4045ddroyalblue
#4045ddroyalblue

Contrast

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

Light mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button6.70:1AA
Secondary button8.00:1AAA
Muted text5.96:1AA
Accent8.00:1AAA
Destructive6.66:1AA
Dark mode
Text on background19.60:1AAA
Text on card19.60:1AAA
Primary button6.70:1AA
Secondary button8.07:1AAA
Muted text7.99:1AAA
Accent8.07:1AAA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.006 284.699);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.912 0.022 284.382);
  --muted-foreground: oklch(0.439 0.008 284.486);
  --popover: oklch(0.979 0.006 284.699);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.006 284.699);
  --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.493 0.225 273.066);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.844 0.02 284.391);
  --secondary-foreground: oklch(0.315 0.031 282.93);
  --accent: oklch(0.844 0.02 284.391);
  --accent-foreground: oklch(0.315 0.031 282.93);
  --destructive: oklch(0.452 0.167 30.011);
  --destructive-foreground: oklch(0.941 0.025 23.863);
  --ring: oklch(0.493 0.225 273.066);
  --chart-1: oklch(0.493 0.225 273.066);
  --chart-2: oklch(0.844 0.02 284.391);
  --chart-3: oklch(0.844 0.02 284.391);
  --chart-4: oklch(0.87 0.016 284.475);
  --chart-5: oklch(0.49 0.233 272.361);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.017 280.551);
  --foreground: oklch(0.983 0.002 284.775);
  --muted: oklch(0.178 0.033 281.032);
  --muted-foreground: oklch(0.735 0.007 284.64);
  --popover: oklch(0.099 0.017 280.551);
  --popover-foreground: oklch(0.983 0.002 284.775);
  --card: oklch(0.099 0.017 280.551);
  --card-foreground: oklch(0.983 0.002 284.775);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.493 0.225 273.066);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.258 0.014 283.821);
  --secondary-foreground: oklch(0.79 0.017 284.416);
  --accent: oklch(0.258 0.014 283.821);
  --accent-foreground: oklch(0.79 0.017 284.416);
  --destructive: oklch(0.631 0.204 29.232);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.493 0.225 273.066);
  --chart-1: oklch(0.493 0.225 273.066);
  --chart-2: oklch(0.258 0.014 283.821);
  --chart-3: oklch(0.258 0.014 283.821);
  --chart-4: oklch(0.287 0.016 283.769);
  --chart-5: oklch(0.49 0.233 272.361);
}