Earnings for shadcn/ui

Earnings is a shadcn/ui theme built around an indigo primary color (#9483d8) with green accents (#c7d883). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the indigo primary (#9483d8) on an indigo-tinted background (#07050f).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#07050fblack
Foreground
#000000black
#fcfcfdwhite
Card
#f5f3fcghostwhite
#090613black
Card foreground
#000000black
#ffffffwhite
Popover
#f8f7fdghostwhite
#07050fblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#9483d8mediumpurple
#9483d8mediumpurple
Primary foreground
#0e0a1fblack
#0e0a1fblack
Secondary
#c7d883tan
#c7d883tan
Secondary foreground
#1b1f0ablack
#1b1f0ablack
Muted
#e2e6d1gainsboro
#2a2e19darkslategray
Muted foreground
#41413edarkslategray
#c0c1besilver
Accent
#c7d883tan
#c7d883tan
Accent foreground
#1b1f0ablack
#1b1f0ablack
Destructive
#c14406firebrick
#f86f2atomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9483d8mediumpurple
#9483d8mediumpurple

Contrast

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

Light mode
Text on background19.72:1AAA
Text on card19.11:1AAA
Primary button6.00:1AA
Secondary button10.87:1AAA
Muted text8.00:1AAA
Accent10.87:1AAA
Destructive5.11:1AA
Dark mode
Text on background19.72:1AAA
Text on card20.02:1AAA
Primary button6.00:1AA
Secondary button10.87:1AAA
Muted text7.72:1AAA
Accent10.87:1AAA
Destructive7.31:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.008 295.437);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.915 0.028 116.138);
  --muted-foreground: oklch(0.374 0.004 115.79);
  --popover: oklch(0.979 0.008 295.437);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.968 0.011 295.364);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.66 0.124 291.808);
  --primary-foreground: oklch(0.163 0.043 289.941);
  --secondary: oklch(0.85 0.111 118.055);
  --secondary-foreground: oklch(0.229 0.037 118.781);
  --accent: oklch(0.85 0.111 118.055);
  --accent-foreground: oklch(0.229 0.037 118.781);
  --destructive: oklch(0.555 0.171 40.267);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.66 0.124 291.808);
  --chart-1: oklch(0.66 0.124 291.808);
  --chart-2: oklch(0.85 0.111 118.055);
  --chart-3: oklch(0.85 0.111 118.055);
  --chart-4: oklch(0.863 0.101 117.779);
  --chart-5: oklch(0.655 0.132 291.531);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.025 293.789);
  --foreground: oklch(0.991 0.001 295.557);
  --muted: oklch(0.291 0.035 117.884);
  --muted-foreground: oklch(0.808 0.004 115.659);
  --popover: oklch(0.126 0.025 293.789);
  --popover-foreground: oklch(0.991 0.001 295.557);
  --card: oklch(0.137 0.029 292.622);
  --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.66 0.124 291.808);
  --primary-foreground: oklch(0.163 0.043 289.941);
  --secondary: oklch(0.85 0.111 118.055);
  --secondary-foreground: oklch(0.229 0.037 118.781);
  --accent: oklch(0.85 0.111 118.055);
  --accent-foreground: oklch(0.229 0.037 118.781);
  --destructive: oklch(0.699 0.185 43.513);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.66 0.124 291.808);
  --chart-1: oklch(0.66 0.124 291.808);
  --chart-2: oklch(0.85 0.111 118.055);
  --chart-3: oklch(0.85 0.111 118.055);
  --chart-4: oklch(0.863 0.101 117.779);
  --chart-5: oklch(0.655 0.132 291.531);
}