Margarine for shadcn/ui

Margarine is a shadcn/ui theme built around a near-white primary color (#fef8f6) with near-white accents (#fefcf6). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#fef8f6) on an orange-tinted background (#0b0604).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0604black
Foreground
#0f0805black
#fdfcfcsnow
Card
#fcfcfcsnow
#0f0806black
Card foreground
#0b0604black
#ffffffwhite
Popover
#ffffffwhite
#0b0604black
Popover foreground
#0f0805black
#fdfcfcsnow
Primary
#fef8f6snow
#fef8f6snow
Primary foreground
#551d07maroon
#551d07maroon
Secondary
#fef6f7snow
#fef6f7snow
Secondary foreground
#b30f32firebrick
#b30f32firebrick
Muted
#ebdbdfgainsboro
#241418black
Muted foreground
#504447darkslategray
#bbafb2darkgray
Accent
#fefcf6snow
#fefcf6snow
Accent foreground
#554407saddlebrown
#554407saddlebrown
Destructive
#691802maroon
#fa4a19orangered
Destructive foreground
#fdb4a0lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fef8f6snow
#fef8f6snow

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.71:1AAA
Primary button12.76:1AAA
Secondary button6.49:1AA
Muted text6.97:1AA
Accent9.25:1AAA
Destructive7.03:1AAA
Dark mode
Text on background19.65:1AAA
Text on card19.84:1AAA
Primary button12.76:1AAA
Secondary button6.49:1AA
Muted text8.30:1AAA
Accent9.25:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.144 0.016 47.681);
  --muted: oklch(0.906 0.017 2.584);
  --muted-foreground: oklch(0.4 0.017 3.19);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.144 0.016 47.681);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.13 0.013 49.688);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.983 0.007 43.061);
  --primary-foreground: oklch(0.314 0.089 39.923);
  --secondary: oklch(0.979 0.01 2.336);
  --secondary-foreground: oklch(0.491 0.19 19.009);
  --accent: oklch(0.992 0.009 93.964);
  --accent-foreground: oklch(0.393 0.077 91.678);
  --destructive: oklch(0.346 0.118 35.328);
  --destructive-foreground: oklch(0.834 0.09 36.079);
  --ring: oklch(0.983 0.007 43.061);
  --chart-1: oklch(0.983 0.007 43.061);
  --chart-2: oklch(0.979 0.01 2.336);
  --chart-3: oklch(0.992 0.009 93.964);
  --chart-4: oklch(1.01 0.005 181.937);
  --chart-5: oklch(0.983 0.008 43.059);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.011 48.699);
  --foreground: oklch(0.992 0.001 43.12);
  --muted: oklch(0.215 0.025 5.234);
  --muted-foreground: oklch(0.765 0.014 2.566);
  --popover: oklch(0.13 0.011 48.699);
  --popover-foreground: oklch(0.992 0.001 43.12);
  --card: oklch(0.144 0.013 46.837);
  --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.983 0.007 43.061);
  --primary-foreground: oklch(0.314 0.089 39.923);
  --secondary: oklch(0.979 0.01 2.336);
  --secondary-foreground: oklch(0.491 0.19 19.009);
  --accent: oklch(0.992 0.009 93.964);
  --accent-foreground: oklch(0.393 0.077 91.678);
  --destructive: oklch(0.658 0.22 34.869);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.983 0.007 43.061);
  --chart-1: oklch(0.983 0.007 43.061);
  --chart-2: oklch(0.979 0.01 2.336);
  --chart-3: oklch(0.992 0.009 93.964);
  --chart-4: oklch(1.01 0.005 181.937);
  --chart-5: oklch(0.983 0.008 43.059);
}