Newsletter for shadcn/ui

Newsletter is a shadcn/ui theme built around a light green primary color (#d1f0ad) with light violet accents (#ccadf0). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#d1f0ad) on a green-tinted background (#0b1005).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b1005black
Foreground
#000000black
#fafbf9snow
Card
#ffffffwhite
#0b1005black
Card foreground
#000000black
#fafbf9snow
Popover
#ffffffwhite
#0b1005black
Popover foreground
#000000black
#fafbf9snow
Primary
#d1f0adpalegoldenrod
#d1f0adpalegoldenrod
Primary foreground
#385a11darkolivegreen
#385a11darkolivegreen
Secondary
#ccadf0plum
#ccadf0plum
Secondary foreground
#33115amidnightblue
#33115amidnightblue
Muted
#dedce0gainsboro
#211f23black
Muted foreground
#666468dimgray
#99979bdarkgray
Accent
#ccadf0plum
#ccadf0plum
Accent foreground
#33115amidnightblue
#33115amidnightblue
Destructive
#681103maroon
#f8391borangered
Destructive foreground
#fcada1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d1f0adpalegoldenrod
#d1f0adpalegoldenrod

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.35:1AA
Secondary button7.90:1AAA
Muted text4.28:1AA Large
Accent7.90:1AAA
Destructive6.97:1AA
Dark mode
Text on background18.58:1AAA
Text on card18.58:1AAA
Primary button6.35:1AA
Secondary button7.90:1AAA
Muted text5.65:1AA
Accent7.90:1AAA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.896 0.007 307.02);
  --muted-foreground: oklch(0.506 0.007 306.948);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.916 0.093 128.447);
  --primary-foreground: oklch(0.427 0.107 131.87);
  --secondary: oklch(0.798 0.098 305.588);
  --secondary-foreground: oklch(0.279 0.122 299.41);
  --accent: oklch(0.798 0.098 305.588);
  --accent-foreground: oklch(0.279 0.122 299.41);
  --destructive: oklch(0.336 0.122 32.018);
  --destructive-foreground: oklch(0.821 0.095 28.959);
  --ring: oklch(0.916 0.093 128.447);
  --chart-1: oklch(0.916 0.093 128.447);
  --chart-2: oklch(0.798 0.098 305.588);
  --chart-3: oklch(0.798 0.098 305.588);
  --chart-4: oklch(0.83 0.082 305.894);
  --chart-5: oklch(0.919 0.097 128.503);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.162 0.026 127.667);
  --foreground: oklch(0.987 0.003 127.151);
  --muted: oklch(0.243 0.009 306.646);
  --muted-foreground: oklch(0.679 0.006 306.998);
  --popover: oklch(0.162 0.026 127.667);
  --popover-foreground: oklch(0.987 0.003 127.151);
  --card: oklch(0.162 0.026 127.667);
  --card-foreground: oklch(0.987 0.003 127.151);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.916 0.093 128.447);
  --primary-foreground: oklch(0.427 0.107 131.87);
  --secondary: oklch(0.798 0.098 305.588);
  --secondary-foreground: oklch(0.279 0.122 299.41);
  --accent: oklch(0.798 0.098 305.588);
  --accent-foreground: oklch(0.279 0.122 299.41);
  --destructive: oklch(0.639 0.229 31.572);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.916 0.093 128.447);
  --chart-1: oklch(0.916 0.093 128.447);
  --chart-2: oklch(0.798 0.098 305.588);
  --chart-3: oklch(0.798 0.098 305.588);
  --chart-4: oklch(0.83 0.082 305.894);
  --chart-5: oklch(0.919 0.097 128.503);
}