Shiny for shadcn/ui

Shiny is a shadcn/ui theme built around a deep green primary color (#0e391f) with muted light green accents (#e2e9e5). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#0e391f) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#041009black
#ffffffwhite
Card
#fcfcfcsnow
#020805black
Card foreground
#030c07black
#ffffffwhite
Popover
#fcfcfcsnow
#020805black
Popover foreground
#030c07black
#ffffffwhite
Primary
#0e391fdarkgreen
#0e391fdarkgreen
Primary foreground
#42d17bmediumseagreen
#42d17bmediumseagreen
Secondary
#e2e9e5gainsboro
#1e2421black
Secondary foreground
#43564bdarkslategray
#b4c0b9silver
Muted
#f1f4f2whitesmoke
#0b0e0cblack
Muted foreground
#5c605edimgray
#9fa3a0darkgray
Accent
#e2e9e5gainsboro
#1e2421black
Accent foreground
#43564bdarkslategray
#b4c0b9silver
Destructive
#a9230ffirebrick
#d32c12firebrick
Destructive foreground
#fdefecseashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e391fdarkgreen
#0e391fdarkgreen

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card19.39:1AAA
Primary button6.51:1AA
Secondary button6.36:1AA
Muted text5.74:1AA
Accent6.36:1AA
Destructive6.38:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.19:1AAA
Primary button6.51:1AA
Secondary button8.39:1AAA
Muted text7.58:1AAA
Accent8.39:1AAA
Destructive5.06:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.158 0.024 158.452);
  --muted: oklch(0.964 0.004 160.145);
  --muted-foreground: oklch(0.486 0.006 159.952);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.142 0.02 159.857);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.142 0.02 159.857);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.309 0.067 153.278);
  --primary-foreground: oklch(0.765 0.172 152.786);
  --secondary: oklch(0.927 0.009 160.014);
  --secondary-foreground: oklch(0.434 0.031 158.452);
  --accent: oklch(0.927 0.009 160.014);
  --accent-foreground: oklch(0.434 0.031 158.452);
  --destructive: oklch(0.479 0.172 31.567);
  --destructive-foreground: oklch(0.962 0.016 28.026);
  --ring: oklch(0.309 0.067 153.278);
  --chart-1: oklch(0.309 0.067 153.278);
  --chart-2: oklch(0.927 0.009 160.014);
  --chart-3: oklch(0.927 0.009 160.014);
  --chart-4: oklch(0.949 0.006 160.084);
  --chart-5: oklch(0.312 0.069 152.962);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.014 160.11);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.161 0.006 159.386);
  --muted-foreground: oklch(0.71 0.005 160.059);
  --popover: oklch(0.124 0.018 160.11);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.018 160.11);
  --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.309 0.067 153.278);
  --primary-foreground: oklch(0.765 0.172 152.786);
  --secondary: oklch(0.254 0.011 159.21);
  --secondary-foreground: oklch(0.797 0.017 159.733);
  --accent: oklch(0.254 0.011 159.21);
  --accent-foreground: oklch(0.797 0.017 159.733);
  --destructive: oklch(0.564 0.205 31.508);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.309 0.067 153.278);
  --chart-1: oklch(0.309 0.067 153.278);
  --chart-2: oklch(0.254 0.011 159.21);
  --chart-3: oklch(0.254 0.011 159.21);
  --chart-4: oklch(0.286 0.013 159.149);
  --chart-5: oklch(0.312 0.069 152.962);
}