Stripe for shadcn/ui

Stripe is a shadcn/ui theme built around a near-black primary color (#090608) with near-black accents (#060809). The light mode uses a neutral background (#fdf7fa). Dark mode keeps the near-black primary (#090608) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdf7fasnow
#030203black
Foreground
#17030eblack
#fdfcfdwhite
Card
#fdf7fasnow
#030203black
Card foreground
#17030eblack
#fdfcfdwhite
Popover
#fdf7fasnow
#030203black
Popover foreground
#17030eblack
#fdfcfdwhite
Primary
#090608black
#090608black
Primary foreground
#b092a3rosybrown
#b092a3rosybrown
Secondary
#080906black
#080906black
Secondary foreground
#a3b092darkseagreen
#a3b092darkseagreen
Muted
#e1e7dagainsboro
#202518black
Muted foreground
#5d6652dimgray
#a5ad99darkgray
Accent
#060809black
#060809black
Accent foreground
#92a3b0darkgray
#92a3b0darkgray
Destructive
#ca0f0cfirebrick
#e7110dred
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#090608black
#090608black

Contrast

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

Light mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button7.17:1AAA
Secondary button8.73:1AAA
Muted text4.76:1AA
Accent7.73:1AAA
Destructive5.83:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button7.17:1AAA
Secondary button8.73:1AAA
Muted text6.76:1AA
Accent7.73:1AAA
Destructive4.67:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 341.212);
  --foreground: oklch(0.146 0.046 345.351);
  --muted: oklch(0.919 0.017 125.306);
  --muted-foreground: oklch(0.497 0.033 125.987);
  --popover: oklch(0.981 0.008 341.212);
  --popover-foreground: oklch(0.146 0.046 345.351);
  --card: oklch(0.981 0.008 341.212);
  --card-foreground: oklch(0.146 0.046 345.351);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.13 0.006 341.035);
  --primary-foreground: oklch(0.691 0.043 342.421);
  --secondary: oklch(0.137 0.006 124.796);
  --secondary-foreground: oklch(0.738 0.045 125.901);
  --accent: oklch(0.132 0.004 236.207);
  --accent-foreground: oklch(0.706 0.027 238.929);
  --destructive: oklch(0.532 0.212 28.949);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.13 0.006 341.035);
  --chart-1: oklch(0.13 0.006 341.035);
  --chart-2: oklch(0.137 0.006 124.796);
  --chart-3: oklch(0.132 0.004 236.207);
  --chart-4: oklch(0.177 0.01 125.873);
  --chart-5: oklch(0.129 0.008 341.039);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.009 341.056);
  --foreground: oklch(0.992 0.002 341.052);
  --muted: oklch(0.254 0.023 126.379);
  --muted-foreground: oklch(0.736 0.03 125.616);
  --popover: oklch(0.088 0.009 341.056);
  --popover-foreground: oklch(0.992 0.002 341.052);
  --card: oklch(0.088 0.009 341.056);
  --card-foreground: oklch(0.992 0.002 341.052);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.13 0.006 341.035);
  --primary-foreground: oklch(0.691 0.043 342.421);
  --secondary: oklch(0.137 0.006 124.796);
  --secondary-foreground: oklch(0.738 0.045 125.901);
  --accent: oklch(0.132 0.004 236.207);
  --accent-foreground: oklch(0.706 0.027 238.929);
  --destructive: oklch(0.587 0.235 29);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.13 0.006 341.035);
  --chart-1: oklch(0.13 0.006 341.035);
  --chart-2: oklch(0.137 0.006 124.796);
  --chart-3: oklch(0.132 0.004 236.207);
  --chart-4: oklch(0.177 0.01 125.873);
  --chart-5: oklch(0.129 0.008 341.039);
}