Bagel for shadcn/ui

Bagel is a shadcn/ui theme built around a vivid purple primary color (#bb02b5) with vivid teal accents (#02b5bb). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#bb02b5) on a purple-tinted background (#0e060e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e060eblack
Foreground
#110410black
#f8f7f8whitesmoke
Card
#ffffffwhite
#0e060eblack
Card foreground
#110410black
#f8f7f8whitesmoke
Popover
#ffffffwhite
#0e060eblack
Popover foreground
#110410black
#f8f7f8whitesmoke
Primary
#bb02b5darkviolet
#bb02b5darkviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#b5bb02goldenrod
#b5bb02goldenrod
Secondary foreground
#000000black
#000000black
Muted
#efefe1beige
#1e1e10black
Muted foreground
#656657dimgray
#a8a899darkgray
Accent
#02b5bbdarkturquoise
#02b5bbdarkturquoise
Accent foreground
#000000black
#000000black
Destructive
#990f0fdarkred
#e31616crimson
Destructive foreground
#fcdfdfmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bb02b5darkviolet
#bb02b5darkviolet

Contrast

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

Light mode
Text on background20.02:1AAA
Text on card20.02:1AAA
Primary button5.55:1AA
Secondary button10.04:1AAA
Muted text5.04:1AA
Accent8.29:1AAA
Destructive6.88:1AA
Dark mode
Text on background18.68:1AAA
Text on card18.68:1AAA
Primary button5.55:1AA
Secondary button10.04:1AAA
Muted text6.99:1AA
Accent8.29:1AAA
Destructive4.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.138 0.038 328.51);
  --muted: oklch(0.948 0.019 108.302);
  --muted-foreground: oklch(0.505 0.023 108.764);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.138 0.038 328.51);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.138 0.038 328.51);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.552 0.251 330.149);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.761 0.168 112.15);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.701 0.119 199.135);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.436 0.169 28.094);
  --destructive-foreground: oklch(0.926 0.032 17.752);
  --ring: oklch(0.552 0.251 330.149);
  --chart-1: oklch(0.552 0.251 330.149);
  --chart-2: oklch(0.761 0.168 112.15);
  --chart-3: oklch(0.701 0.119 199.135);
  --chart-4: oklch(0.807 0.178 112.162);
  --chart-5: oklch(0.558 0.254 330.184);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.024 327.817);
  --foreground: oklch(0.976 0.003 326.566);
  --muted: oklch(0.23 0.025 109.867);
  --muted-foreground: oklch(0.728 0.021 108.47);
  --popover: oklch(0.14 0.024 327.817);
  --popover-foreground: oklch(0.976 0.003 326.566);
  --card: oklch(0.14 0.024 327.817);
  --card-foreground: oklch(0.976 0.003 326.566);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.552 0.251 330.149);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.761 0.168 112.15);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.701 0.119 199.135);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.582 0.23 28.404);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.552 0.251 330.149);
  --chart-1: oklch(0.552 0.251 330.149);
  --chart-2: oklch(0.761 0.168 112.15);
  --chart-3: oklch(0.701 0.119 199.135);
  --chart-4: oklch(0.807 0.178 112.162);
  --chart-5: oklch(0.558 0.254 330.184);
}