String for shadcn/ui

String is a shadcn/ui theme built around a deep indigo primary color (#292267) with deep green accents (#606722). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the deep indigo primary (#292267) on an indigo-tinted background (#05050a).

Color palette

TokenLightDark
Background
#fcfbfdsnow
#05050ablack
Foreground
#04030cblack
#f5f5fawhitesmoke
Card
#fcfbfdsnow
#05050ablack
Card foreground
#04030cblack
#f5f5fawhitesmoke
Popover
#fcfbfdsnow
#05050ablack
Popover foreground
#04030cblack
#f5f5fawhitesmoke
Primary
#292267midnightblue
#292267midnightblue
Primary foreground
#d1cdeegainsboro
#d1cdeegainsboro
Secondary
#606722darkolivegreen
#606722darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e1e2d5gainsboro
#292a1ddarkslategray
Muted foreground
#4d4d4ddarkslategray
#b3b3b3darkgray
Accent
#606722darkolivegreen
#606722darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#610505maroon
#f32020crimson
Destructive foreground
#fa9e9elightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#292267midnightblue
#292267midnightblue

Contrast

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

Light mode
Text on background19.93:1AAA
Text on card19.93:1AAA
Primary button8.96:1AAA
Secondary button6.04:1AA
Muted text6.45:1AA
Accent6.04:1AA
Destructive6.82:1AA
Dark mode
Text on background18.70:1AAA
Text on card18.70:1AAA
Primary button8.96:1AAA
Secondary button6.04:1AA
Muted text6.90:1AA
Accent6.04:1AA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 290.961);
  --foreground: oklch(0.108 0.027 287.771);
  --muted: oklch(0.908 0.018 111.388);
  --muted-foreground: oklch(0.418 0 173.29);
  --popover: oklch(0.99 0.003 290.961);
  --popover-foreground: oklch(0.108 0.027 287.771);
  --card: oklch(0.99 0.003 290.961);
  --card-foreground: oklch(0.108 0.027 287.771);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.308 0.116 281.671);
  --primary-foreground: oklch(0.862 0.046 289.993);
  --secondary: oklch(0.494 0.092 114.649);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.092 114.649);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.313 0.123 28.245);
  --destructive-foreground: oklch(0.792 0.11 19.806);
  --ring: oklch(0.308 0.116 281.671);
  --chart-1: oklch(0.308 0.116 281.671);
  --chart-2: oklch(0.494 0.092 114.649);
  --chart-3: oklch(0.494 0.092 114.649);
  --chart-4: oklch(0.532 0.1 114.69);
  --chart-5: oklch(0.305 0.122 280.826);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.015 289.568);
  --foreground: oklch(0.971 0.007 290.883);
  --muted: oklch(0.281 0.024 112.569);
  --muted-foreground: oklch(0.765 0 172.405);
  --popover: oklch(0.119 0.015 289.568);
  --popover-foreground: oklch(0.971 0.007 290.883);
  --card: oklch(0.119 0.015 289.568);
  --card-foreground: oklch(0.971 0.007 290.883);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.308 0.116 281.671);
  --primary-foreground: oklch(0.862 0.046 289.993);
  --secondary: oklch(0.494 0.092 114.649);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.494 0.092 114.649);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.616 0.239 28.023);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.308 0.116 281.671);
  --chart-1: oklch(0.308 0.116 281.671);
  --chart-2: oklch(0.494 0.092 114.649);
  --chart-3: oklch(0.494 0.092 114.649);
  --chart-4: oklch(0.532 0.1 114.69);
  --chart-5: oklch(0.305 0.122 280.826);
}