Cornflakes for shadcn/ui

Cornflakes is a shadcn/ui theme built around a deep red primary color (#3b1612) with deep cyan accents (#12363b). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep red primary (#3b1612) on a red-tinted background (#100604).

Color palette

TokenLightDark
Background
#ffffffwhite
#100604black
Foreground
#040101black
#ffffffwhite
Card
#ffffffwhite
#100604black
Card foreground
#040101black
#ffffffwhite
Popover
#ffffffwhite
#100604black
Popover foreground
#040101black
#ffffffwhite
Primary
#3b1612black
#3b1612black
Primary foreground
#e1a49dtan
#e1a49dtan
Secondary
#12363bdarkslategray
#12363bdarkslategray
Secondary foreground
#9ddae1lightblue
#9ddae1lightblue
Muted
#d7dfe0gainsboro
#1f2728darkslategray
Muted foreground
#5c6566dimgray
#99a2a3darkgray
Accent
#12363bdarkslategray
#12363bdarkslategray
Accent foreground
#9ddae1lightblue
#9ddae1lightblue
Destructive
#832c07saddlebrown
#ed500corangered
Destructive foreground
#fcd2c0peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3b1612black
#3b1612black

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.79:1AAA
Primary button7.65:1AAA
Secondary button8.34:1AAA
Muted text4.42:1AA Large
Accent8.34:1AAA
Destructive6.49:1AA
Dark mode
Text on background20.03:1AAA
Text on card20.03:1AAA
Primary button7.65:1AAA
Secondary button8.34:1AAA
Muted text5.81:1AA
Accent8.34:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.085 0.012 29.927);
  --muted: oklch(0.898 0.009 204.914);
  --muted-foreground: oklch(0.499 0.011 204.838);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.085 0.012 29.927);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.085 0.012 29.927);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.255 0.059 28.318);
  --primary-foreground: oklch(0.775 0.073 26.038);
  --secondary: oklch(0.31 0.042 205.294);
  --secondary-foreground: oklch(0.85 0.062 204.687);
  --accent: oklch(0.31 0.042 205.294);
  --accent-foreground: oklch(0.85 0.062 204.687);
  --destructive: oklch(0.418 0.127 39.511);
  --destructive-foreground: oklch(0.895 0.053 44.48);
  --ring: oklch(0.255 0.059 28.318);
  --chart-1: oklch(0.255 0.059 28.318);
  --chart-2: oklch(0.31 0.042 205.294);
  --chart-3: oklch(0.31 0.042 205.294);
  --chart-4: oklch(0.349 0.048 205.383);
  --chart-5: oklch(0.255 0.062 28.553);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.021 29.618);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.267 0.012 204.729);
  --muted-foreground: oklch(0.705 0.01 204.886);
  --popover: oklch(0.136 0.021 29.618);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.136 0.021 29.618);
  --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.255 0.059 28.318);
  --primary-foreground: oklch(0.775 0.073 26.038);
  --secondary: oklch(0.31 0.042 205.294);
  --secondary-foreground: oklch(0.85 0.062 204.687);
  --accent: oklch(0.31 0.042 205.294);
  --accent-foreground: oklch(0.85 0.062 204.687);
  --destructive: oklch(0.642 0.204 38.389);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.255 0.059 28.318);
  --chart-1: oklch(0.255 0.059 28.318);
  --chart-2: oklch(0.31 0.042 205.294);
  --chart-3: oklch(0.31 0.042 205.294);
  --chart-4: oklch(0.349 0.048 205.383);
  --chart-5: oklch(0.255 0.062 28.553);
}