Drug for shadcn/ui

Drug is a shadcn/ui theme built around a teal primary color (#3e847c) with yellow accents (#847c3e). The light mode uses a neutral background (#fbfefe). Dark mode keeps the teal primary (#3e847c) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefewhite
#000000black
Foreground
#010504black
#f8fcfbmintcream
Card
#fbfefewhite
#000000black
Card foreground
#010504black
#f8fcfbmintcream
Popover
#fbfefewhite
#000000black
Popover foreground
#010504black
#f8fcfbmintcream
Primary
#3e847cseagreen
#3e847cseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7c3e84rebeccapurple
#7c3e84rebeccapurple
Secondary foreground
#fbf8fcghostwhite
#fbf8fcghostwhite
Muted
#e5e1e5gainsboro
#1e1a1eblack
Muted foreground
#4e4a4fdarkslategray
#b4b0b5darkgray
Accent
#847c3eolivedrab
#847c3eolivedrab
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#8d2c02saddlebrown
#fc7136tomato
Destructive foreground
#fed5c3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e847cseagreen
#3e847cseagreen

Contrast

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

Light mode
Text on background20.18:1AAA
Text on card20.18:1AAA
Primary button4.39:1AA Large
Secondary button6.93:1AA
Muted text6.70:1AA
Accent4.27:1AA Large
Destructive6.24:1AA
Dark mode
Text on background20.30:1AAA
Text on card20.30:1AAA
Primary button4.39:1AA Large
Secondary button6.93:1AA
Muted text8.05:1AAA
Accent4.27:1AA Large
Destructive7.57:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 188.837);
  --foreground: oklch(0.102 0.015 188.095);
  --muted: oklch(0.913 0.007 322.14);
  --muted-foreground: oklch(0.415 0.009 322.188);
  --popover: oklch(0.994 0.003 188.837);
  --popover-foreground: oklch(0.102 0.015 188.095);
  --card: oklch(0.994 0.003 188.837);
  --card-foreground: oklch(0.102 0.015 188.095);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.565 0.072 185.315);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.47 0.128 322.821);
  --secondary-foreground: oklch(0.983 0.006 322.133);
  --accent: oklch(0.579 0.083 101.848);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.435 0.139 38.705);
  --destructive-foreground: oklch(0.902 0.053 44.486);
  --ring: oklch(0.565 0.072 185.315);
  --chart-1: oklch(0.565 0.072 185.315);
  --chart-2: oklch(0.47 0.128 322.821);
  --chart-3: oklch(0.579 0.083 101.848);
  --chart-4: oklch(0.496 0.136 322.824);
  --chart-5: oklch(0.572 0.076 185.058);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.988 0.004 188.81);
  --muted: oklch(0.223 0.01 322.27);
  --muted-foreground: oklch(0.763 0.008 322.148);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.988 0.004 188.81);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.988 0.004 188.81);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.565 0.072 185.315);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.47 0.128 322.821);
  --secondary-foreground: oklch(0.983 0.006 322.133);
  --accent: oklch(0.579 0.083 101.848);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.709 0.184 41.704);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.565 0.072 185.315);
  --chart-1: oklch(0.565 0.072 185.315);
  --chart-2: oklch(0.47 0.128 322.821);
  --chart-3: oklch(0.579 0.083 101.848);
  --chart-4: oklch(0.496 0.136 322.824);
  --chart-5: oklch(0.572 0.076 185.058);
}