Ant for shadcn/ui

Ant is a shadcn/ui theme built around a vivid deep yellow primary color (#79680c) with near-white accents (#ebebeb). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the vivid deep yellow primary (#79680c) on a yellow-tinted background (#0f0d06).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#0f0d06black
Foreground
#121002black
#fbfbf9snow
Card
#fdfdfbsnow
#0f0d06black
Card foreground
#121002black
#fbfbf9snow
Popover
#fdfdfbsnow
#0f0d06black
Popover foreground
#121002black
#fbfbf9snow
Primary
#79680colive
#79680colive
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#ebebeblinen
#25241dblack
Secondary foreground
#525252darkslategray
#c2c0b2silver
Muted
#e2d9d9gainsboro
#26241dblack
Muted foreground
#695d5ddimgray
#a2a096darkgray
Accent
#ebebeblinen
#25241dblack
Accent foreground
#525252darkslategray
#c2c0b2silver
Destructive
#6e210cmaroon
#d84218chocolate
Destructive foreground
#f7c4b6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#79680colive
#79680colive

Contrast

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

Light mode
Text on background18.77:1AAA
Text on card18.77:1AAA
Primary button5.51:1AA
Secondary button6.53:1AA
Muted text4.57:1AA
Accent6.53:1AA
Destructive7.14:1AAA
Dark mode
Text on background18.74:1AAA
Text on card18.74:1AAA
Primary button5.51:1AA
Secondary button8.50:1AAA
Muted text5.90:1AA
Accent8.50:1AAA
Destructive4.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 98.351);
  --foreground: oklch(0.171 0.029 101.284);
  --muted: oklch(0.893 0.01 17.347);
  --muted-foreground: oklch(0.491 0.015 17.689);
  --popover: oklch(0.994 0.002 98.351);
  --popover-foreground: oklch(0.171 0.029 101.284);
  --card: oklch(0.994 0.002 98.351);
  --card-foreground: oklch(0.171 0.029 101.284);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.519 0.103 97.892);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.939 0 180);
  --secondary-foreground: oklch(0.437 0 180);
  --accent: oklch(0.939 0 180);
  --accent-foreground: oklch(0.437 0 180);
  --destructive: oklch(0.367 0.113 35.656);
  --destructive-foreground: oklch(0.861 0.062 35.979);
  --ring: oklch(0.519 0.103 97.892);
  --chart-1: oklch(0.519 0.103 97.892);
  --chart-2: oklch(0.939 0 180);
  --chart-3: oklch(0.939 0 180);
  --chart-4: oklch(0.962 0 180);
  --chart-5: oklch(0.524 0.105 97.708);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.016 100.125);
  --foreground: oklch(0.986 0.002 98.346);
  --muted: oklch(0.261 0.014 99.011);
  --muted-foreground: oklch(0.703 0.015 98.602);
  --popover: oklch(0.159 0.016 100.125);
  --popover-foreground: oklch(0.986 0.002 98.346);
  --card: oklch(0.159 0.016 100.125);
  --card-foreground: oklch(0.986 0.002 98.346);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.519 0.103 97.892);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.259 0.012 98.931);
  --secondary-foreground: oklch(0.806 0.02 98.647);
  --accent: oklch(0.259 0.012 98.931);
  --accent-foreground: oklch(0.806 0.02 98.647);
  --destructive: oklch(0.591 0.193 35.12);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.519 0.103 97.892);
  --chart-1: oklch(0.519 0.103 97.892);
  --chart-2: oklch(0.259 0.012 98.931);
  --chart-3: oklch(0.259 0.012 98.931);
  --chart-4: oklch(0.293 0.015 98.96);
  --chart-5: oklch(0.524 0.105 97.708);
}