Twist for shadcn/ui

Twist is a shadcn/ui theme built around a light green primary color (#a7e7b3) with light red accents (#e7b3a7). The light mode uses a neutral background (#f7fcf8). Dark mode keeps the light green primary (#a7e7b3) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fcf8mintcream
#000000black
Foreground
#061408black
#fcfdfcwhite
Card
#f7fcf8mintcream
#000000black
Card foreground
#061408black
#fcfdfcwhite
Popover
#f7fcf8mintcream
#000000black
Popover foreground
#061408black
#fcfdfcwhite
Primary
#a7e7b3palegreen
#a7e7b3palegreen
Primary foreground
#14481ddarkgreen
#14481ddarkgreen
Secondary
#b3a7e7lightsteelblue
#b3a7e7lightsteelblue
Secondary foreground
#1d1448midnightblue
#1d1448midnightblue
Muted
#e5e4e7gainsboro
#19181bblack
Muted foreground
#424242darkslategray
#bdbdbdsilver
Accent
#e7b3a7burlywood
#e7b3a7burlywood
Accent foreground
#481d14maroon
#481d14maroon
Destructive
#cb2406firebrick
#f72c08orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a7e7b3palegreen
#a7e7b3palegreen

Contrast

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

Light mode
Text on background18.26:1AAA
Text on card18.26:1AAA
Primary button7.44:1AAA
Secondary button7.69:1AAA
Muted text7.94:1AAA
Accent7.78:1AAA
Destructive5.54:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button7.44:1AAA
Secondary button7.69:1AAA
Muted text9.40:1AAA
Accent7.78:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.008 151.298);
  --foreground: oklch(0.173 0.032 149.163);
  --muted: oklch(0.921 0.003 294.754);
  --muted-foreground: oklch(0.38 0 180);
  --popover: oklch(0.987 0.008 151.298);
  --popover-foreground: oklch(0.173 0.032 149.163);
  --card: oklch(0.987 0.008 151.298);
  --card-foreground: oklch(0.173 0.032 149.163);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.871 0.097 149.671);
  --primary-foreground: oklch(0.356 0.09 146.655);
  --secondary: oklch(0.761 0.091 292.498);
  --secondary-foreground: oklch(0.24 0.093 285.424);
  --accent: oklch(0.81 0.063 32.898);
  --accent-foreground: oklch(0.293 0.068 34.01);
  --destructive: oklch(0.542 0.204 31.639);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.871 0.097 149.671);
  --chart-1: oklch(0.871 0.097 149.671);
  --chart-2: oklch(0.761 0.091 292.498);
  --chart-3: oklch(0.81 0.063 32.898);
  --chart-4: oklch(0.794 0.078 292.938);
  --chart-5: oklch(0.873 0.102 149.58);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.002 151.373);
  --muted: oklch(0.212 0.005 294.383);
  --muted-foreground: oklch(0.797 0 180);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.002 151.373);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.002 151.373);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.871 0.097 149.671);
  --primary-foreground: oklch(0.356 0.09 146.655);
  --secondary: oklch(0.761 0.091 292.498);
  --secondary-foreground: oklch(0.24 0.093 285.424);
  --accent: oklch(0.81 0.063 32.898);
  --accent-foreground: oklch(0.293 0.068 34.01);
  --destructive: oklch(0.628 0.238 31.486);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.871 0.097 149.671);
  --chart-1: oklch(0.871 0.097 149.671);
  --chart-2: oklch(0.761 0.091 292.498);
  --chart-3: oklch(0.81 0.063 32.898);
  --chart-4: oklch(0.794 0.078 292.938);
  --chart-5: oklch(0.873 0.102 149.58);
}