Moral for shadcn/ui

Moral is a shadcn/ui theme built around a vivid teal primary color (#81fddc) with muted light teal accents (#d0dcd9). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the vivid teal primary (#81fddc) on a neutral background (#030706).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#030706black
Foreground
#010403black
#fcfdfdwhite
Card
#f8fcfbmintcream
#050b09black
Card foreground
#000000black
#ffffffwhite
Popover
#f8fcfbmintcream
#050b09black
Popover foreground
#000000black
#ffffffwhite
Primary
#81fddcaquamarine
#81fddcaquamarine
Primary foreground
#014b38darkslategray
#014b38darkslategray
Secondary
#d0dcd9lightgrey
#2b2c2cdarkslategray
Secondary foreground
#354641darkslategray
#c4c5c5silver
Muted
#d8eee8gainsboro
#112721black
Muted foreground
#606665dimgray
#999f9ddarkgray
Accent
#d0dcd9lightgrey
#2b2c2cdarkslategray
Accent foreground
#354641darkslategray
#c4c5c5silver
Destructive
#a11e12firebrick
#e73323crimson
Destructive foreground
#fceae8linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#81fddcaquamarine
#81fddcaquamarine

Contrast

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

Light mode
Text on background20.23:1AAA
Text on card20.27:1AAA
Primary button8.25:1AAA
Secondary button7.09:1AAA
Muted text4.83:1AA
Accent7.09:1AAA
Destructive6.69:1AA
Dark mode
Text on background19.86:1AAA
Text on card19.88:1AAA
Primary button8.25:1AAA
Secondary button8.11:1AAA
Muted text5.82:1AA
Accent8.11:1AAA
Destructive4.30:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 178.725);
  --foreground: oklch(0.1 0.014 178.902);
  --muted: oklch(0.931 0.025 177.994);
  --muted-foreground: oklch(0.506 0.008 178.335);
  --popover: oklch(0.987 0.004 178.664);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.004 178.664);
  --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.914 0.122 173.864);
  --primary-foreground: oklch(0.368 0.074 167.964);
  --secondary: oklch(0.885 0.013 178.357);
  --secondary-foreground: oklch(0.377 0.023 176.876);
  --accent: oklch(0.885 0.013 178.357);
  --accent-foreground: oklch(0.377 0.023 176.876);
  --destructive: oklch(0.46 0.168 29.97);
  --destructive-foreground: oklch(0.951 0.021 23.802);
  --ring: oklch(0.914 0.122 173.864);
  --chart-1: oklch(0.914 0.122 173.864);
  --chart-2: oklch(0.885 0.013 178.357);
  --chart-3: oklch(0.885 0.013 178.357);
  --chart-4: oklch(0.907 0.011 178.448);
  --chart-5: oklch(0.918 0.125 173.717);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.01 178.855);
  --foreground: oklch(0.994 0.002 178.726);
  --muted: oklch(0.253 0.031 174.412);
  --muted-foreground: oklch(0.696 0.007 178.483);
  --popover: oklch(0.139 0.012 178.809);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.012 178.809);
  --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.914 0.122 173.864);
  --primary-foreground: oklch(0.368 0.074 167.964);
  --secondary: oklch(0.291 0.001 178.654);
  --secondary-foreground: oklch(0.822 0.001 178.736);
  --accent: oklch(0.291 0.001 178.654);
  --accent-foreground: oklch(0.822 0.001 178.736);
  --destructive: oklch(0.604 0.217 29.885);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.914 0.122 173.864);
  --chart-1: oklch(0.914 0.122 173.864);
  --chart-2: oklch(0.291 0.001 178.654);
  --chart-3: oklch(0.291 0.001 178.654);
  --chart-4: oklch(0.322 0.002 178.649);
  --chart-5: oklch(0.918 0.125 173.717);
}