Bubbly for shadcn/ui

Bubbly is a shadcn/ui theme built around a deep purple primary color (#3c1c45) with deep teal accents (#1c453c). The light mode uses a neutral background (#fbf8fb). Dark mode keeps the deep purple primary (#3c1c45) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#fbf8fbsnow
#060307black
Foreground
#0e0311black
#f8f6f9whitesmoke
Card
#fbf8fbsnow
#060307black
Card foreground
#0e0311black
#f8f6f9whitesmoke
Popover
#fbf8fbsnow
#060307black
Popover foreground
#0e0311black
#f8f6f9whitesmoke
Primary
#3c1c45darkslategray
#3c1c45darkslategray
Primary foreground
#d6b3e0thistle
#d6b3e0thistle
Secondary
#453c1cdarkolivegreen
#453c1cdarkolivegreen
Secondary foreground
#e0d6b3wheat
#e0d6b3wheat
Muted
#f0efealinen
#15140fblack
Muted foreground
#504c3fdarkolivegreen
#c0bcafsilver
Accent
#1c453cdarkslategray
#1c453cdarkslategray
Accent foreground
#b3e0d6powderblue
#b3e0d6powderblue
Destructive
#640202maroon
#fb0909red
Destructive foreground
#fd9b9blightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3c1c45darkslategray
#3c1c45darkslategray

Contrast

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

Light mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button7.88:1AAA
Secondary button7.54:1AAA
Muted text7.45:1AAA
Accent7.41:1AAA
Destructive6.65:1AA
Dark mode
Text on background19.09:1AAA
Text on card19.09:1AAA
Primary button7.88:1AAA
Secondary button7.54:1AAA
Muted text9.72:1AAA
Accent7.41:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 318.889);
  --foreground: oklch(0.132 0.04 319.855);
  --muted: oklch(0.952 0.007 93.943);
  --muted-foreground: oklch(0.417 0.022 94.339);
  --popover: oklch(0.983 0.005 318.889);
  --popover-foreground: oklch(0.132 0.04 319.855);
  --card: oklch(0.983 0.005 318.889);
  --card-foreground: oklch(0.132 0.04 319.855);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.291 0.081 318.567);
  --primary-foreground: oklch(0.812 0.073 318.854);
  --secondary: oklch(0.357 0.05 94.252);
  --secondary-foreground: oklch(0.875 0.048 94.351);
  --accent: oklch(0.357 0.049 177.172);
  --accent-foreground: oklch(0.872 0.049 180.423);
  --destructive: oklch(0.318 0.129 28.943);
  --destructive-foreground: oklch(0.789 0.119 20.071);
  --ring: oklch(0.291 0.081 318.567);
  --chart-1: oklch(0.291 0.081 318.567);
  --chart-2: oklch(0.357 0.05 94.252);
  --chart-3: oklch(0.357 0.049 177.172);
  --chart-4: oklch(0.393 0.056 94.212);
  --chart-5: oklch(0.291 0.086 318.507);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.02 320.465);
  --foreground: oklch(0.975 0.005 318.889);
  --muted: oklch(0.19 0.01 94.34);
  --muted-foreground: oklch(0.796 0.019 94.108);
  --popover: oklch(0.108 0.02 320.465);
  --popover-foreground: oklch(0.975 0.005 318.889);
  --card: oklch(0.108 0.02 320.465);
  --card-foreground: oklch(0.975 0.005 318.889);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.291 0.081 318.567);
  --primary-foreground: oklch(0.812 0.073 318.854);
  --secondary: oklch(0.357 0.05 94.252);
  --secondary-foreground: oklch(0.875 0.048 94.351);
  --accent: oklch(0.357 0.049 177.172);
  --accent-foreground: oklch(0.872 0.049 180.423);
  --destructive: oklch(0.623 0.253 29.009);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.291 0.081 318.567);
  --chart-1: oklch(0.291 0.081 318.567);
  --chart-2: oklch(0.357 0.05 94.252);
  --chart-3: oklch(0.357 0.049 177.172);
  --chart-4: oklch(0.393 0.056 94.212);
  --chart-5: oklch(0.291 0.086 318.507);
}