Online for shadcn/ui

Online is a shadcn/ui theme built around a vivid blue primary color (#002aff) with vivid light blue accents (#e9eeff). The light mode uses a neutral background (#f7f7f7). Dark mode keeps the vivid blue primary (#002aff) on a neutral background (#171717).

Color palette

TokenLightDark
Background
#f7f7f7whitesmoke
#171717black
Foreground
#171717black
#edededwhitesmoke
Card
#ffffffwhite
#1d1d1dblack
Card foreground
#090702black
#edededwhitesmoke
Popover
#ffffffwhite
#171717black
Popover foreground
#090702black
#edededwhitesmoke
Primary
#002affblue
#002affblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8b70ffmediumslateblue
#8b70ffmediumslateblue
Secondary foreground
#ffffffwhite
#2b170dblack
Muted
#f5f5f5whitesmoke
#171717black
Muted foreground
#171717black
#edededwhitesmoke
Accent
#e9eefflavender
#e9eefflavender
Accent foreground
#171717black
#171717black
Destructive
#ff5555tomato
#ff5555tomato
Destructive foreground
#ffffffwhite
#edededwhitesmoke
Border
#edece8linen
#525252darkslategray
Input
#edece8linen
#2a2922darkslategray
Ring
#ded08cburlywood
#ded08cburlywood

Contrast

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

Light mode
Text on background16.73:1AAA
Text on card20.13:1AAA
Primary button7.56:1AAA
Secondary button3.58:1AA Large
Muted text16.47:1AAA
Accent15.44:1AAA
Destructive3.14:1AA Large
Dark mode
Text on background15.31:1AAA
Text on card14.40:1AAA
Primary button7.56:1AAA
Secondary button4.75:1AA
Muted text15.31:1AAA
Accent15.48:1AAA
Destructive2.68:1Fail

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.976 0 180);
  --foreground: oklch(0.205 0 169.695);
  --muted: oklch(0.971 0 180);
  --muted-foreground: oklch(0.205 0 169.695);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.13 0.019 101.8);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.13 0.019 101.8);
  --border: oklch(0.943 0.005 97.331);
  --input: oklch(0.943 0.005 97.331);
  --primary: oklch(0.475 0.297 264.198);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.642 0.204 287.925);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.949 0.024 272.883);
  --accent-foreground: oklch(0.205 0 169.695);
  --destructive: oklch(0.682 0.206 24.43);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.854 0.088 98.253);
  --chart-1: oklch(0.854 0.088 98.253);
  --chart-2: oklch(0.774 0.074 47.736);
  --chart-3: oklch(0.861 0.11 123.69);
  --chart-4: oklch(0.797 0.066 47.871);
  --chart-5: oklch(0.858 0.092 98.268);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.205 0 169.695);
  --foreground: oklch(0.946 0 174.289);
  --muted: oklch(0.205 0 169.695);
  --muted-foreground: oklch(0.946 0 174.289);
  --popover: oklch(0.205 0 169.695);
  --popover-foreground: oklch(0.946 0 174.289);
  --card: oklch(0.231 0 180);
  --card-foreground: oklch(0.946 0 174.289);
  --border: oklch(0.44 0 170.538);
  --input: oklch(0.28 0.013 97.806);
  --primary: oklch(0.475 0.297 264.198);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.642 0.204 287.949);
  --secondary-foreground: oklch(0.23 0.038 46.807);
  --accent: oklch(0.95 0.023 272.818);
  --accent-foreground: oklch(0.205 0 169.695);
  --destructive: oklch(0.682 0.206 24.43);
  --destructive-foreground: oklch(0.946 0 174.289);
  --ring: oklch(0.854 0.088 98.253);
  --chart-1: oklch(0.854 0.088 98.253);
  --chart-2: oklch(0.774 0.074 47.736);
  --chart-3: oklch(0.861 0.11 123.69);
  --chart-4: oklch(0.797 0.066 47.871);
  --chart-5: oklch(0.858 0.092 98.268);
}