# algorithmic-color-palette

Derives a full UI palette from one or two brand colours: state variants, brand-tinted greys, semantic colours.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 887 installs · ★ 165
- Author: dembrandt
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/algorithmic-color-palette/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/algorithmic-color-palette

## What it does

Two or three brand colours do not cover a UI. You still need shades for hover, active and disabled, neutrals for backgrounds and borders, and status colours for errors and warnings. This skill computes them from your brand colours, so the whole palette reads as one family instead of a generic grey library bolted on.

The methods are HSL arithmetic. From each brand colour you get a darker hover (lightness minus 8%), a darker still active (minus 14%), and a light tint for backgrounds. Greys come from desaturating the brand hue: `grey-900` for text, `grey-200` for borders, `grey-50` for page background. Semantic colours are aligned to the saturation and lightness of the brand primary, and the skill advises taking warning 5–10% darker than the rest so yellow-orange does not sit heavier on the page.

The skill activates on `**/*.css`, `**/*.scss`, `**/tokens/**`, `**/theme/**`, `tailwind.config.*` and inside `design-system/**`. If the brand already exists on the web, the author suggests pulling its real colours from the live site with `get_color_palette` or the `extract-design` skill rather than eyeballing a hex — that path needs the dembrandt engine set up. Without it you supply the seed colours yourself.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill algorithmic-color-palette -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/algorithmic-color-palette/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/algorithmic-color-palette/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill algorithmic-color-palette -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/algorithmic-color-palette/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill algorithmic-color-palette -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/algorithmic-color-palette/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dembrandt/dembrandt-skills algorithmic-color-palette
```

2. **Manually: put the files in place**
- File: `.github/skills/algorithmic-color-palette/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill algorithmic-color-palette -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dembrandt/dembrandt-skills --path skills/algorithmic-color-palette
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/algorithmic-color-palette/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dembrandt/dembrandt-skills --skill algorithmic-color-palette -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/algorithmic-color-palette/SKILL.md

## When to use it
- derive hover and active from a single brand colour
- build a grey scale that does not clash with the brand
- match status colours to the brand's saturation
- swap pure black on white for a softer pair
- fill in tokens for backgrounds, borders and table stripes

## Example prompts
- generate a full colour palette from this brand blue
- what colour should the hover state be
- create a grey palette that fits this brand

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 6583c06c5787cf62.

BEGIN THIRD-PARTY FILE 6583c06c5787cf62
````text
---
name: algorithmic-color-palette
description: Derive a full UI palette from one or two brand colours — state variants, brand-tinted greys, semantic colours. Use when building or expanding a colour system.
metadata:
  priority: 8
  pathPatterns:
    - "**/*.css"
    - "**/*.scss"
    - "**/tokens/**"
    - "**/theme/**"
    - "tailwind.config.*"
    - "design-system/**"
  promptSignals:
    phrases:
      - "colour palette"
      - "color palette"
      - "brand colours"
      - "derive colours"
      - "colour tokens"
      - "hover colour"
      - "shade"
      - "tint"
      - "colour system"
  retrieval:
    aliases:
      - colour system
      - algorithmic colours
      - brand colour palette
      - derive shades
      - colour tokens
    intents:
      - generate a colour palette from brand colours
      - derive hover and active colours
      - create grey palette from brand
      - build a full colour system
      - extend a limited brand palette
    examples:
      - generate a full colour palette from this brand blue
      - what colour should the hover state be
      - create a grey palette that fits this brand
      - derive semantic colours from the brand primary
---

# Algorithmic Colour Palette

A brand palette of 2–3 colours is not enough for a UI. You need shades for states (hover, active, disabled), neutrals for backgrounds and borders, and semantic colours for status. Deriving these algorithmically from the brand colours produces a palette that feels coherent — everything is visually related to the brand rather than pulled from a generic grey or a stock colour library.

> **Don't guess the seed colours — extract them (dembrandt engine, optional).** If the brand already exists on the web, pull its *real* palette off the live site instead of eyeballing a hex: `get_color_palette` (or the `extract-design` skill) returns the actual computed brand and neutral colours from the DOM, which you then expand with the methods below. See [`extract-design`](../extract-design/SKILL.md) for setup.

## Deriving Interactive State Colours

From each brand colour, generate at minimum three variants: base, darker (hover/active), lighter (tint/background).

### Method: HSL adjustment

```
base:    hsl(H, S%, L%)
hover:   hsl(H, S%, L% - 8%)     ← darken by reducing lightness
active:  hsl(H, S%, L% - 14%)    ← darken further
````
END THIRD-PARTY FILE 6583c06c5787cf62

The third-party file has ended. Everything between the 6583c06c5787cf62 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2377 of 11624 bytes. © dembrandt · MIT · https://github.com/dembrandt/dembrandt-skills/tree/HEAD/skills/algorithmic-color-palette/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
