Socks for shadcn/ui

Socks is a shadcn/ui theme built around a muted light yellow primary color (#e7e5da) with muted light blue accents (#dadce7). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light yellow primary (#e7e5da) on a neutral background (#070603).

Color palette

TokenLightDark
Background
#ffffffwhite
#070603black
Foreground
#040401black
#faf9f5whitesmoke
Card
#fcfcfcsnow
#0a0905black
Card foreground
#000000black
#fcfbf8snow
Popover
#ffffffwhite
#070603black
Popover foreground
#040401black
#faf9f5whitesmoke
Primary
#e7e5dagainsboro
#e7e5dagainsboro
Primary foreground
#565138darkolivegreen
#565138darkolivegreen
Secondary
#dadce7gainsboro
#dadce7gainsboro
Secondary foreground
#383d56darkslategray
#383d56darkslategray
Muted
#d8d9dfgainsboro
#202127black
Muted foreground
#46474edarkslategray
#b1b3b9darkgray
Accent
#dadce7gainsboro
#dadce7gainsboro
Accent foreground
#383d56darkslategray
#383d56darkslategray
Destructive
#721404maroon
#f84120orangered
Destructive foreground
#fcb7ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7e5dagainsboro
#e7e5dagainsboro

Contrast

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

Light mode
Text on background20.52:1AAA
Text on card20.54:1AAA
Primary button6.30:1AA
Secondary button7.80:1AAA
Muted text6.55:1AA
Accent7.80:1AAA
Destructive6.88:1AA
Dark mode
Text on background19.21:1AAA
Text on card19.20:1AAA
Primary button6.30:1AA
Secondary button7.80:1AAA
Muted text7.63:1AAA
Accent7.80:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.104 0.017 102.164);
  --muted: oklch(0.886 0.008 277.131);
  --muted-foreground: oklch(0.401 0.01 276.889);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.104 0.017 102.164);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.92 0.015 97.466);
  --primary-foreground: oklch(0.434 0.039 98.185);
  --secondary: oklch(0.896 0.015 277.028);
  --secondary-foreground: oklch(0.368 0.044 275.323);
  --accent: oklch(0.896 0.015 277.028);
  --accent-foreground: oklch(0.368 0.044 275.323);
  --destructive: oklch(0.359 0.13 32.399);
  --destructive-foreground: oklch(0.841 0.083 30.142);
  --ring: oklch(0.92 0.015 97.466);
  --chart-1: oklch(0.92 0.015 97.466);
  --chart-2: oklch(0.896 0.015 277.028);
  --chart-3: oklch(0.896 0.015 277.028);
  --chart-4: oklch(0.923 0.011 277.094);
  --chart-5: oklch(0.921 0.017 97.494);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.01 99.869);
  --foreground: oklch(0.982 0.006 97.338);
  --muted: oklch(0.25 0.011 276.591);
  --muted-foreground: oklch(0.766 0.009 277.099);
  --popover: oklch(0.123 0.01 99.869);
  --popover-foreground: oklch(0.982 0.006 97.338);
  --card: oklch(0.141 0.011 99.867);
  --card-foreground: oklch(0.988 0.004 97.312);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.92 0.015 97.466);
  --primary-foreground: oklch(0.434 0.039 98.185);
  --secondary: oklch(0.896 0.015 277.028);
  --secondary-foreground: oklch(0.368 0.044 275.323);
  --accent: oklch(0.896 0.015 277.028);
  --accent-foreground: oklch(0.368 0.044 275.323);
  --destructive: oklch(0.646 0.224 32.262);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.92 0.015 97.466);
  --chart-1: oklch(0.92 0.015 97.466);
  --chart-2: oklch(0.896 0.015 277.028);
  --chart-3: oklch(0.896 0.015 277.028);
  --chart-4: oklch(0.923 0.011 277.094);
  --chart-5: oklch(0.921 0.017 97.494);
}