Sentiment for shadcn/ui

Sentiment is a shadcn/ui theme built around a muted deep indigo primary color (#15141f) with muted light indigo accents (#c1c0ce). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the muted deep indigo primary (#15141f) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#030307black
Foreground
#040312black
#f9f9fbghostwhite
Card
#f8f7fdghostwhite
#030307black
Card foreground
#040312black
#f9f9fbghostwhite
Popover
#f8f7fdghostwhite
#030307black
Popover foreground
#040312black
#f9f9fbghostwhite
Primary
#15141fblack
#15141fblack
Primary foreground
#a6a2c3darkgray
#a6a2c3darkgray
Secondary
#d4d3d9lightgrey
#19181bblack
Secondary foreground
#3a3941darkslategray
#b0afb6darkgray
Muted
#dbd8eegainsboro
#141127black
Muted foreground
#54516cdimgray
#9793aedarkgray
Accent
#c1c0cesilver
#2d2c35darkslategray
Accent foreground
#292834darkslategray
#c5c4cfsilver
Destructive
#782608saddlebrown
#e6480forangered
Destructive foreground
#fac9b7peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#15141fblack
#15141fblack

Contrast

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

Light mode
Text on background19.16:1AAA
Text on card19.16:1AAA
Primary button7.43:1AAA
Secondary button7.68:1AAA
Muted text5.43:1AA
Accent8.06:1AAA
Destructive6.80:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button7.43:1AAA
Secondary button8.10:1AAA
Muted text6.23:1AA
Accent8.02:1AAA
Destructive3.95:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.008 291.625);
  --foreground: oklch(0.112 0.039 286.671);
  --muted: oklch(0.891 0.03 291.14);
  --muted-foreground: oklch(0.449 0.043 289.896);
  --popover: oklch(0.978 0.008 291.625);
  --popover-foreground: oklch(0.112 0.039 286.671);
  --card: oklch(0.978 0.008 291.625);
  --card-foreground: oklch(0.112 0.039 286.671);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.199 0.021 289.651);
  --primary-foreground: oklch(0.728 0.046 290.55);
  --secondary: oklch(0.87 0.008 291.61);
  --secondary-foreground: oklch(0.349 0.015 290.967);
  --accent: oklch(0.812 0.02 291.304);
  --accent-foreground: oklch(0.283 0.022 290.283);
  --destructive: oklch(0.39 0.121 37.829);
  --destructive-foreground: oklch(0.875 0.062 40.932);
  --ring: oklch(0.199 0.021 289.651);
  --chart-1: oklch(0.199 0.021 289.651);
  --chart-2: oklch(0.87 0.008 291.61);
  --chart-3: oklch(0.812 0.02 291.304);
  --chart-4: oklch(0.895 0.006 291.647);
  --chart-5: oklch(0.196 0.024 289.287);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.017 290.053);
  --foreground: oklch(0.983 0.002 291.735);
  --muted: oklch(0.194 0.043 286.998);
  --muted-foreground: oklch(0.676 0.039 290.676);
  --popover: oklch(0.101 0.017 290.053);
  --popover-foreground: oklch(0.983 0.002 291.735);
  --card: oklch(0.101 0.017 290.053);
  --card-foreground: oklch(0.983 0.002 291.735);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.199 0.021 289.651);
  --primary-foreground: oklch(0.728 0.046 290.55);
  --secondary: oklch(0.212 0.004 291.425);
  --secondary-foreground: oklch(0.758 0.009 291.563);
  --accent: oklch(0.297 0.017 290.645);
  --accent-foreground: oklch(0.825 0.015 291.438);
  --destructive: oklch(0.622 0.203 36.812);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.199 0.021 289.651);
  --chart-1: oklch(0.199 0.021 289.651);
  --chart-2: oklch(0.212 0.004 291.425);
  --chart-3: oklch(0.297 0.017 290.645);
  --chart-4: oklch(0.244 0.005 291.392);
  --chart-5: oklch(0.196 0.024 289.287);
}