Troubled for shadcn/ui

Troubled is a shadcn/ui theme built around a blue primary color (#929ec8) with yellow accents (#c8bd92). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the blue primary (#929ec8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfcfewhite
#000000black
Foreground
#060913black
#f8f9fcghostwhite
Card
#f8f9fcghostwhite
#030303black
Card foreground
#05070fblack
#fcfcfdwhite
Popover
#f8f9fcghostwhite
#030303black
Popover foreground
#05070fblack
#fcfcfdwhite
Primary
#929ec8darkgray
#929ec8darkgray
Primary foreground
#0e111bblack
#0e111bblack
Secondary
#c8bd92tan
#c8bd92tan
Secondary foreground
#1b180eblack
#1b180eblack
Muted
#e0dfdcgainsboro
#23221fblack
Muted foreground
#646462dimgray
#9d9c9bdarkgray
Accent
#c8bd92tan
#c8bd92tan
Accent foreground
#1b180eblack
#1b180eblack
Destructive
#b9470esienna
#d55210chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#929ec8darkgray
#929ec8darkgray

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card19.04:1AAA
Primary button7.14:1AAA
Secondary button9.40:1AAA
Muted text4.45:1AA Large
Accent9.40:1AAA
Destructive5.29:1AA
Dark mode
Text on background19.94:1AAA
Text on card20.16:1AAA
Primary button7.14:1AAA
Secondary button9.40:1AAA
Muted text5.77:1AA
Accent9.40:1AAA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 273.837);
  --foreground: oklch(0.143 0.023 269.619);
  --muted: oklch(0.904 0.005 93.925);
  --muted-foreground: oklch(0.503 0.002 93.919);
  --popover: oklch(0.981 0.005 273.808);
  --popover-foreground: oklch(0.132 0.02 268.539);
  --card: oklch(0.981 0.005 273.808);
  --card-foreground: oklch(0.132 0.02 268.539);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.706 0.063 272.653);
  --primary-foreground: oklch(0.178 0.022 272.074);
  --secondary: oklch(0.796 0.058 94.445);
  --secondary-foreground: oklch(0.21 0.02 94.495);
  --accent: oklch(0.796 0.058 94.445);
  --accent-foreground: oklch(0.21 0.02 94.495);
  --destructive: oklch(0.546 0.16 41.602);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.706 0.063 272.653);
  --chart-1: oklch(0.706 0.063 272.653);
  --chart-2: oklch(0.796 0.058 94.445);
  --chart-3: oklch(0.796 0.058 94.445);
  --chart-4: oklch(0.816 0.053 94.407);
  --chart-5: oklch(0.702 0.069 272.513);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.982 0.004 273.82);
  --muted: oklch(0.254 0.007 94.137);
  --muted-foreground: oklch(0.693 0.002 93.901);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.991 0.002 273.843);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.991 0.002 273.843);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.706 0.063 272.653);
  --primary-foreground: oklch(0.178 0.022 272.074);
  --secondary: oklch(0.796 0.058 94.445);
  --secondary-foreground: oklch(0.21 0.02 94.495);
  --accent: oklch(0.796 0.058 94.445);
  --accent-foreground: oklch(0.21 0.02 94.495);
  --destructive: oklch(0.606 0.179 41.359);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.706 0.063 272.653);
  --chart-1: oklch(0.706 0.063 272.653);
  --chart-2: oklch(0.796 0.058 94.445);
  --chart-3: oklch(0.796 0.058 94.445);
  --chart-4: oklch(0.816 0.053 94.407);
  --chart-5: oklch(0.702 0.069 272.513);
}