Sardine for shadcn/ui

Sardine is a shadcn/ui theme built around a vivid light indigo primary color (#c9cafc) with vivid light yellow accents (#fcfcc9). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid light indigo primary (#c9cafc) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#000000black
Foreground
#010109black
#fcfcfdwhite
Card
#f4f4fbwhitesmoke
#030303black
Card foreground
#010104black
#ffffffwhite
Popover
#f4f4fbwhitesmoke
#030303black
Popover foreground
#010104black
#ffffffwhite
Primary
#c9cafclightblue
#c9cafclightblue
Primary foreground
#07098ddarkblue
#07098ddarkblue
Secondary
#fcfcc9lemonchiffon
#fcfcc9lemonchiffon
Secondary foreground
#2c2b02black
#2c2b02black
Muted
#deded8gainsboro
#272621darkslategray
Muted foreground
#6a694edimgray
#b1b195darkgray
Accent
#fcfcc9lemonchiffon
#fcfcc9lemonchiffon
Accent foreground
#2c2b02black
#2c2b02black
Destructive
#6e300csaddlebrown
#ea8043coral
Destructive foreground
#f7cdb6peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c9cafclightblue
#c9cafclightblue

Contrast

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

Light mode
Text on background19.57:1AAA
Text on card19.01:1AAA
Primary button9.33:1AAA
Secondary button13.67:1AAA
Muted text4.15:1AA Large
Accent13.67:1AAA
Destructive6.85:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button9.33:1AAA
Secondary button13.67:1AAA
Muted text6.90:1AA
Accent13.67:1AAA
Destructive7.67:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.006 285.503);
  --foreground: oklch(0.086 0.029 277.065);
  --muted: oklch(0.899 0.008 105.766);
  --muted-foreground: oklch(0.514 0.041 106.934);
  --popover: oklch(0.969 0.009 285.442);
  --popover-foreground: oklch(0.068 0.023 277.065);
  --card: oklch(0.969 0.009 285.442);
  --card-foreground: oklch(0.068 0.023 277.065);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.856 0.07 284.067);
  --primary-foreground: oklch(0.3 0.196 265.705);
  --secondary: oklch(0.978 0.065 106.73);
  --secondary-foreground: oklch(0.281 0.059 108.653);
  --accent: oklch(0.978 0.065 106.73);
  --accent-foreground: oklch(0.281 0.059 108.653);
  --destructive: oklch(0.389 0.099 46.183);
  --destructive-foreground: oklch(0.879 0.057 51.757);
  --ring: oklch(0.856 0.07 284.067);
  --chart-1: oklch(0.856 0.07 284.067);
  --chart-2: oklch(0.978 0.065 106.73);
  --chart-3: oklch(0.978 0.065 106.73);
  --chart-4: oklch(0.984 0.047 106.441);
  --chart-5: oklch(0.854 0.072 284.008);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.99 0.002 285.575);
  --muted: oklch(0.269 0.01 106.269);
  --muted-foreground: oklch(0.752 0.038 106.471);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.856 0.07 284.067);
  --primary-foreground: oklch(0.3 0.196 265.705);
  --secondary: oklch(0.978 0.065 106.73);
  --secondary-foreground: oklch(0.281 0.059 108.653);
  --accent: oklch(0.978 0.065 106.73);
  --accent-foreground: oklch(0.281 0.059 108.653);
  --destructive: oklch(0.707 0.15 48.524);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.856 0.07 284.067);
  --chart-1: oklch(0.856 0.07 284.067);
  --chart-2: oklch(0.978 0.065 106.73);
  --chart-3: oklch(0.978 0.065 106.73);
  --chart-4: oklch(0.984 0.047 106.441);
  --chart-5: oklch(0.854 0.072 284.008);
}