Solid for shadcn/ui

Solid is a shadcn/ui theme built around a green primary color (#a1ad2e) with indigo accents (#3b2ead). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#a1ad2e) on a green-tinted background (#0b0b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0b04black
Foreground
#0c0d02black
#f9f9f5whitesmoke
Card
#fcfcfcsnow
#0e0f05black
Card foreground
#080901black
#fbfbf9snow
Popover
#fcfcfcsnow
#0e0f05black
Popover foreground
#080901black
#fbfbf9snow
Primary
#a1ad2eyellowgreen
#a1ad2eyellowgreen
Primary foreground
#0b0c03black
#0b0c03black
Secondary
#3b2eaddarkslateblue
#3b2eaddarkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d5d2e9gainsboro
#18162dblack
Muted foreground
#525068dimgray
#9a97afdarkgray
Accent
#3b2eaddarkslateblue
#3b2eaddarkslateblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7d0907maroon
#f1120ered
Destructive foreground
#fbbdbclightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a1ad2eyellowgreen
#a1ad2eyellowgreen

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.57:1AAA
Primary button7.99:1AAA
Secondary button9.62:1AAA
Muted text5.26:1AA
Accent9.62:1AAA
Destructive6.82:1AA
Dark mode
Text on background18.68:1AAA
Text on card18.59:1AAA
Primary button7.99:1AAA
Secondary button9.62:1AAA
Muted text6.24:1AA
Accent9.62:1AAA
Destructive4.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.155 0.027 113.154);
  --muted: oklch(0.873 0.032 290.318);
  --muted-foreground: oklch(0.442 0.039 289.285);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.134 0.023 112.68);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.134 0.023 112.68);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.715 0.146 115.187);
  --primary-foreground: oklch(0.15 0.022 112.707);
  --secondary: oklch(0.408 0.191 278.172);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.408 0.191 278.172);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.376 0.147 28.699);
  --destructive-foreground: oklch(0.854 0.072 19.795);
  --ring: oklch(0.715 0.146 115.187);
  --chart-1: oklch(0.715 0.146 115.187);
  --chart-2: oklch(0.408 0.191 278.172);
  --chart-3: oklch(0.408 0.191 278.172);
  --chart-4: oklch(0.428 0.202 278.03);
  --chart-5: oklch(0.725 0.151 115.322);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.018 112.395);
  --foreground: oklch(0.982 0.005 111.118);
  --muted: oklch(0.214 0.045 286.536);
  --muted-foreground: oklch(0.687 0.035 290.039);
  --popover: oklch(0.164 0.021 112.949);
  --popover-foreground: oklch(0.988 0.004 111.083);
  --card: oklch(0.164 0.021 112.949);
  --card-foreground: oklch(0.988 0.004 111.083);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.715 0.146 115.187);
  --primary-foreground: oklch(0.15 0.022 112.707);
  --secondary: oklch(0.408 0.191 278.172);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.408 0.191 278.172);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.606 0.243 29.013);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.715 0.146 115.187);
  --chart-1: oklch(0.715 0.146 115.187);
  --chart-2: oklch(0.408 0.191 278.172);
  --chart-3: oklch(0.408 0.191 278.172);
  --chart-4: oklch(0.428 0.202 278.03);
  --chart-5: oklch(0.725 0.151 115.322);
}