Osmosis for shadcn/ui

Osmosis is a shadcn/ui theme built around a vivid light purple primary color (#fae3fc) with neutral gray accents (#e6e6e6). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the vivid light purple primary (#fae3fc) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#070307black
Foreground
#000000black
#ffffffwhite
Card
#faf4faghostwhite
#0a050ablack
Card foreground
#000000black
#ffffffwhite
Popover
#faf4faghostwhite
#0a050ablack
Popover foreground
#000000black
#ffffffwhite
Primary
#fae3fclavenderblush
#fae3fclavenderblush
Primary foreground
#900f9fdarkmagenta
#900f9fdarkmagenta
Secondary
#e6e6e6gainsboro
#2c2a2ddarkslategray
Secondary foreground
#4d4d4ddarkslategray
#c6c3c6silver
Muted
#f2eeeewhitesmoke
#110d11black
Muted foreground
#6a5353dimgray
#aa95acdarkgray
Accent
#e6e6e6gainsboro
#2c2a2ddarkslategray
Accent foreground
#4d4d4ddarkslategray
#c6c3c6silver
Destructive
#9e2a0afirebrick
#e63d0forangered
Destructive foreground
#fde4ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fae3fclavenderblush
#fae3fclavenderblush

Contrast

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

Light mode
Text on background19.94:1AAA
Text on card19.43:1AAA
Primary button6.33:1AA
Secondary button6.74:1AA
Muted text6.11:1AA
Accent6.74:1AA
Destructive6.19:1AA
Dark mode
Text on background20.47:1AAA
Text on card20.21:1AAA
Primary button6.33:1AA
Secondary button8.13:1AAA
Muted text6.96:1AA
Accent8.13:1AAA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 322.653);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.951 0.004 17.232);
  --muted-foreground: oklch(0.466 0.03 18.297);
  --popover: oklch(0.974 0.009 322.666);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.009 322.666);
  --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.942 0.042 322.801);
  --primary-foreground: oklch(0.473 0.215 323.19);
  --secondary: oklch(0.923 0 153.435);
  --secondary-foreground: oklch(0.418 0 173.29);
  --accent: oklch(0.923 0 153.435);
  --accent-foreground: oklch(0.418 0 173.29);
  --destructive: oklch(0.466 0.157 34.746);
  --destructive-foreground: oklch(0.938 0.029 35.947);
  --ring: oklch(0.942 0.042 322.801);
  --chart-1: oklch(0.942 0.042 322.801);
  --chart-2: oklch(0.923 0 153.435);
  --chart-3: oklch(0.923 0 153.435);
  --chart-4: oklch(0.947 0 180);
  --chart-5: oklch(0.941 0.043 322.808);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.015 323.71);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.167 0.01 322.862);
  --muted-foreground: oklch(0.696 0.04 322.852);
  --popover: oklch(0.127 0.017 323.709);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.127 0.017 323.709);
  --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.042 322.801);
  --primary-foreground: oklch(0.473 0.215 323.19);
  --secondary: oklch(0.289 0.006 322.706);
  --secondary-foreground: oklch(0.819 0.006 322.656);
  --accent: oklch(0.289 0.006 322.706);
  --accent-foreground: oklch(0.819 0.006 322.656);
  --destructive: oklch(0.611 0.211 34.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.942 0.042 322.801);
  --chart-1: oklch(0.942 0.042 322.801);
  --chart-2: oklch(0.289 0.006 322.706);
  --chart-3: oklch(0.289 0.006 322.706);
  --chart-4: oklch(0.319 0.007 322.709);
  --chart-5: oklch(0.941 0.043 322.808);
}