Spanish for shadcn/ui

Spanish is a shadcn/ui theme built around a near-black primary color (#030302) with near-black accents (#020203). The light mode uses a neutral background (#fbfdf7). Dark mode keeps the near-black primary (#030302) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdf7snow
#000000black
Foreground
#070901black
#f8f9f6whitesmoke
Card
#fbfdf7snow
#000000black
Card foreground
#070901black
#f8f9f6whitesmoke
Popover
#fbfdf7snow
#000000black
Popover foreground
#070901black
#f8f9f6whitesmoke
Primary
#030302black
#030302black
Primary foreground
#a1a790darkgray
#a1a790darkgray
Secondary
#020203black
#020203black
Secondary foreground
#9690a7darkgray
#9690a7darkgray
Muted
#e3e0eblavender
#17141fblack
Muted foreground
#5c576bdimgray
#9a94a8darkgray
Accent
#020203black
#020203black
Accent foreground
#9690a7darkgray
#9690a7darkgray
Destructive
#6a150bmaroon
#e83521orangered
Destructive foreground
#f7b8b1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#030302black
#030302black

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.50:1AAA
Primary button8.30:1AAA
Secondary button6.74:1AA
Muted text5.33:1AA
Accent6.74:1AA
Destructive7.21:1AAA
Dark mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button8.30:1AAA
Secondary button6.74:1AA
Muted text6.19:1AA
Accent6.74:1AA
Destructive4.23:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.007 118.694);
  --foreground: oklch(0.134 0.026 118.677);
  --muted: oklch(0.913 0.014 298.298);
  --muted-foreground: oklch(0.47 0.032 297.381);
  --popover: oklch(0.99 0.007 118.694);
  --popover-foreground: oklch(0.134 0.026 118.677);
  --card: oklch(0.99 0.007 118.694);
  --card-foreground: oklch(0.134 0.026 118.677);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.094 0.003 118.587);
  --primary-foreground: oklch(0.718 0.034 119.407);
  --secondary: oklch(0.089 0.003 298.543);
  --secondary-foreground: oklch(0.666 0.036 297.626);
  --accent: oklch(0.089 0.003 298.543);
  --accent-foreground: oklch(0.666 0.036 297.626);
  --destructive: oklch(0.345 0.121 30.392);
  --destructive-foreground: oklch(0.837 0.075 25.962);
  --ring: oklch(0.094 0.003 118.587);
  --chart-1: oklch(0.094 0.003 118.587);
  --chart-2: oklch(0.089 0.003 298.543);
  --chart-3: oklch(0.089 0.003 298.543);
  --chart-4: oklch(0.142 0.005 298.27);
  --chart-5: oklch(0.095 0.004 118.592);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.98 0.004 118.636);
  --muted: oklch(0.201 0.02 296.747);
  --muted-foreground: oklch(0.679 0.029 297.823);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.98 0.004 118.636);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.98 0.004 118.636);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.094 0.003 118.587);
  --primary-foreground: oklch(0.718 0.034 119.407);
  --secondary: oklch(0.089 0.003 298.543);
  --secondary-foreground: oklch(0.666 0.036 297.626);
  --accent: oklch(0.089 0.003 298.543);
  --accent-foreground: oklch(0.666 0.036 297.626);
  --destructive: oklch(0.608 0.217 30.454);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.094 0.003 118.587);
  --chart-1: oklch(0.094 0.003 118.587);
  --chart-2: oklch(0.089 0.003 298.543);
  --chart-3: oklch(0.089 0.003 298.543);
  --chart-4: oklch(0.142 0.005 298.27);
  --chart-5: oklch(0.095 0.004 118.592);
}