Cooking for shadcn/ui

Cooking is a shadcn/ui theme built around a violet primary color (#7952bc) with purple accents (#ae52bc). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#7952bc) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#ffffffwhite
#020104black
Foreground
#06030cblack
#fcfcfdwhite
Card
#ffffffwhite
#020104black
Card foreground
#06030cblack
#fcfcfdwhite
Popover
#ffffffwhite
#020104black
Popover foreground
#06030cblack
#fcfcfdwhite
Primary
#7952bcslateblue
#7952bcslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5260bcslateblue
#5260bcslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dcdde4gainsboro
#1b1c23black
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#ae52bcmediumorchid
#ae52bcmediumorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#8e2d10saddlebrown
#ea6a43tomato
Destructive foreground
#faded6antiquewhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7952bcslateblue
#7952bcslateblue

Contrast

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

Light mode
Text on background20.46:1AAA
Text on card20.46:1AAA
Primary button5.58:1AA
Secondary button5.55:1AA
Muted text6.89:1AA
Accent4.43:1AA Large
Destructive6.48:1AA
Dark mode
Text on background20.29:1AAA
Text on card20.29:1AAA
Primary button5.58:1AA
Secondary button5.55:1AA
Muted text8.58:1AAA
Accent4.43:1AA Large
Destructive6.63:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.113 0.027 303.553);
  --muted: oklch(0.9 0.009 279.182);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.113 0.027 303.553);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.113 0.027 303.553);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.533 0.16 297.632);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.526 0.143 273.875);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.594 0.178 322.143);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.441 0.137 36.346);
  --destructive-foreground: oklch(0.922 0.033 37.617);
  --ring: oklch(0.533 0.16 297.632);
  --chart-1: oklch(0.533 0.16 297.632);
  --chart-2: oklch(0.526 0.143 273.875);
  --chart-3: oklch(0.594 0.178 322.143);
  --chart-4: oklch(0.557 0.133 274.676);
  --chart-5: oklch(0.529 0.17 297.137);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.017 303.768);
  --foreground: oklch(0.991 0.002 302.892);
  --muted: oklch(0.227 0.013 278.379);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.079 0.017 303.768);
  --popover-foreground: oklch(0.991 0.002 302.892);
  --card: oklch(0.079 0.017 303.768);
  --card-foreground: oklch(0.991 0.002 302.892);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.533 0.16 297.632);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.526 0.143 273.875);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.594 0.178 322.143);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.674 0.168 37.47);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.533 0.16 297.632);
  --chart-1: oklch(0.533 0.16 297.632);
  --chart-2: oklch(0.526 0.143 273.875);
  --chart-3: oklch(0.594 0.178 322.143);
  --chart-4: oklch(0.557 0.133 274.676);
  --chart-5: oklch(0.529 0.17 297.137);
}