Absolute for shadcn/ui

Absolute is a shadcn/ui theme built around a blue primary color (#2133ba) with muted light blue accents (#d2d3db). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the blue primary (#2133ba) on a blue-tinted background (#05060a).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#05060ablack
Foreground
#020209black
#ffffffwhite
Card
#fcfcfdwhite
#05060ablack
Card foreground
#020209black
#ffffffwhite
Popover
#fcfcfdwhite
#05060ablack
Popover foreground
#020209black
#ffffffwhite
Primary
#2133badarkslateblue
#2133badarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2d3dblightgrey
#15161eblack
Secondary foreground
#363844darkslategray
#a6a9bfdarkgray
Muted
#d4d7ecgainsboro
#13152bblack
Muted foreground
#3d3d43darkslategray
#bcbdc2silver
Accent
#d2d3dblightgrey
#15161eblack
Accent foreground
#363844darkslategray
#a6a9bfdarkgray
Destructive
#78120dmaroon
#d42016firebrick
Destructive foreground
#f8c1belightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2133badarkslateblue
#2133badarkslateblue

Contrast

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

Light mode
Text on background20.14:1AAA
Text on card20.14:1AAA
Primary button9.34:1AAA
Secondary button7.77:1AAA
Muted text7.58:1AAA
Accent7.77:1AAA
Destructive7.06:1AAA
Dark mode
Text on background20.27:1AAA
Text on card20.27:1AAA
Primary button9.34:1AAA
Secondary button7.74:1AAA
Muted text9.55:1AAA
Accent7.74:1AAA
Destructive5.21:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 280.301);
  --foreground: oklch(0.095 0.022 272.174);
  --muted: oklch(0.884 0.029 279.798);
  --muted-foreground: oklch(0.363 0.01 279.901);
  --popover: oklch(0.991 0.002 280.301);
  --popover-foreground: oklch(0.095 0.022 272.174);
  --card: oklch(0.991 0.002 280.301);
  --card-foreground: oklch(0.095 0.022 272.174);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.414 0.209 268.225);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.868 0.011 280.132);
  --secondary-foreground: oklch(0.344 0.021 279.313);
  --accent: oklch(0.868 0.011 280.132);
  --accent-foreground: oklch(0.344 0.021 279.313);
  --destructive: oklch(0.371 0.137 28.911);
  --destructive-foreground: oklch(0.86 0.063 21.951);
  --ring: oklch(0.414 0.209 268.225);
  --chart-1: oklch(0.414 0.209 268.225);
  --chart-2: oklch(0.868 0.011 280.132);
  --chart-3: oklch(0.868 0.011 280.132);
  --chart-4: oklch(0.893 0.009 280.175);
  --chart-5: oklch(0.413 0.217 267.655);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.012 277.292);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.207 0.042 276.395);
  --muted-foreground: oklch(0.799 0.008 280.175);
  --popover: oklch(0.122 0.012 277.292);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.012 277.292);
  --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.414 0.209 268.225);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.204 0.014 279.131);
  --secondary-foreground: oklch(0.74 0.031 279.638);
  --accent: oklch(0.204 0.014 279.131);
  --accent-foreground: oklch(0.74 0.031 279.638);
  --destructive: oklch(0.558 0.213 29.234);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.414 0.209 268.225);
  --chart-1: oklch(0.414 0.209 268.225);
  --chart-2: oklch(0.204 0.014 279.131);
  --chart-3: oklch(0.204 0.014 279.131);
  --chart-4: oklch(0.234 0.018 279.005);
  --chart-5: oklch(0.413 0.217 267.655);
}