Dainty – Cobalt2 for shadcn/ui

Dainty – Cobalt2 is a shadcn/ui theme built around a vivid yellow primary color (#c79500) with blue accents (#2c5e81). The light mode uses a blue-tinted background (#193448). Dark mode keeps the vivid yellow primary (#c79500) on a blue-tinted background (#193448).

Color palette

TokenLightDark
Background
#193448darkslategray
#193448darkslategray
Foreground
#d4e3f2lavender
#d4e3f2lavender
Card
#162f41darkslategray
#162f41darkslategray
Card foreground
#e8f0f8lavender
#e8f0f8lavender
Popover
#152c3ddarkslategray
#152c3ddarkslategray
Popover foreground
#fbfcfewhite
#fbfcfewhite
Primary
#c79500darkgoldenrod
#c79500darkgoldenrod
Primary foreground
#000000black
#000000black
Secondary
#53492ddarkolivegreen
#53492ddarkolivegreen
Secondary foreground
#e4decdgainsboro
#e4decdgainsboro
Muted
#343c42darkslategray
#343c42darkslategray
Muted foreground
#b2bcc2silver
#b2bcc2silver
Accent
#2c5e81darkslateblue
#2c5e81darkslateblue
Accent foreground
#e8f1f7lavender
#e8f1f7lavender
Destructive
#ff2f0aorangered
#ff2f0aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#254155darkslategray
#254155darkslategray
Input
#2a4960darkslategray
#2a4960darkslategray
Ring
#c79500darkgoldenrod
#c79500darkgoldenrod

Contrast

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

Light mode
Text on background9.83:1AAA
Text on card12.04:1AAA
Primary button7.73:1AAA
Secondary button6.60:1AA
Muted text5.82:1AA
Accent6.07:1AA
Destructive3.70:1AA Large
Dark mode
Text on background9.83:1AAA
Text on card12.04:1AAA
Primary button7.73:1AAA
Secondary button6.60:1AA
Muted text5.82:1AA
Accent6.07:1AA
Destructive3.70:1AA Large

CSS variables

Paste this into your globals.css to use Dainty – Cobalt2 in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.315 0.049 241.683);
  --foreground: oklch(0.909 0.025 248.107);
  --muted: oklch(0.35 0.015 239.002);
  --muted-foreground: oklch(0.788 0.015 238.626);
  --popover: oklch(0.283 0.043 241.496);
  --popover-foreground: oklch(0.992 0.002 247.845);
  --card: oklch(0.294 0.045 241.563);
  --card-foreground: oklch(0.951 0.014 247.971);
  --border: oklch(0.363 0.048 240.951);
  --input: oklch(0.393 0.053 241.025);
  --primary: oklch(0.699 0.143 84.662);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.408 0.046 91.7);
  --secondary-foreground: oklch(0.902 0.024 91.62);
  --accent: oklch(0.463 0.079 242.219);
  --accent-foreground: oklch(0.953 0.013 238.55);
  --destructive: oklch(0.644 0.243 31.562);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.699 0.143 84.662);
  --chart-1: oklch(0.699 0.143 84.662);
  --chart-2: oklch(0.408 0.046 91.7);
  --chart-3: oklch(0.463 0.079 242.219);
  --chart-4: oklch(0.441 0.05 91.686);
  --chart-5: oklch(0.705 0.145 84.272);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.315 0.049 241.683);
  --foreground: oklch(0.909 0.025 248.107);
  --muted: oklch(0.35 0.015 239.002);
  --muted-foreground: oklch(0.788 0.015 238.626);
  --popover: oklch(0.283 0.043 241.496);
  --popover-foreground: oklch(0.992 0.002 247.845);
  --card: oklch(0.294 0.045 241.563);
  --card-foreground: oklch(0.951 0.014 247.971);
  --border: oklch(0.363 0.048 240.951);
  --input: oklch(0.393 0.053 241.025);
  --primary: oklch(0.699 0.143 84.662);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.408 0.046 91.7);
  --secondary-foreground: oklch(0.902 0.024 91.62);
  --accent: oklch(0.463 0.079 242.219);
  --accent-foreground: oklch(0.953 0.013 238.55);
  --destructive: oklch(0.644 0.243 31.562);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.699 0.143 84.662);
  --chart-1: oklch(0.699 0.143 84.662);
  --chart-2: oklch(0.408 0.046 91.7);
  --chart-3: oklch(0.463 0.079 242.219);
  --chart-4: oklch(0.441 0.05 91.686);
  --chart-5: oklch(0.705 0.145 84.272);
}