Rewarding for shadcn/ui

Rewarding is a shadcn/ui theme built around a near-black primary color (#05040b) with near-black accents (#0a0b04). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the near-black primary (#05040b) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#020203black
Foreground
#050411black
#f9f9fbghostwhite
Card
#f7f7fdghostwhite
#040307black
Card foreground
#04030cblack
#fcfcfdwhite
Popover
#f7f7fdghostwhite
#040307black
Popover foreground
#04030cblack
#fcfcfdwhite
Primary
#05040bblack
#05040bblack
Primary foreground
#c4c1e7lightsteelblue
#c4c1e7lightsteelblue
Secondary
#0a0b04black
#0a0b04black
Secondary foreground
#969e3dyellowgreen
#969e3dyellowgreen
Muted
#e2e2dfgainsboro
#20201dblack
Muted foreground
#54554adarkolivegreen
#b5b5aadarkgray
Accent
#0a0b04black
#0a0b04black
Accent foreground
#969e3dyellowgreen
#969e3dyellowgreen
Destructive
#b8270afirebrick
#f33f1borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#05040bblack
#05040bblack

Contrast

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

Light mode
Text on background19.68:1AAA
Text on card19.19:1AAA
Primary button11.77:1AAA
Secondary button6.82:1AA
Muted text5.82:1AA
Accent6.82:1AA
Destructive6.30:1AA
Dark mode
Text on background19.75:1AAA
Text on card20.03:1AAA
Primary button11.77:1AAA
Secondary button6.82:1AA
Muted text7.89:1AAA
Accent6.82:1AA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 290.166);
  --foreground: oklch(0.118 0.032 285.888);
  --muted: oklch(0.912 0.004 110.331);
  --muted-foreground: oklch(0.444 0.018 110.981);
  --popover: oklch(0.977 0.009 290.082);
  --popover-foreground: oklch(0.107 0.027 286.527);
  --card: oklch(0.977 0.009 290.082);
  --card-foreground: oklch(0.107 0.027 286.527);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.115 0.019 288.11);
  --primary-foreground: oklch(0.825 0.053 288.995);
  --secondary: oklch(0.146 0.016 111.601);
  --secondary-foreground: oklch(0.673 0.12 113.635);
  --accent: oklch(0.146 0.016 111.601);
  --accent-foreground: oklch(0.673 0.12 113.635);
  --destructive: oklch(0.51 0.185 32.432);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.115 0.019 288.11);
  --chart-1: oklch(0.115 0.019 288.11);
  --chart-2: oklch(0.146 0.016 111.601);
  --chart-3: oklch(0.146 0.016 111.601);
  --chart-4: oklch(0.195 0.025 112.574);
  --chart-5: oklch(0.114 0.02 287.889);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.01 288.75);
  --foreground: oklch(0.983 0.002 290.203);
  --muted: oklch(0.243 0.006 110.683);
  --muted-foreground: oklch(0.771 0.015 110.62);
  --popover: oklch(0.105 0.012 288.75);
  --popover-foreground: oklch(0.991 0.001 290.225);
  --card: oklch(0.105 0.012 288.75);
  --card-foreground: oklch(0.991 0.001 290.225);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.115 0.019 288.11);
  --primary-foreground: oklch(0.825 0.053 288.995);
  --secondary: oklch(0.146 0.016 111.601);
  --secondary-foreground: oklch(0.673 0.12 113.635);
  --accent: oklch(0.146 0.016 111.601);
  --accent-foreground: oklch(0.673 0.12 113.635);
  --destructive: oklch(0.636 0.221 32.825);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.115 0.019 288.11);
  --chart-1: oklch(0.115 0.019 288.11);
  --chart-2: oklch(0.146 0.016 111.601);
  --chart-3: oklch(0.146 0.016 111.601);
  --chart-4: oklch(0.195 0.025 112.574);
  --chart-5: oklch(0.114 0.02 287.889);
}