CSWerks for shadcn/ui

CSWerks is a shadcn/ui theme built around a vivid orange primary color (#fe8c01) with blue accents (#486ce0). The light mode uses a neutral background (#ffffff). Dark mode switches to a light green primary (#e2e9b9) on a neutral background (#030402).

Color palette

TokenLightDark
Background
#ffffffwhite
#030402black
Foreground
#1e1e1eblack
#f9faf4whitesmoke
Card
#ffffffwhite
#060703black
Card foreground
#1e1e1eblack
#fbfcf8snow
Popover
#ffffffwhite
#030402black
Popover foreground
#8e8e8egray
#f9faf4whitesmoke
Primary
#fe8c01darkorange
#e2e9b9palegoldenrod
Primary foreground
#ffffffwhite
#4d551bdarkolivegreen
Secondary
#faf7efseashell
#b9e2e9powderblue
Secondary foreground
#1e1e1eblack
#1b4d55darkslategray
Muted
#faf7efseashell
#0c1213black
Muted foreground
#8e8e8egray
#a6aeb0darkgray
Accent
#486ce0royalblue
#e9b9e2thistle
Accent foreground
#ffffffwhite
#551b4dindigo
Destructive
#ef4444tomato
#ec5c22chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#faf7efseashell
#272725darkslategray
Input
#8e8e8egray
#272725darkslategray
Ring
#a0b2eflightsteelblue
#e2e9b9palegoldenrod

Contrast

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

Light mode
Text on background16.67:1AAA
Text on card16.67:1AAA
Primary button2.34:1Fail
Secondary button15.57:1AAA
Muted text3.06:1AA Large
Accent4.66:1AA
Destructive3.76:1AA Large
Dark mode
Text on background19.61:1AAA
Text on card19.58:1AAA
Primary button6.30:1AA
Secondary button6.74:1AA
Muted text8.37:1AAA
Accent7.58:1AAA
Destructive6.09:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.235 0 180);
  --muted: oklch(0.976 0.011 89.726);
  --muted-foreground: oklch(0.647 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.647 0 180);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.235 0 180);
  --border: oklch(0.976 0.011 89.726);
  --input: oklch(0.647 0 180);
  --primary: oklch(0.749 0.178 58.496);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.976 0.011 89.726);
  --secondary-foreground: oklch(0.235 0 180);
  --accent: oklch(0.568 0.181 267.379);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.637 0.208 25.33);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.772 0.09 271.488);
  --chart-1: oklch(0.749 0.178 58.496);
  --chart-2: oklch(0.976 0.011 89.726);
  --chart-3: oklch(0.568 0.181 267.379);
  --chart-4: oklch(0.994 0.003 89.669);
  --chart-5: oklch(0.755 0.182 57.829);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.01 114.005);
  --foreground: oklch(0.984 0.008 113.456);
  --muted: oklch(0.176 0.01 209.501);
  --muted-foreground: oklch(0.746 0.01 209.439);
  --popover: oklch(0.1 0.01 114.005);
  --popover-foreground: oklch(0.984 0.008 113.456);
  --card: oklch(0.126 0.013 114.005);
  --card-foreground: oklch(0.989 0.005 113.405);
  --border: oklch(0.273 0.004 113.592);
  --input: oklch(0.273 0.004 113.592);
  --primary: oklch(0.917 0.063 114.585);
  --primary-foreground: oklch(0.43 0.081 117.211);
  --secondary: oklch(0.886 0.043 209.47);
  --secondary-foreground: oklch(0.389 0.054 211.126);
  --accent: oklch(0.841 0.076 331.365);
  --accent-foreground: oklch(0.333 0.108 334.119);
  --destructive: oklch(0.654 0.19 39.458);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.917 0.063 114.585);
  --chart-1: oklch(0.917 0.063 114.585);
  --chart-2: oklch(0.886 0.043 209.47);
  --chart-3: oklch(0.841 0.076 331.365);
  --chart-4: oklch(0.904 0.036 209.444);
  --chart-5: oklch(0.92 0.066 114.651);
}