Serene for shadcn/ui

Serene is a shadcn/ui theme built around a deep blue primary color (#23394d) with deep green accents (#394d23). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#23394d) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#ffffffwhite
#020303black
Foreground
#010304black
#fcfcfdwhite
Card
#fcfcfcsnow
#040507black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#040507black
Popover foreground
#000000black
#ffffffwhite
Primary
#23394ddarkslategray
#23394ddarkslategray
Primary foreground
#c0d2e2lightblue
#c0d2e2lightblue
Secondary
#4d2339darkslategray
#4d2339darkslategray
Secondary foreground
#e2c0d2thistle
#e2c0d2thistle
Muted
#dbd7d9gainsboro
#282426darkslategray
Muted foreground
#614855dimgray
#b79eabdarkgray
Accent
#394d23darkolivegreen
#394d23darkolivegreen
Accent foreground
#d2e2c0lightgrey
#d2e2c0lightgrey
Destructive
#601b06maroon
#f4693etomato
Destructive foreground
#f9b49flightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#23394ddarkslategray
#23394ddarkslategray

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.54:1AAA
Primary button7.70:1AAA
Secondary button7.85:1AAA
Muted text5.72:1AA
Accent6.82:1AA
Destructive7.26:1AAA
Dark mode
Text on background20.18:1AAA
Text on card20.39:1AAA
Primary button7.70:1AAA
Secondary button7.85:1AAA
Muted text6.17:1AA
Accent6.82:1AA
Destructive6.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.089 0.012 236.065);
  --muted: oklch(0.882 0.005 344.43);
  --muted-foreground: oklch(0.431 0.04 346.503);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.335 0.045 247.687);
  --primary-foreground: oklch(0.855 0.03 246.362);
  --secondary: oklch(0.323 0.069 349.404);
  --secondary-foreground: oklch(0.842 0.045 345.6);
  --accent: oklch(0.392 0.069 130.271);
  --accent-foreground: oklch(0.892 0.049 128.446);
  --destructive: oklch(0.332 0.105 36.405);
  --destructive-foreground: oklch(0.829 0.087 37.623);
  --ring: oklch(0.335 0.045 247.687);
  --chart-1: oklch(0.335 0.045 247.687);
  --chart-2: oklch(0.323 0.069 349.404);
  --chart-3: oklch(0.392 0.069 130.271);
  --chart-4: oklch(0.35 0.077 349.532);
  --chart-5: oklch(0.335 0.048 247.87);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.091 0.005 241.764);
  --foreground: oklch(0.992 0 245.972);
  --muted: oklch(0.267 0.007 344.918);
  --muted-foreground: oklch(0.726 0.035 345.465);
  --popover: oklch(0.114 0.007 241.764);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.114 0.007 241.764);
  --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.335 0.045 247.687);
  --primary-foreground: oklch(0.855 0.03 246.362);
  --secondary: oklch(0.323 0.069 349.404);
  --secondary-foreground: oklch(0.842 0.045 345.6);
  --accent: oklch(0.392 0.069 130.271);
  --accent-foreground: oklch(0.892 0.049 128.446);
  --destructive: oklch(0.686 0.181 37.322);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.335 0.045 247.687);
  --chart-1: oklch(0.335 0.045 247.687);
  --chart-2: oklch(0.323 0.069 349.404);
  --chart-3: oklch(0.392 0.069 130.271);
  --chart-4: oklch(0.35 0.077 349.532);
  --chart-5: oklch(0.335 0.048 247.87);
}