Bubble for shadcn/ui

Bubble is a shadcn/ui theme built around a muted light indigo primary color (#ccc9d9) with muted light indigo accents (#cfcdd5). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted light indigo primary (#ccc9d9) on an indigo-tinted background (#05030c).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#05030cblack
Foreground
#010104black
#ffffffwhite
Card
#f8f8fcghostwhite
#05030cblack
Card foreground
#010104black
#ffffffwhite
Popover
#f8f8fcghostwhite
#05030cblack
Popover foreground
#010104black
#ffffffwhite
Primary
#ccc9d9lightgrey
#ccc9d9lightgrey
Primary foreground
#312e42darkslategray
#312e42darkslategray
Secondary
#e8e8e8lavender
#2a273adarkslategray
Secondary foreground
#4f4e50darkslategray
#c3bfd4silver
Muted
#dcd9e7gainsboro
#1a1826black
Muted foreground
#5b586fdimgray
#9490a7darkgray
Accent
#cfcdd5lightgrey
#332d52darkslategray
Accent foreground
#35343ddarkslategray
#d1cee4lightgrey
Destructive
#651706maroon
#ec370eorangered
Destructive foreground
#fab3a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ccc9d9lightgrey
#ccc9d9lightgrey

Contrast

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

Light mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button8.06:1AAA
Secondary button6.74:1AA
Muted text4.93:1AA
Accent7.82:1AAA
Destructive7.15:1AAA
Dark mode
Text on background20.46:1AAA
Text on card20.46:1AAA
Primary button8.06:1AAA
Secondary button8.06:1AAA
Muted text5.68:1AA
Accent8.30:1AAA
Destructive4.10:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 293.944);
  --foreground: oklch(0.074 0.02 292.089);
  --muted: oklch(0.892 0.019 293.662);
  --muted-foreground: oklch(0.471 0.038 292.503);
  --popover: oklch(0.98 0.006 293.944);
  --popover-foreground: oklch(0.074 0.02 292.089);
  --card: oklch(0.98 0.006 293.944);
  --card-foreground: oklch(0.074 0.02 292.089);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.843 0.023 293.555);
  --primary-foreground: oklch(0.314 0.036 291.829);
  --secondary: oklch(0.931 0.001 294.053);
  --secondary-foreground: oklch(0.426 0.003 293.952);
  --accent: oklch(0.853 0.01 293.844);
  --accent-foreground: oklch(0.329 0.016 293.157);
  --destructive: oklch(0.338 0.114 33.824);
  --destructive-foreground: oklch(0.83 0.086 33.055);
  --ring: oklch(0.843 0.023 293.555);
  --chart-1: oklch(0.843 0.023 293.555);
  --chart-2: oklch(0.931 0.001 294.053);
  --chart-3: oklch(0.853 0.01 293.844);
  --chart-4: oklch(0.954 0 294.058);
  --chart-5: oklch(0.84 0.027 293.466);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.024 292.408);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.217 0.027 291.577);
  --muted-foreground: oklch(0.663 0.035 293.059);
  --popover: oklch(0.111 0.024 292.408);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.111 0.024 292.408);
  --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.843 0.023 293.555);
  --primary-foreground: oklch(0.314 0.036 291.829);
  --secondary: oklch(0.285 0.034 291.768);
  --secondary-foreground: oklch(0.815 0.029 293.407);
  --accent: oklch(0.323 0.065 289.945);
  --accent-foreground: oklch(0.86 0.031 293.395);
  --destructive: oklch(0.616 0.222 32.918);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.843 0.023 293.555);
  --chart-1: oklch(0.843 0.023 293.555);
  --chart-2: oklch(0.285 0.034 291.768);
  --chart-3: oklch(0.323 0.065 289.945);
  --chart-4: oklch(0.312 0.038 291.683);
  --chart-5: oklch(0.84 0.027 293.466);
}