Porthole for shadcn/ui

Porthole is a shadcn/ui theme built around a purple primary color (#dd31cf) with pink accents (#dd3179). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the purple primary (#dd31cf) on a purple-tinted background (#10040f).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#10040fblack
Foreground
#170315black
#f9f5f9whitesmoke
Card
#fcf8fcsnow
#10040fblack
Card foreground
#170315black
#f9f5f9whitesmoke
Popover
#fcf8fcsnow
#10040fblack
Popover foreground
#170315black
#f9f5f9whitesmoke
Primary
#dd31cfmediumorchid
#dd31cfmediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#9631ddblueviolet
#9631ddblueviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e4dee8gainsboro
#1d1721black
Muted foreground
#58515ddimgray
#a9a2aedarkgray
Accent
#dd3179mediumvioletred
#dd3179mediumvioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c41d0efirebrick
#f03928orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dd31cfmediumorchid
#dd31cfmediumorchid

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.81:1AAA
Primary button3.86:1AA Large
Secondary button5.56:1AA
Muted text5.77:1AA
Accent4.37:1AA Large
Destructive5.97:1AA
Dark mode
Text on background18.57:1AAA
Text on card18.57:1AAA
Primary button3.86:1AA Large
Secondary button5.56:1AA
Muted text7.08:1AAA
Accent4.37:1AA Large
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.007 328.133);
  --foreground: oklch(0.15 0.053 330.941);
  --muted: oklch(0.907 0.016 311.584);
  --muted-foreground: oklch(0.445 0.021 311.336);
  --popover: oklch(0.983 0.007 328.133);
  --popover-foreground: oklch(0.15 0.053 330.941);
  --card: oklch(0.983 0.007 328.133);
  --card-foreground: oklch(0.15 0.053 330.941);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.639 0.258 331.978);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.549 0.243 306.082);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.603 0.212 1.287);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.525 0.201 30.093);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.639 0.258 331.978);
  --chart-1: oklch(0.639 0.258 331.978);
  --chart-2: oklch(0.549 0.243 306.082);
  --chart-3: oklch(0.603 0.212 1.287);
  --chart-4: oklch(0.571 0.234 306.991);
  --chart-5: oklch(0.644 0.264 332.079);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.035 330.074);
  --foreground: oklch(0.975 0.007 328.135);
  --muted: oklch(0.216 0.022 310.883);
  --muted-foreground: oklch(0.723 0.019 311.512);
  --popover: oklch(0.138 0.035 330.074);
  --popover-foreground: oklch(0.975 0.007 328.135);
  --card: oklch(0.138 0.035 330.074);
  --card-foreground: oklch(0.975 0.007 328.135);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.639 0.258 331.978);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.549 0.243 306.082);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.603 0.212 1.287);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.626 0.221 29.79);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.639 0.258 331.978);
  --chart-1: oklch(0.639 0.258 331.978);
  --chart-2: oklch(0.549 0.243 306.082);
  --chart-3: oklch(0.603 0.212 1.287);
  --chart-4: oklch(0.571 0.234 306.991);
  --chart-5: oklch(0.644 0.264 332.079);
}