Caviar for shadcn/ui

Caviar is a shadcn/ui theme built around a near-white primary color (#faffff) with near-white accents (#fafcff). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#faffff) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#ffffffwhite
#020303black
Foreground
#020808black
#ffffffwhite
Card
#ffffffwhite
#020303black
Card foreground
#020808black
#ffffffwhite
Popover
#ffffffwhite
#020303black
Popover foreground
#020808black
#ffffffwhite
Primary
#faffffwhite
#faffffwhite
Primary foreground
#04585ddarkslategray
#04585ddarkslategray
Secondary
#fafffdwhite
#fafffdwhite
Secondary foreground
#045d35darkslategray
#045d35darkslategray
Muted
#e6efeblavender
#101915black
Muted foreground
#3e4643darkslategray
#b9c1bdsilver
Accent
#fafcffghostwhite
#fafcffghostwhite
Accent foreground
#095aberoyalblue
#095aberoyalblue
Destructive
#810e0emaroon
#e92b2bcrimson
Destructive foreground
#f9c8c8pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#faffffwhite
#faffffwhite

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button8.11:1AAA
Secondary button7.91:1AAA
Muted text8.28:1AAA
Accent6.35:1AA
Destructive7.04:1AAA
Dark mode
Text on background20.62:1AAA
Text on card20.62:1AAA
Primary button8.11:1AAA
Secondary button7.91:1AAA
Muted text9.77:1AAA
Accent6.35:1AA
Destructive4.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.125 0.015 198.571);
  --muted: oklch(0.944 0.01 167.504);
  --muted-foreground: oklch(0.387 0.012 166.928);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.125 0.015 198.571);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.125 0.015 198.571);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.995 0.005 200.832);
  --primary-foreground: oklch(0.42 0.07 200.846);
  --secondary: oklch(0.995 0.006 167.657);
  --secondary-foreground: oklch(0.42 0.1 155.973);
  --accent: oklch(0.991 0.004 253.247);
  --accent-foreground: oklch(0.487 0.172 257.712);
  --destructive: oklch(0.387 0.148 27.822);
  --destructive-foreground: oklch(0.875 0.057 18.29);
  --ring: oklch(0.995 0.005 200.832);
  --chart-1: oklch(0.995 0.005 200.832);
  --chart-2: oklch(0.995 0.006 167.657);
  --chart-3: oklch(0.991 0.004 253.247);
  --chart-4: oklch(1.01 0.011 348.115);
  --chart-5: oklch(0.995 0.005 200.83);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.006 199.514);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.202 0.015 165.59);
  --muted-foreground: oklch(0.803 0.01 167.462);
  --popover: oklch(0.096 0.006 199.514);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.096 0.006 199.514);
  --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.995 0.005 200.832);
  --primary-foreground: oklch(0.42 0.07 200.846);
  --secondary: oklch(0.995 0.006 167.657);
  --secondary-foreground: oklch(0.42 0.1 155.973);
  --accent: oklch(0.991 0.004 253.247);
  --accent-foreground: oklch(0.487 0.172 257.712);
  --destructive: oklch(0.603 0.223 27.19);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.995 0.005 200.832);
  --chart-1: oklch(0.995 0.005 200.832);
  --chart-2: oklch(0.995 0.006 167.657);
  --chart-3: oklch(0.991 0.004 253.247);
  --chart-4: oklch(1.01 0.011 348.115);
  --chart-5: oklch(0.995 0.005 200.83);
}