Gold for shadcn/ui

Gold is a shadcn/ui theme built around a near-white primary color (#f9fbfb) with near-white accents (#fbfbf9). The light mode uses a neutral background (#f8fbfc). Dark mode keeps the near-white primary (#f9fbfb) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#f8fbfcghostwhite
#010304black
Foreground
#041216black
#f8fbfcghostwhite
Card
#f5f9faghostwhite
#030607black
Card foreground
#030e12black
#fbfdfdwhite
Popover
#f8fbfcghostwhite
#010304black
Popover foreground
#041216black
#f8fbfcghostwhite
Primary
#f9fbfbghostwhite
#f9fbfbghostwhite
Primary foreground
#233438darkslategray
#233438darkslategray
Secondary
#fbf9fbsnow
#fbf9fbsnow
Secondary foreground
#774b6edimgray
#774b6edimgray
Muted
#f5eaf3whitesmoke
#150a13black
Muted foreground
#434243darkslategray
#bdbcbdsilver
Accent
#fbfbf9snow
#fbfbf9snow
Accent foreground
#343823darkslategray
#343823darkslategray
Destructive
#5e1f08maroon
#ef6939tomato
Destructive foreground
#f7b8a1lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9fbfbghostwhite
#f9fbfbghostwhite

Contrast

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

Light mode
Text on background18.29:1AAA
Text on card18.39:1AAA
Primary button12.44:1AAA
Secondary button6.63:1AA
Muted text8.55:1AAA
Accent11.66:1AAA
Destructive7.35:1AAA
Dark mode
Text on background19.85:1AAA
Text on card19.88:1AAA
Primary button12.44:1AAA
Secondary button6.63:1AA
Muted text10.24:1AAA
Accent11.66:1AAA
Destructive6.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.003 216.024);
  --foreground: oklch(0.17 0.023 216.3);
  --muted: oklch(0.949 0.017 332.89);
  --muted-foreground: oklch(0.379 0.002 332.718);
  --popover: oklch(0.986 0.003 216.024);
  --popover-foreground: oklch(0.17 0.023 216.3);
  --card: oklch(0.979 0.004 216.03);
  --card-foreground: oklch(0.155 0.02 214.714);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.986 0.002 216.02);
  --primary-foreground: oklch(0.312 0.023 216.735);
  --secondary: oklch(0.984 0.003 332.671);
  --secondary-foreground: oklch(0.474 0.078 334.991);
  --accent: oklch(0.987 0.003 116.388);
  --accent-foreground: oklch(0.332 0.036 118.325);
  --destructive: oklch(0.334 0.098 38.549);
  --destructive-foreground: oklch(0.835 0.081 40.857);
  --ring: oklch(0.986 0.002 216.02);
  --chart-1: oklch(0.986 0.002 216.02);
  --chart-2: oklch(0.984 0.003 332.671);
  --chart-3: oklch(0.987 0.003 116.388);
  --chart-4: oklch(1.008 0.002 152.59);
  --chart-5: oklch(0.986 0.002 216.021);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.008 212.5);
  --foreground: oklch(0.986 0.004 216.027);
  --muted: oklch(0.164 0.026 334.902);
  --muted-foreground: oklch(0.797 0.002 332.657);
  --popover: oklch(0.095 0.008 212.5);
  --popover-foreground: oklch(0.986 0.004 216.027);
  --card: oklch(0.119 0.01 212.5);
  --card-foreground: oklch(0.993 0.002 216.019);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.986 0.002 216.02);
  --primary-foreground: oklch(0.312 0.023 216.735);
  --secondary: oklch(0.984 0.003 332.671);
  --secondary-foreground: oklch(0.474 0.078 334.991);
  --accent: oklch(0.987 0.003 116.388);
  --accent-foreground: oklch(0.332 0.036 118.325);
  --destructive: oklch(0.679 0.177 39.535);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.986 0.002 216.02);
  --chart-1: oklch(0.986 0.002 216.02);
  --chart-2: oklch(0.984 0.003 332.671);
  --chart-3: oklch(0.987 0.003 116.388);
  --chart-4: oklch(1.008 0.002 152.59);
  --chart-5: oklch(0.986 0.002 216.021);
}