Tart for shadcn/ui

Tart is a shadcn/ui theme built around a blue primary color (#20517e) with muted blue accents (#a6b6c4). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the blue primary (#20517e) on a blue-tinted background (#03080c).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#03080cblack
Foreground
#010509black
#f5f7fawhitesmoke
Card
#f8fafcghostwhite
#040a10black
Card foreground
#010304black
#f8fafbghostwhite
Popover
#f8fafcghostwhite
#040a10black
Popover foreground
#010304black
#f8fafbghostwhite
Primary
#20517edarkslateblue
#20517edarkslateblue
Primary foreground
#dae9f6lavender
#dae9f6lavender
Secondary
#c8cfd5lightgrey
#2f3132darkslategray
Secondary foreground
#2f363ddarkslategray
#c7cacclightgrey
Muted
#dde6eelavender
#111a22black
Muted foreground
#55616ddimgray
#929eaadarkgray
Accent
#a6b6c4silver
#3e454cdarkslategray
Accent foreground
#161c22black
#dbdee1gainsboro
Destructive
#ae250afirebrick
#f35839tomato
Destructive foreground
#feefecseashell
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#20517edarkslateblue
#20517edarkslateblue

Contrast

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

Light mode
Text on background19.99:1AAA
Text on card19.75:1AAA
Primary button6.70:1AA
Secondary button7.76:1AAA
Muted text5.00:1AA
Accent8.23:1AAA
Destructive6.13:1AA
Dark mode
Text on background18.75:1AAA
Text on card18.95:1AAA
Primary button6.70:1AA
Secondary button7.98:1AAA
Muted text6.45:1AA
Accent7.19:1AAA
Destructive6.29:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.001 245.982);
  --foreground: oklch(0.111 0.017 235.509);
  --muted: oklch(0.92 0.015 246.153);
  --muted-foreground: oklch(0.487 0.023 246.513);
  --popover: oklch(0.984 0.003 245.999);
  --popover-foreground: oklch(0.088 0.013 235.509);
  --card: oklch(0.984 0.003 245.999);
  --card-foreground: oklch(0.088 0.013 235.509);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.424 0.093 249.696);
  --primary-foreground: oklch(0.926 0.024 246.258);
  --secondary: oklch(0.851 0.011 246.116);
  --secondary-foreground: oklch(0.328 0.015 246.503);
  --accent: oklch(0.768 0.027 246.361);
  --accent-foreground: oklch(0.224 0.014 246.665);
  --destructive: oklch(0.489 0.176 32.53);
  --destructive-foreground: oklch(0.962 0.017 31.083);
  --ring: oklch(0.424 0.093 249.696);
  --chart-1: oklch(0.424 0.093 249.696);
  --chart-2: oklch(0.851 0.011 246.116);
  --chart-3: oklch(0.768 0.027 246.361);
  --chart-4: oklch(0.875 0.009 246.088);
  --chart-5: oklch(0.425 0.097 249.995);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.015 238.561);
  --foreground: oklch(0.976 0.004 246.013);
  --muted: oklch(0.212 0.021 247.165);
  --muted-foreground: oklch(0.695 0.021 246.318);
  --popover: oklch(0.142 0.017 242.15);
  --popover-foreground: oklch(0.984 0.003 245.997);
  --card: oklch(0.142 0.017 242.15);
  --card-foreground: oklch(0.984 0.003 245.997);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.424 0.093 249.696);
  --primary-foreground: oklch(0.926 0.024 246.258);
  --secondary: oklch(0.31 0.004 246.129);
  --secondary-foreground: oklch(0.836 0.004 246.019);
  --accent: oklch(0.387 0.015 246.399);
  --accent-foreground: oklch(0.899 0.006 246.04);
  --destructive: oklch(0.664 0.196 33.209);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.424 0.093 249.696);
  --chart-1: oklch(0.424 0.093 249.696);
  --chart-2: oklch(0.31 0.004 246.129);
  --chart-3: oklch(0.387 0.015 246.399);
  --chart-4: oklch(0.34 0.005 246.134);
  --chart-5: oklch(0.425 0.097 249.995);
}