Visa for shadcn/ui

Visa is a shadcn/ui theme built around a green primary color (#96a834) with muted light green accents (#dcdfcd). The light mode uses a neutral background (#fefefb). Dark mode keeps the green primary (#96a834) on a neutral background (#040401).

Color palette

TokenLightDark
Background
#fefefbwhite
#040401black
Foreground
#0c0d02black
#f9faf5whitesmoke
Card
#fcfdf7snow
#070802black
Card foreground
#080901black
#fbfcf8snow
Popover
#fefefbwhite
#040401black
Popover foreground
#0c0d02black
#f9faf5whitesmoke
Primary
#96a834yellowgreen
#96a834yellowgreen
Primary foreground
#0a0c04black
#0a0c04black
Secondary
#edede8linen
#1d1d1bblack
Secondary foreground
#22231ablack
#b7b7b3silver
Muted
#e9ecd4beige
#272b13black
Muted foreground
#45463fdarkslategray
#bfc0b9silver
Accent
#dcdfcdgainsboro
#2e2f28darkslategray
Accent foreground
#474b30darkolivegreen
#c8c9c0silver
Destructive
#a41a04firebrick
#f92b0borangered
Destructive foreground
#fee1dcmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#96a834yellowgreen
#96a834yellowgreen

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card19.57:1AAA
Primary button7.43:1AAA
Secondary button13.53:1AAA
Muted text7.92:1AAA
Accent6.69:1AA
Destructive6.24:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.51:1AAA
Primary button7.43:1AAA
Secondary button8.40:1AAA
Muted text7.98:1AAA
Accent8.11:1AAA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 113.387);
  --foreground: oklch(0.154 0.027 115.037);
  --muted: oklch(0.935 0.032 113.939);
  --muted-foreground: oklch(0.39 0.011 113.833);
  --popover: oklch(0.996 0.004 113.387);
  --popover-foreground: oklch(0.154 0.027 115.037);
  --card: oklch(0.992 0.009 113.468);
  --card-foreground: oklch(0.133 0.023 114.447);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.695 0.14 117.577);
  --primary-foreground: oklch(0.148 0.02 114.509);
  --secondary: oklch(0.945 0.008 113.457);
  --secondary-foreground: oklch(0.251 0.016 114.466);
  --accent: oklch(0.897 0.024 113.809);
  --accent-foreground: oklch(0.4 0.043 115.31);
  --destructive: oklch(0.463 0.175 31.363);
  --destructive-foreground: oklch(0.932 0.033 28.154);
  --ring: oklch(0.695 0.14 117.577);
  --chart-1: oklch(0.695 0.14 117.577);
  --chart-2: oklch(0.945 0.008 113.457);
  --chart-3: oklch(0.897 0.024 113.809);
  --chart-4: oklch(0.966 0.005 113.398);
  --chart-5: oklch(0.704 0.145 117.752);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.014 114.232);
  --foreground: oklch(0.983 0.008 113.448);
  --muted: oklch(0.277 0.04 116.09);
  --muted-foreground: oklch(0.805 0.009 113.52);
  --popover: oklch(0.103 0.014 114.232);
  --popover-foreground: oklch(0.983 0.008 113.448);
  --card: oklch(0.13 0.018 114.232);
  --card-foreground: oklch(0.989 0.005 113.4);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.695 0.14 117.577);
  --primary-foreground: oklch(0.148 0.02 114.509);
  --secondary: oklch(0.229 0.003 113.567);
  --secondary-foreground: oklch(0.778 0.006 113.456);
  --accent: oklch(0.301 0.012 114.062);
  --accent-foreground: oklch(0.832 0.013 113.596);
  --destructive: oklch(0.631 0.239 31.174);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.695 0.14 117.577);
  --chart-1: oklch(0.695 0.14 117.577);
  --chart-2: oklch(0.229 0.003 113.567);
  --chart-3: oklch(0.301 0.012 114.062);
  --chart-4: oklch(0.262 0.004 113.586);
  --chart-5: oklch(0.704 0.145 117.752);
}