Formal for shadcn/ui

Formal is a shadcn/ui theme built around a vivid cyan primary color (#4bc6fb) with vivid orange accents (#fb804b). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the vivid cyan primary (#4bc6fb) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#fbfdfewhite
#010304black
Foreground
#030d11black
#fcfdfdwhite
Card
#f7fbfdghostwhite
#020608black
Card foreground
#030a0dblack
#ffffffwhite
Popover
#f7fbfdghostwhite
#020608black
Popover foreground
#030a0dblack
#ffffffwhite
Primary
#4bc6fbmediumturquoise
#4bc6fbmediumturquoise
Primary foreground
#000e14black
#000e14black
Secondary
#fb804bcoral
#fb804bcoral
Secondary foreground
#140600black
#140600black
Muted
#e6d3cblightgrey
#342119black
Muted foreground
#51443edarkslategray
#c1b4aesilver
Accent
#fb804bcoral
#fb804bcoral
Accent foreground
#140600black
#140600black
Destructive
#a23a07saddlebrown
#f66c28tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4bc6fbmediumturquoise
#4bc6fbmediumturquoise

Contrast

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

Light mode
Text on background19.25:1AAA
Text on card19.16:1AAA
Primary button10.08:1AAA
Secondary button7.86:1AAA
Muted text6.49:1AA
Accent7.86:1AAA
Destructive6.68:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.31:1AAA
Primary button10.08:1AAA
Secondary button7.86:1AAA
Muted text7.57:1AAA
Accent7.86:1AAA
Destructive7.11:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 225.013);
  --foreground: oklch(0.15 0.019 223.26);
  --muted: oklch(0.881 0.024 44.727);
  --muted-foreground: oklch(0.397 0.02 44.54);
  --popover: oklch(0.986 0.005 225.044);
  --popover-foreground: oklch(0.135 0.016 219.86);
  --card: oklch(0.986 0.005 225.044);
  --card-foreground: oklch(0.135 0.016 219.86);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.781 0.131 230.364);
  --primary-foreground: oklch(0.153 0.027 222.491);
  --secondary: oklch(0.731 0.165 42.7);
  --secondary-foreground: oklch(0.144 0.033 56.976);
  --accent: oklch(0.731 0.165 42.7);
  --accent-foreground: oklch(0.144 0.033 56.976);
  --destructive: oklch(0.49 0.147 40.968);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.781 0.131 230.364);
  --chart-1: oklch(0.781 0.131 230.364);
  --chart-2: oklch(0.731 0.165 42.7);
  --chart-3: oklch(0.731 0.165 42.7);
  --chart-4: oklch(0.75 0.151 43.177);
  --chart-5: oklch(0.784 0.134 230.628);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.093 0.009 219.398);
  --foreground: oklch(0.993 0.001 224.989);
  --muted: oklch(0.268 0.033 44.064);
  --muted-foreground: oklch(0.779 0.017 44.772);
  --popover: oklch(0.118 0.012 219.398);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.118 0.012 219.398);
  --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.781 0.131 230.364);
  --primary-foreground: oklch(0.153 0.027 222.491);
  --secondary: oklch(0.731 0.165 42.7);
  --secondary-foreground: oklch(0.144 0.033 56.976);
  --accent: oklch(0.731 0.165 42.7);
  --accent-foreground: oklch(0.144 0.033 56.976);
  --destructive: oklch(0.692 0.186 43.323);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.781 0.131 230.364);
  --chart-1: oklch(0.781 0.131 230.364);
  --chart-2: oklch(0.731 0.165 42.7);
  --chart-3: oklch(0.731 0.165 42.7);
  --chart-4: oklch(0.75 0.151 43.177);
  --chart-5: oklch(0.784 0.134 230.628);
}