---
name: palette-rip
description: Extract a designer-ready color palette from any image or video. Outputs .hex (plain list), .gpl (GIMP/Inkscape), .ase (Adobe Swatch Exchange), CSS variables, and a labeled PNG swatch sheet. K-means clustering picks N dominant colors; for videos, samples N frames and merges. Use when the user asks for a color palette, design tokens, swatch sheet, brand colors, dominant colors, "what colors are in this", or wants to turn a reference image into a reusable palette for a UI/design system. Distinct from lut-snap (3D LUTs for grading) — palette-rip produces design tokens.
---


# palette-rip

Image or video → palette files in every format you'll actually use.

## Image

```bash
python3 ~/.claude/skills/palette-rip/scripts/rip_palette.py --input ref.jpg --n 8
# → ref_palette/  (palette.hex, palette.gpl, palette.ase, palette.css, palette.png)
```

## Video

```bash
python3 ~/.claude/skills/palette-rip/scripts/rip_palette.py --input clip.mp4 --n 6 --frames 30
# samples 30 evenly-spaced frames, merges, k-means
```

## Output formats

- `palette.hex` — one hex per line, ready to paste anywhere
- `palette.gpl` — GIMP / Inkscape palette
- `palette.ase` — Adobe Swatch Exchange (Photoshop / Illustrator)
- `palette.css` — `:root { --c1: #...; --c2: #...; }`
- `palette.png` — labeled swatch sheet you can post to Telegram

## Flags

- `--input` — image or video file
- `--output` — output folder (default `<input>_palette`)
- `--n` — number of colors (default 8)
- `--frames` — frames sampled per video (default 30)

## First-run install

Auto-installs `pillow`, `scikit-learn`, `numpy` on first run. ffmpeg expected on PATH (already there if you use any of the video skills).

## Pairs well with

- `cover-art` — pull an album art palette and feed it as design tokens
- `lut-snap` — same input, different output (LUT vs. palette tokens)
- `liquid-glass` — palette → CSS variables drop-in
