Realm for shadcn/ui

Realm is a shadcn/ui theme built around a blue primary color (#2e50d6) with green accents (#50d62e). The light mode uses a neutral background (#f7f8fd). Dark mode keeps the blue primary (#2e50d6) on a blue-tinted background (#05070f).

Color palette

TokenLightDark
Background
#f7f8fdghostwhite
#05070fblack
Foreground
#040611black
#fcfcfdwhite
Card
#f2f4fcaliceblue
#060913black
Card foreground
#03050cblack
#ffffffwhite
Popover
#f7f8fdghostwhite
#05070fblack
Popover foreground
#040611black
#fcfcfdwhite
Primary
#2e50d6royalblue
#2e50d6royalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d62e50crimson
#d62e50crimson
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e5d7dagainsboro
#281a1dblack
Muted foreground
#615658dimgray
#a99ea0darkgray
Accent
#50d62elimegreen
#50d62elimegreen
Accent foreground
#112f09black
#112f09black
Destructive
#d24614chocolate
#ea551fchocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e50d6royalblue
#2e50d6royalblue

Contrast

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

Light mode
Text on background19.02:1AAA
Text on card18.60:1AAA
Primary button6.50:1AA
Secondary button4.81:1AA
Muted text5.04:1AA
Accent7.65:1AAA
Destructive4.53:1AA
Dark mode
Text on background19.60:1AAA
Text on card19.87:1AAA
Primary button6.50:1AA
Secondary button4.81:1AA
Muted text6.42:1AA
Accent7.65:1AAA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 274.944);
  --foreground: oklch(0.127 0.025 267.795);
  --muted: oklch(0.891 0.016 3.66);
  --muted-foreground: oklch(0.466 0.015 4.031);
  --popover: oklch(0.979 0.007 274.944);
  --popover-foreground: oklch(0.127 0.025 267.795);
  --card: oklch(0.969 0.011 274.896);
  --card-foreground: oklch(0.115 0.021 266.987);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.495 0.208 267.136);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.577 0.201 15.735);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.772 0.23 140.335);
  --accent-foreground: oklch(0.272 0.072 139.9);
  --destructive: oklch(0.587 0.184 37.535);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.495 0.208 267.136);
  --chart-1: oklch(0.495 0.208 267.136);
  --chart-2: oklch(0.577 0.201 15.735);
  --chart-3: oklch(0.772 0.23 140.335);
  --chart-4: oklch(0.595 0.193 14.06);
  --chart-5: oklch(0.493 0.217 266.757);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.131 0.019 269.874);
  --foreground: oklch(0.991 0.002 275.014);
  --muted: oklch(0.237 0.023 5.7);
  --muted-foreground: oklch(0.708 0.013 3.685);
  --popover: oklch(0.131 0.019 269.874);
  --popover-foreground: oklch(0.991 0.002 275.014);
  --card: oklch(0.142 0.023 270.817);
  --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.495 0.208 267.136);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.577 0.201 15.735);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.772 0.23 140.335);
  --accent-foreground: oklch(0.272 0.072 139.9);
  --destructive: oklch(0.644 0.194 38.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.495 0.208 267.136);
  --chart-1: oklch(0.495 0.208 267.136);
  --chart-2: oklch(0.577 0.201 15.735);
  --chart-3: oklch(0.772 0.23 140.335);
  --chart-4: oklch(0.595 0.193 14.06);
  --chart-5: oklch(0.493 0.217 266.757);
}