Good-natured for shadcn/ui

Good-natured is a shadcn/ui theme built around a vivid blue primary color (#11328d) with vivid green accents (#328d11). The light mode uses a neutral background (#f8f9fb). Dark mode keeps the vivid blue primary (#11328d) on a neutral background (#020204).

Color palette

TokenLightDark
Background
#f8f9fbghostwhite
#020204black
Foreground
#020612black
#f5f6fawhitesmoke
Card
#f5f6fawhitesmoke
#030407black
Card foreground
#02050eblack
#f8f9fcghostwhite
Popover
#f8f9fbghostwhite
#020204black
Popover foreground
#020612black
#f5f6fawhitesmoke
Primary
#11328dmidnightblue
#11328dmidnightblue
Primary foreground
#d6e0falavender
#d6e0falavender
Secondary
#8d1132brown
#8d1132brown
Secondary foreground
#fad6e0mistyrose
#fad6e0mistyrose
Muted
#e6d6dagainsboro
#29191dblack
Muted foreground
#4a3a3fdarkslategray
#c5b5b9silver
Accent
#328d11forestgreen
#328d11forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cd410achocolate
#f6713ctomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#11328dmidnightblue
#11328dmidnightblue

Contrast

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

Light mode
Text on background19.25:1AAA
Text on card18.89:1AAA
Primary button8.51:1AAA
Secondary button6.98:1AA
Muted text7.59:1AAA
Accent4.25:1AA Large
Destructive4.83:1AA
Dark mode
Text on background19.20:1AAA
Text on card19.46:1AAA
Primary button8.51:1AAA
Secondary button6.98:1AA
Muted text8.53:1AAA
Accent4.25:1AA Large
Destructive7.32:1AAA

CSS variables

Paste this into your globals.css to use Good-natured in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.003 270.095);
  --foreground: oklch(0.126 0.03 260.069);
  --muted: oklch(0.889 0.019 359.392);
  --muted-foreground: oklch(0.368 0.023 0.531);
  --popover: oklch(0.983 0.003 270.095);
  --popover-foreground: oklch(0.126 0.03 260.069);
  --card: oklch(0.974 0.005 270.081);
  --card-foreground: oklch(0.114 0.025 258.641);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.361 0.155 264.383);
  --primary-foreground: oklch(0.907 0.037 269.736);
  --secondary: oklch(0.417 0.155 13.664);
  --secondary-foreground: oklch(0.909 0.042 0.056);
  --accent: oklch(0.566 0.173 139.577);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.571 0.185 37.496);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.361 0.155 264.383);
  --chart-1: oklch(0.361 0.155 264.383);
  --chart-2: oklch(0.417 0.155 13.664);
  --chart-3: oklch(0.566 0.173 139.577);
  --chart-4: oklch(0.446 0.166 13.909);
  --chart-5: oklch(0.36 0.16 264.236);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.009 264.956);
  --foreground: oklch(0.973 0.005 270.075);
  --muted: oklch(0.236 0.028 1.968);
  --muted-foreground: oklch(0.787 0.019 359.464);
  --popover: oklch(0.086 0.009 264.956);
  --popover-foreground: oklch(0.973 0.005 270.075);
  --card: oklch(0.108 0.011 264.956);
  --card-foreground: oklch(0.982 0.004 270.091);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.361 0.155 264.383);
  --primary-foreground: oklch(0.907 0.037 269.736);
  --secondary: oklch(0.417 0.155 13.664);
  --secondary-foreground: oklch(0.909 0.042 0.056);
  --accent: oklch(0.566 0.173 139.577);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.7 0.177 40.83);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.361 0.155 264.383);
  --chart-1: oklch(0.361 0.155 264.383);
  --chart-2: oklch(0.417 0.155 13.664);
  --chart-3: oklch(0.566 0.173 139.577);
  --chart-4: oklch(0.446 0.166 13.909);
  --chart-5: oklch(0.36 0.16 264.236);
}