Colore JS

Search documentation

Find a function or jump to a section.
v2.0.1

Theme generator for shadcn/ui and Tailwind CSS v4

Pick a brand color and preview its light and dark theme on 18 UI examples.

Presets
Preview mode
Surface tone
Text contrast

Use this theme in your app

Colore builds the light and dark theme from your color with generateSystem. Every text color is paired with a background it passes contrast on, in both modes, at the level you pick above. Copy the shadcn/ui variables below into globals.css, or use View code for Tailwind CSS v4, plain CSS variables or JavaScript.

If your project already has a globals.css, the Colore CLI applies a theme from the same brand color to it, updating the color tokens it recognizes in their existing format. The CLI uses Colore's default brand-tinted surfaces, not the Surface tone picked here. The code snippet generates the same theme with the options you picked above, so you can regenerate it whenever the brand changes.

Install
npm install colore-js
Generate the same theme in code
import { generateSystem } from 'colore-js';

const css = generateSystem('#78324e', {
  neutralHue: 0,
  roleSeeds: { neutral: '#ededed' },
}).toShadcnCss();
Or apply the brand color to an existing globals.css
npx colore-js theme "#78324e" --apply app/globals.css --write
shadcn/ui CSS for #78324e
:root {
  --radius: 0.625rem;
  --background: oklch(0.97 0 0);
  --foreground: oklch(0.13 0 0);
  --card: oklch(0.97 0 0);
  --card-foreground: oklch(0.13 0 0);
  --popover: oklch(0.97 0 0);
  --popover-foreground: oklch(0.13 0 0);
  --primary: oklch(0.422 0.103 357.351);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.946 0 0);
  --secondary-foreground: oklch(0.13 0 0);
  --muted: oklch(0.946 0 0);
  --muted-foreground: oklch(0.528 0 0);
  --accent: oklch(0.93 0.023 357.351);
  --accent-foreground: oklch(0.13 0 0);
  --destructive: oklch(0.551 0.13 27.949);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.87 0 0);
  --input: oklch(0.87 0 0);
  --ring: oklch(0.422 0.103 357.351);
  --chart-1: oklch(0.422 0.103 357.351);
  --chart-2: oklch(0.62 0.19 255);
  --chart-3: oklch(0.62 0.13 111);
  --chart-4: oklch(0.59 0.095 201);
  --chart-5: oklch(0.5 0.19 306);
  --sidebar: oklch(0.97 0 0);
  --sidebar-foreground: oklch(0.13 0 0);
  --sidebar-primary: oklch(0.422 0.103 357.351);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.93 0.023 357.351);
  --sidebar-accent-foreground: oklch(0.13 0 0);
  --sidebar-border: oklch(0.87 0 0);
  --sidebar-ring: oklch(0.422 0.103 357.351);
}

.dark {
  --background: oklch(0.129 0 0);
  --foreground: oklch(0.97 0 0);
  --card: oklch(0.209 0 0);
  --card-foreground: oklch(0.97 0 0);
  --popover: oklch(0.209 0 0);
  --popover-foreground: oklch(0.97 0 0);
  --primary: oklch(0.68 0.102 357.121);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.27 0 0);
  --secondary-foreground: oklch(0.97 0 0);
  --muted: oklch(0.27 0 0);
  --muted-foreground: oklch(0.647 0 0);
  --accent: oklch(0.21 0.051 357.351);
  --accent-foreground: oklch(0.97 0 0);
  --destructive: oklch(0.68 0.122 27.567);
  --destructive-foreground: oklch(0 0 0);
  --border: oklch(0.27 0 0);
  --input: oklch(0.27 0 0);
  --ring: oklch(0.68 0.102 357.121);
  --chart-1: oklch(0.68 0.102 357.121);
  --chart-2: oklch(0.62 0.19 255);
  --chart-3: oklch(0.62 0.13 111);
  --chart-4: oklch(0.59 0.095 201);
  --chart-5: oklch(0.5 0.19 306);
  --sidebar: oklch(0.209 0 0);
  --sidebar-foreground: oklch(0.97 0 0);
  --sidebar-primary: oklch(0.68 0.102 357.121);
  --sidebar-primary-foreground: oklch(0 0 0);
  --sidebar-accent: oklch(0.21 0.051 357.351);
  --sidebar-accent-foreground: oklch(0.97 0 0);
  --sidebar-border: oklch(0.27 0 0);
  --sidebar-ring: oklch(0.68 0.102 357.121);
}