Polarisation for shadcn/ui

Polarisation is a shadcn/ui theme built around a light pink primary color (#f094cd) with light green accents (#94f0b7). The light mode uses a neutral background (#fdf7fb). Dark mode keeps the light pink primary (#f094cd) on a pink-tinted background (#0c0409).

Color palette

TokenLightDark
Background
#fdf7fbsnow
#0c0409black
Foreground
#10040cblack
#f9f6f8whitesmoke
Card
#fdf7fbsnow
#0c0409black
Card foreground
#10040cblack
#f9f6f8whitesmoke
Popover
#fdf7fbsnow
#0c0409black
Popover foreground
#10040cblack
#f9f6f8whitesmoke
Primary
#f094cdplum
#f094cdplum
Primary foreground
#470a30maroon
#470a30maroon
Secondary
#94f0b7palegreen
#94f0b7palegreen
Secondary foreground
#0a4722darkgreen
#0a4722darkgreen
Muted
#d6e1dagainsboro
#1e2922black
Muted foreground
#3f4a44darkslategray
#b5c0b9silver
Accent
#94f0b7palegreen
#94f0b7palegreen
Accent foreground
#0a4722darkgreen
#0a4722darkgreen
Destructive
#791406maroon
#f43d25orangered
Destructive foreground
#fbbeb6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f094cdplum
#f094cdplum

Contrast

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

Light mode
Text on background19.00:1AAA
Text on card19.00:1AAA
Primary button7.23:1AAA
Secondary button7.93:1AAA
Muted text6.86:1AA
Accent7.93:1AAA
Destructive6.85:1AA
Dark mode
Text on background18.90:1AAA
Text on card18.90:1AAA
Primary button7.23:1AAA
Secondary button7.93:1AAA
Muted text8.01:1AAA
Accent7.93:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 339.649);
  --foreground: oklch(0.136 0.03 341.767);
  --muted: oklch(0.899 0.015 159.105);
  --muted-foreground: oklch(0.398 0.018 158.412);
  --popover: oklch(0.981 0.008 339.649);
  --popover-foreground: oklch(0.136 0.03 341.767);
  --card: oklch(0.981 0.008 339.649);
  --card-foreground: oklch(0.136 0.03 341.767);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.777 0.13 342.892);
  --primary-foreground: oklch(0.275 0.099 348.008);
  --secondary: oklch(0.882 0.119 155.951);
  --secondary-foreground: oklch(0.352 0.088 150.983);
  --accent: oklch(0.882 0.119 155.951);
  --accent-foreground: oklch(0.352 0.088 150.983);
  --destructive: oklch(0.374 0.137 31.113);
  --destructive-foreground: oklch(0.856 0.071 27.222);
  --ring: oklch(0.777 0.13 342.892);
  --chart-1: oklch(0.777 0.13 342.892);
  --chart-2: oklch(0.882 0.119 155.951);
  --chart-3: oklch(0.882 0.119 155.951);
  --chart-4: oklch(0.895 0.105 156.497);
  --chart-5: oklch(0.777 0.135 343.026);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.023 339.896);
  --foreground: oklch(0.975 0.004 339.561);
  --muted: oklch(0.269 0.019 157.753);
  --muted-foreground: oklch(0.796 0.015 159.032);
  --popover: oklch(0.123 0.023 339.896);
  --popover-foreground: oklch(0.975 0.004 339.561);
  --card: oklch(0.123 0.023 339.896);
  --card-foreground: oklch(0.975 0.004 339.561);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.777 0.13 342.892);
  --primary-foreground: oklch(0.275 0.099 348.008);
  --secondary: oklch(0.882 0.119 155.951);
  --secondary-foreground: oklch(0.352 0.088 150.983);
  --accent: oklch(0.882 0.119 155.951);
  --accent-foreground: oklch(0.352 0.088 150.983);
  --destructive: oklch(0.635 0.222 31.027);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.777 0.13 342.892);
  --chart-1: oklch(0.777 0.13 342.892);
  --chart-2: oklch(0.882 0.119 155.951);
  --chart-3: oklch(0.882 0.119 155.951);
  --chart-4: oklch(0.895 0.105 156.497);
  --chart-5: oklch(0.777 0.135 343.026);
}