Spanish for shadcn/ui

Spanish is a shadcn/ui theme built around a purple primary color (#a3199f) with teal accents (#199fa3). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#a3199f) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#0c040bblack
#fbf9fbsnow
Card
#fcf7fcsnow
#030303black
Card foreground
#080208black
#fdfcfdwhite
Popover
#fefbfewhite
#000000black
Popover foreground
#0c040bblack
#fbf9fbsnow
Primary
#a3199fdarkmagenta
#a3199fdarkmagenta
Primary foreground
#fdf2fdghostwhite
#fdf2fdghostwhite
Secondary
#9fa319darkgoldenrod
#9fa319darkgoldenrod
Secondary foreground
#000000black
#000000black
Muted
#deded9gainsboro
#262621darkslategray
Muted foreground
#666660dimgray
#9e9f99darkgray
Accent
#199fa3lightseagreen
#199fa3lightseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#712a04saddlebrown
#f87935coral
Destructive foreground
#fcc8abnavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a3199fdarkmagenta
#a3199fdarkmagenta

Contrast

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

Light mode
Text on background19.70:1AAA
Text on card19.47:1AAA
Primary button6.02:1AA
Secondary button7.73:1AAA
Muted text4.27:1AA Large
Accent3.22:1AA Large
Destructive6.85:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.20:1AAA
Primary button6.02:1AA
Secondary button7.73:1AAA
Muted text5.68:1AA
Accent3.22:1AA Large
Destructive7.78:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 326.577);
  --foreground: oklch(0.125 0.027 328.008);
  --muted: oklch(0.898 0.007 108.077);
  --muted-foreground: oklch(0.51 0.009 108.27);
  --popover: oklch(0.991 0.004 326.577);
  --popover-foreground: oklch(0.125 0.027 328.008);
  --card: oklch(0.983 0.008 326.614);
  --card-foreground: oklch(0.109 0.024 327.93);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.508 0.216 329.777);
  --primary-foreground: oklch(0.972 0.019 326.705);
  --secondary: oklch(0.69 0.146 111.748);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.639 0.104 198.651);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.385 0.11 43.19);
  --destructive-foreground: oklch(0.871 0.071 49.701);
  --ring: oklch(0.508 0.216 329.777);
  --chart-1: oklch(0.508 0.216 329.777);
  --chart-2: oklch(0.69 0.146 111.748);
  --chart-3: oklch(0.639 0.104 198.651);
  --chart-4: oklch(0.731 0.155 111.762);
  --chart-5: oklch(0.513 0.221 329.833);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.003 326.565);
  --muted: oklch(0.267 0.009 108.55);
  --muted-foreground: oklch(0.699 0.009 108.163);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.003 326.565);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 326.553);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.508 0.216 329.777);
  --primary-foreground: oklch(0.972 0.019 326.705);
  --secondary: oklch(0.69 0.146 111.748);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.639 0.104 198.651);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.714 0.174 45.784);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.508 0.216 329.777);
  --chart-1: oklch(0.508 0.216 329.777);
  --chart-2: oklch(0.69 0.146 111.748);
  --chart-3: oklch(0.639 0.104 198.651);
  --chart-4: oklch(0.731 0.155 111.762);
  --chart-5: oklch(0.513 0.221 329.833);
}