Treasured for shadcn/ui

Treasured is a shadcn/ui theme built around a muted deep violet primary color (#18141a) with muted light violet accents (#cfbcd7). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted deep violet primary (#18141a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#030104black
#faf9fbghostwhite
Card
#fdfbfewhite
#000000black
Card foreground
#030104black
#faf9fbghostwhite
Popover
#fdfbfewhite
#000000black
Popover foreground
#030104black
#faf9fbghostwhite
Primary
#18141ablack
#18141ablack
Primary foreground
#b5a4bcdarkgray
#b5a4bcdarkgray
Secondary
#e3dae7gainsboro
#362d39darkslategray
Secondary foreground
#4e3956darkslategray
#cfc6d2thistle
Muted
#e1dee3gainsboro
#201c21black
Muted foreground
#605266dimgray
#a899addarkgray
Accent
#cfbcd7thistle
#4f3d57darkslategray
Accent foreground
#36243ddarkslategray
#e5dee8gainsboro
Destructive
#721004maroon
#f94b34tomato
Destructive foreground
#fcb4ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#18141ablack
#18141ablack

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button7.81:1AAA
Secondary button7.57:1AAA
Muted text5.44:1AA
Accent7.99:1AAA
Destructive6.84:1AA
Dark mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button7.81:1AAA
Secondary button7.97:1AAA
Muted text6.26:1AA
Accent7.42:1AAA
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 316.598);
  --foreground: oklch(0.081 0.023 319.052);
  --muted: oklch(0.905 0.008 316.584);
  --muted-foreground: oklch(0.459 0.037 316.373);
  --popover: oklch(0.991 0.004 316.598);
  --popover-foreground: oklch(0.081 0.023 319.052);
  --card: oklch(0.991 0.004 316.598);
  --card-foreground: oklch(0.081 0.023 319.052);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.198 0.016 316.379);
  --primary-foreground: oklch(0.741 0.039 316.457);
  --secondary: oklch(0.9 0.019 316.547);
  --secondary-foreground: oklch(0.379 0.054 316.173);
  --accent: oklch(0.819 0.044 316.452);
  --accent-foreground: oklch(0.293 0.051 316.063);
  --destructive: oklch(0.356 0.133 31.347);
  --destructive-foreground: oklch(0.836 0.086 27.456);
  --ring: oklch(0.198 0.016 316.379);
  --chart-1: oklch(0.198 0.016 316.379);
  --chart-2: oklch(0.9 0.019 316.547);
  --chart-3: oklch(0.819 0.044 316.452);
  --chart-4: oklch(0.925 0.014 316.564);
  --chart-5: oklch(0.197 0.019 316.33);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.004 316.597);
  --muted: oklch(0.233 0.011 316.476);
  --muted-foreground: oklch(0.702 0.033 316.471);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.004 316.597);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.983 0.004 316.597);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.198 0.016 316.379);
  --primary-foreground: oklch(0.741 0.039 316.457);
  --secondary: oklch(0.311 0.025 316.377);
  --secondary-foreground: oklch(0.837 0.019 316.541);
  --accent: oklch(0.391 0.048 316.244);
  --accent-foreground: oklch(0.909 0.015 316.561);
  --destructive: oklch(0.658 0.214 30.846);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.198 0.016 316.379);
  --chart-1: oklch(0.198 0.016 316.379);
  --chart-2: oklch(0.311 0.025 316.377);
  --chart-3: oklch(0.391 0.048 316.244);
  --chart-4: oklch(0.34 0.028 316.37);
  --chart-5: oklch(0.197 0.019 316.33);
}