Setback for shadcn/ui

Setback is a shadcn/ui theme built around a green primary color (#bbd770) with violet accents (#8b70d7). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#bbd770) on a neutral background (#060802).

Color palette

TokenLightDark
Background
#ffffffwhite
#060802black
Foreground
#0d1103black
#fbfbf8snow
Card
#ffffffwhite
#060802black
Card foreground
#0d1103black
#fbfbf8snow
Popover
#ffffffwhite
#060802black
Popover foreground
#0d1103black
#fbfbf8snow
Primary
#bbd770darkkhaki
#bbd770darkkhaki
Primary foreground
#0d1004black
#0d1004black
Secondary
#8b70d7mediumpurple
#8b70d7mediumpurple
Secondary foreground
#000000black
#000000black
Muted
#e2dfeclavender
#161320black
Muted foreground
#464153darkslategray
#b1acbedarkgray
Accent
#8b70d7mediumpurple
#8b70d7mediumpurple
Accent foreground
#000000black
#000000black
Destructive
#721f09maroon
#f05c33tomato
Destructive foreground
#f9c2b3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bbd770darkkhaki
#bbd770darkkhaki

Contrast

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

Light mode
Text on background19.11:1AAA
Text on card19.11:1AAA
Primary button11.92:1AAA
Secondary button5.38:1AA
Muted text7.45:1AAA
Accent5.38:1AA
Destructive6.98:1AA
Dark mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button11.92:1AAA
Secondary button5.38:1AA
Muted text8.29:1AAA
Accent5.38:1AA
Destructive6.26:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.17 0.03 120.521);
  --muted: oklch(0.909 0.019 298.202);
  --muted-foreground: oklch(0.387 0.03 297.181);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.17 0.03 120.521);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.17 0.03 120.521);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.836 0.133 121.627);
  --primary-foreground: oklch(0.165 0.025 120.232);
  --secondary: oklch(0.617 0.152 293.754);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.617 0.152 293.754);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.371 0.12 35.287);
  --destructive-foreground: oklch(0.86 0.067 35.991);
  --ring: oklch(0.836 0.133 121.627);
  --chart-1: oklch(0.836 0.133 121.627);
  --chart-2: oklch(0.617 0.152 293.754);
  --chart-3: oklch(0.617 0.152 293.754);
  --chart-4: oklch(0.649 0.139 294.492);
  --chart-5: oklch(0.842 0.139 121.769);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.018 118.647);
  --foreground: oklch(0.988 0.004 118.641);
  --muted: oklch(0.197 0.028 296.001);
  --muted-foreground: oklch(0.754 0.026 297.971);
  --popover: oklch(0.128 0.018 118.647);
  --popover-foreground: oklch(0.988 0.004 118.641);
  --card: oklch(0.128 0.018 118.647);
  --card-foreground: oklch(0.988 0.004 118.641);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.836 0.133 121.627);
  --primary-foreground: oklch(0.165 0.025 120.232);
  --secondary: oklch(0.617 0.152 293.754);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.617 0.152 293.754);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.662 0.19 36.015);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.836 0.133 121.627);
  --chart-1: oklch(0.836 0.133 121.627);
  --chart-2: oklch(0.617 0.152 293.754);
  --chart-3: oklch(0.617 0.152 293.754);
  --chart-4: oklch(0.649 0.139 294.492);
  --chart-5: oklch(0.842 0.139 121.769);
}