Opera for shadcn/ui

Opera is a shadcn/ui theme built around a pink primary color (#b46494) with muted light pink accents (#d4bfcb). The light mode uses a neutral background (#ffffff). Dark mode keeps the pink primary (#b46494) on a pink-tinted background (#0d070b).

Color palette

TokenLightDark
Background
#ffffffwhite
#0d070bblack
Foreground
#080206black
#fcf8fasnow
Card
#fcfcfcsnow
#11090eblack
Card foreground
#040103black
#fdfcfdwhite
Popover
#ffffffwhite
#0d070bblack
Popover foreground
#080206black
#fcf8fasnow
Primary
#b46494palevioletred
#b46494palevioletred
Primary foreground
#000000black
#000000black
Secondary
#ded4dagainsboro
#21171dblack
Secondary foreground
#483741darkslategray
#c3a7b8silver
Muted
#e0dcdegainsboro
#231f21black
Muted foreground
#675b62dimgray
#a4989fdarkgray
Accent
#d4bfcbthistle
#412536darkslategray
Accent foreground
#3a2732darkslategray
#dabecfthistle
Destructive
#c63906firebrick
#f85316orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b46494palevioletred
#b46494palevioletred

Contrast

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

Light mode
Text on background20.55:1AAA
Text on card20.32:1AAA
Primary button5.20:1AA
Secondary button7.63:1AAA
Muted text4.76:1AA
Accent8.00:1AAA
Destructive5.26:1AA
Dark mode
Text on background18.94:1AAA
Text on card19.22:1AAA
Primary button5.20:1AA
Secondary button7.92:1AAA
Muted text5.84:1AA
Accent7.94:1AAA
Destructive3.37:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.106 0.023 340.386);
  --muted: oklch(0.898 0.004 340.346);
  --muted-foreground: oklch(0.485 0.018 341.075);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.106 0.023 340.386);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.084 0.018 340.386);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.61 0.119 344.341);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.879 0.014 340.58);
  --secondary-foreground: oklch(0.36 0.028 341.936);
  --accent: oklch(0.826 0.028 340.992);
  --accent-foreground: oklch(0.3 0.033 342.579);
  --destructive: oklch(0.551 0.184 36.29);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.61 0.119 344.341);
  --chart-1: oklch(0.61 0.119 344.341);
  --chart-2: oklch(0.879 0.014 340.58);
  --chart-3: oklch(0.826 0.028 340.992);
  --chart-4: oklch(0.903 0.011 340.502);
  --chart-5: oklch(0.609 0.129 344.686);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.015 341.569);
  --foreground: oklch(0.983 0.005 340.339);
  --muted: oklch(0.246 0.006 340.798);
  --muted-foreground: oklch(0.693 0.017 340.776);
  --popover: oklch(0.14 0.015 341.569);
  --popover-foreground: oklch(0.983 0.005 340.339);
  --card: oklch(0.152 0.017 342.546);
  --card-foreground: oklch(0.991 0.002 340.286);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.61 0.119 344.341);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.22 0.021 342.253);
  --secondary-foreground: oklch(0.758 0.04 341.388);
  --accent: oklch(0.307 0.051 343.708);
  --accent-foreground: oklch(0.83 0.04 341.283);
  --destructive: oklch(0.662 0.211 37.315);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.61 0.119 344.341);
  --chart-1: oklch(0.61 0.119 344.341);
  --chart-2: oklch(0.22 0.021 342.253);
  --chart-3: oklch(0.307 0.051 343.708);
  --chart-4: oklch(0.25 0.025 342.407);
  --chart-5: oklch(0.609 0.129 344.686);
}