Ancient for shadcn/ui

Ancient is a shadcn/ui theme built around a near-black primary color (#010501) with near-black accents (#010503). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#010501) on a neutral background (#030803).

Color palette

TokenLightDark
Background
#ffffffwhite
#030803black
Foreground
#051505black
#f9fbf9mintcream
Card
#fcfcfcsnow
#040b04black
Card foreground
#041104black
#fcfdfcwhite
Popover
#ffffffwhite
#030803black
Popover foreground
#051505black
#f9fbf9mintcream
Primary
#010501black
#010501black
Primary foreground
#16bb19limegreen
#16bb19limegreen
Secondary
#020501black
#020501black
Secondary foreground
#66bb16olivedrab
#66bb16olivedrab
Muted
#e0e8d8gainsboro
#1e2717black
Muted foreground
#637057dimgray
#9ba88fdarkseagreen
Accent
#010503black
#010503black
Accent foreground
#16bb6bmediumseagreen
#16bb6bmediumseagreen
Destructive
#d03501firebrick
#fe6734tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010501black
#010501black

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.90:1AAA
Primary button7.99:1AAA
Secondary button8.48:1AAA
Muted text4.20:1AA Large
Accent8.17:1AAA
Destructive5.01:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.49:1AAA
Primary button7.99:1AAA
Secondary button8.48:1AAA
Muted text6.20:1AA
Accent8.17:1AAA
Destructive7.18:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.175 0.04 144.024);
  --muted: oklch(0.921 0.023 129.392);
  --muted-foreground: oklch(0.528 0.042 130.018);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.175 0.04 144.024);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.158 0.035 144.143);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.099 0.026 143.775);
  --primary-foreground: oklch(0.689 0.226 142.719);
  --secondary: oklch(0.104 0.022 127.513);
  --secondary-foreground: oklch(0.711 0.201 134.775);
  --accent: oklch(0.101 0.017 166.254);
  --accent-foreground: oklch(0.698 0.17 154.406);
  --destructive: oklch(0.565 0.198 34.937);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.099 0.026 143.775);
  --chart-1: oklch(0.099 0.026 143.775);
  --chart-2: oklch(0.104 0.022 127.513);
  --chart-3: oklch(0.101 0.017 166.254);
  --chart-4: oklch(0.169 0.037 129.367);
  --chart-5: oklch(0.099 0.027 143.682);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.021 144.674);
  --foreground: oklch(0.985 0.002 146.037);
  --muted: oklch(0.258 0.031 130.512);
  --muted-foreground: oklch(0.715 0.04 129.727);
  --popover: oklch(0.121 0.021 144.674);
  --popover-foreground: oklch(0.985 0.002 146.037);
  --card: oklch(0.139 0.024 144.665);
  --card-foreground: oklch(0.993 0.001 146.045);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.099 0.026 143.775);
  --primary-foreground: oklch(0.689 0.226 142.719);
  --secondary: oklch(0.104 0.022 127.513);
  --secondary-foreground: oklch(0.711 0.201 134.775);
  --accent: oklch(0.101 0.017 166.254);
  --accent-foreground: oklch(0.698 0.17 154.406);
  --destructive: oklch(0.697 0.196 38.031);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.099 0.026 143.775);
  --chart-1: oklch(0.099 0.026 143.775);
  --chart-2: oklch(0.104 0.022 127.513);
  --chart-3: oklch(0.101 0.017 166.254);
  --chart-4: oklch(0.169 0.037 129.367);
  --chart-5: oklch(0.099 0.027 143.682);
}