Carotene for shadcn/ui

Carotene is a shadcn/ui theme built around a teal primary color (#3c8080) with yellow accents (#80803c). The light mode uses a neutral background (#fbfdfd). Dark mode keeps the teal primary (#3c8080) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdfdwhite
#000000black
Foreground
#041111black
#fcfdfdwhite
Card
#f8fcfcmintcream
#030303black
Card foreground
#030c0cblack
#ffffffwhite
Popover
#f8fcfcmintcream
#030303black
Popover foreground
#030c0cblack
#ffffffwhite
Primary
#3c8080seagreen
#3c8080seagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#803c80rebeccapurple
#803c80rebeccapurple
Secondary foreground
#faf5faghostwhite
#faf5faghostwhite
Muted
#e1dbe1gainsboro
#241e24black
Muted foreground
#4d424ddarkslategray
#bdb2bdsilver
Accent
#80803colivedrab
#80803colivedrab
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c71205firebrick
#f92e1forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3c8080seagreen
#3c8080seagreen

Contrast

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

Light mode
Text on background18.88:1AAA
Text on card19.11:1AAA
Primary button4.55:1AA
Secondary button6.74:1AA
Muted text6.98:1AA
Accent4.12:1AA Large
Destructive5.97:1AA
Dark mode
Text on background20.60:1AAA
Text on card20.67:1AAA
Primary button4.55:1AA
Secondary button6.74:1AA
Muted text7.97:1AAA
Accent4.12:1AA Large
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 197.125);
  --foreground: oklch(0.163 0.02 195.362);
  --muted: oklch(0.897 0.011 325.672);
  --muted-foreground: oklch(0.394 0.024 326.025);
  --popover: oklch(0.988 0.004 197.091);
  --popover-foreground: oklch(0.145 0.018 195.397);
  --card: oklch(0.988 0.004 197.091);
  --card-foreground: oklch(0.145 0.018 195.397);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.557 0.069 195.363);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.472 0.13 327.392);
  --secondary-foreground: oklch(0.975 0.009 325.648);
  --accent: oklch(0.586 0.091 108.896);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.526 0.209 29.813);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.557 0.069 195.363);
  --chart-1: oklch(0.557 0.069 195.363);
  --chart-2: oklch(0.472 0.13 327.392);
  --chart-3: oklch(0.586 0.091 108.896);
  --chart-4: oklch(0.499 0.139 327.405);
  --chart-5: oklch(0.564 0.073 195.288);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 197.142);
  --muted: oklch(0.245 0.016 326.048);
  --muted-foreground: oklch(0.776 0.02 325.772);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.557 0.069 195.363);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.472 0.13 327.392);
  --secondary-foreground: oklch(0.975 0.009 325.648);
  --accent: oklch(0.586 0.091 108.896);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.634 0.237 29.562);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.557 0.069 195.363);
  --chart-1: oklch(0.557 0.069 195.363);
  --chart-2: oklch(0.472 0.13 327.392);
  --chart-3: oklch(0.586 0.091 108.896);
  --chart-4: oklch(0.499 0.139 327.405);
  --chart-5: oklch(0.564 0.073 195.288);
}