Sane for shadcn/ui

Sane is a shadcn/ui theme built around a light blue primary color (#e6ecf5) with light indigo accents (#e7e6f5). The light mode uses a neutral background (#f8fafc). Dark mode keeps the light blue primary (#e6ecf5) on a neutral background (#030508).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#030508black
Foreground
#000000black
#f6f7f9whitesmoke
Card
#f8fafcghostwhite
#030508black
Card foreground
#000000black
#f6f7f9whitesmoke
Popover
#f8fafcghostwhite
#030508black
Popover foreground
#000000black
#f6f7f9whitesmoke
Primary
#e6ecf5lavender
#e6ecf5lavender
Primary foreground
#314f77darkslateblue
#314f77darkslateblue
Secondary
#e6f4f5aliceblue
#e6f4f5aliceblue
Secondary foreground
#132d2fdarkslategray
#132d2fdarkslategray
Muted
#eff5f5whitesmoke
#0a0f10black
Muted foreground
#545959dimgray
#a6ababdarkgray
Accent
#e7e6f5lavender
#e7e6f5lavender
Accent foreground
#363177darkslateblue
#363177darkslateblue
Destructive
#c1300bfirebrick
#e7390dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e6ecf5lavender
#e6ecf5lavender

Contrast

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

Light mode
Text on background20.02:1AAA
Text on card20.02:1AAA
Primary button7.02:1AAA
Secondary button12.85:1AAA
Muted text6.45:1AA
Accent9.11:1AAA
Destructive5.70:1AA
Dark mode
Text on background19.06:1AAA
Text on card19.06:1AAA
Primary button7.02:1AAA
Secondary button12.85:1AAA
Muted text8.28:1AAA
Accent9.11:1AAA
Destructive4.19:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.003 254.972);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.966 0.006 202.149);
  --muted-foreground: oklch(0.46 0.006 202.073);
  --popover: oklch(0.983 0.003 254.972);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.003 254.972);
  --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.941 0.013 255.028);
  --primary-foreground: oklch(0.425 0.076 255.629);
  --secondary: oklch(0.956 0.015 202.052);
  --secondary-foreground: oklch(0.278 0.032 201.585);
  --accent: oklch(0.929 0.02 289.068);
  --accent-foreground: oklch(0.36 0.117 281.778);
  --destructive: oklch(0.533 0.187 33.732);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.941 0.013 255.028);
  --chart-1: oklch(0.941 0.013 255.028);
  --chart-2: oklch(0.956 0.015 202.052);
  --chart-3: oklch(0.929 0.02 289.068);
  --chart-4: oklch(0.975 0.009 202.122);
  --chart-5: oklch(0.941 0.014 255.033);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.011 247.875);
  --foreground: oklch(0.976 0.003 254.97);
  --muted: oklch(0.164 0.009 201.739);
  --muted-foreground: oklch(0.736 0.006 202.134);
  --popover: oklch(0.111 0.011 247.875);
  --popover-foreground: oklch(0.976 0.003 254.97);
  --card: oklch(0.111 0.011 247.875);
  --card-foreground: oklch(0.976 0.003 254.97);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.941 0.013 255.028);
  --primary-foreground: oklch(0.425 0.076 255.629);
  --secondary: oklch(0.956 0.015 202.052);
  --secondary-foreground: oklch(0.278 0.032 201.585);
  --accent: oklch(0.929 0.02 289.068);
  --accent-foreground: oklch(0.36 0.117 281.778);
  --destructive: oklch(0.61 0.216 33.574);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.941 0.013 255.028);
  --chart-1: oklch(0.941 0.013 255.028);
  --chart-2: oklch(0.956 0.015 202.052);
  --chart-3: oklch(0.929 0.02 289.068);
  --chart-4: oklch(0.975 0.009 202.122);
  --chart-5: oklch(0.941 0.014 255.033);
}