Gaming for shadcn/ui

Gaming is a shadcn/ui theme built around a light green primary color (#e8f3ce) with neutral gray accents (#dcded9). The light mode uses a neutral background (#fdfefb). Dark mode keeps the light green primary (#e8f3ce) on a green-tinted background (#0c1005).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0c1005black
Foreground
#060802black
#ffffffwhite
Card
#fdfefbwhite
#0c1005black
Card foreground
#060802black
#ffffffwhite
Popover
#fdfefbwhite
#0c1005black
Popover foreground
#060802black
#ffffffwhite
Primary
#e8f3cebeige
#e8f3cebeige
Primary foreground
#192108black
#192108black
Secondary
#dcded9gainsboro
#161811black
Secondary foreground
#44473edarkslategray
#b3bba0darkgray
Muted
#f3f4f0whitesmoke
#0d0f0bblack
Muted foreground
#696e5edimgray
#9ca191darkgray
Accent
#dcded9gainsboro
#161811black
Accent foreground
#44473edarkslategray
#b3bba0darkgray
Destructive
#bd3314firebrick
#d03816firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e8f3cebeige
#e8f3cebeige

Contrast

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

Light mode
Text on background19.90:1AAA
Text on card19.90:1AAA
Primary button14.37:1AAA
Secondary button6.98:1AA
Muted text4.76:1AA
Accent6.98:1AA
Destructive5.75:1AA
Dark mode
Text on background19.27:1AAA
Text on card19.27:1AAA
Primary button14.37:1AAA
Secondary button8.99:1AAA
Muted text7.27:1AAA
Accent8.99:1AAA
Destructive4.94:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.005 120.117);
  --foreground: oklch(0.13 0.021 119.89);
  --muted: oklch(0.965 0.005 120.123);
  --muted-foreground: oklch(0.53 0.026 120.857);
  --popover: oklch(0.996 0.005 120.117);
  --popover-foreground: oklch(0.13 0.021 119.89);
  --card: oklch(0.996 0.005 120.117);
  --card-foreground: oklch(0.13 0.021 119.89);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.946 0.05 120.945);
  --primary-foreground: oklch(0.233 0.044 123.678);
  --secondary: oklch(0.897 0.007 120.168);
  --secondary-foreground: oklch(0.392 0.016 120.716);
  --accent: oklch(0.897 0.007 120.168);
  --accent-foreground: oklch(0.392 0.016 120.716);
  --destructive: oklch(0.53 0.18 33.576);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.946 0.05 120.945);
  --chart-1: oklch(0.946 0.05 120.945);
  --chart-2: oklch(0.897 0.007 120.168);
  --chart-3: oklch(0.897 0.007 120.168);
  --chart-4: oklch(0.92 0.005 120.137);
  --chart-5: oklch(0.948 0.053 120.987);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.163 0.023 121.468);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.164 0.007 120.816);
  --muted-foreground: oklch(0.701 0.024 120.615);
  --popover: oklch(0.163 0.023 121.468);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.163 0.023 121.468);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.946 0.05 120.945);
  --primary-foreground: oklch(0.233 0.044 123.678);
  --secondary: oklch(0.204 0.014 121.189);
  --secondary-foreground: oklch(0.779 0.039 120.898);
  --accent: oklch(0.204 0.014 121.189);
  --accent-foreground: oklch(0.779 0.039 120.898);
  --destructive: oklch(0.568 0.194 33.527);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.946 0.05 120.945);
  --chart-1: oklch(0.946 0.05 120.945);
  --chart-2: oklch(0.204 0.014 121.189);
  --chart-3: oklch(0.204 0.014 121.189);
  --chart-4: oklch(0.241 0.018 121.324);
  --chart-5: oklch(0.948 0.053 120.987);
}