---
name: lut-snap
description: Extract a color palette from any reference image and render it as a 3D LUT (.cube file) you can apply to footage in ffmpeg, Premiere, DaVinci Resolve, or Final Cut. Sample any movie still, album cover, or photo and turn its grade into a reusable LUT. Also previews the LUT applied to a target video. Use when the user wants to color match footage to a reference, generate a LUT from an image, recreate a movie's grade, or apply a film look to their clip.
---


# lut-snap

Sample a reference image's color palette and bake it into a usable .cube LUT.

## Run

```bash
# 1) Extract LUT from a reference still
python3 ~/.claude/skills/lut-snap/scripts/lut_snap.py extract \
  --ref ref_image.jpg --out my_grade.cube --size 33

# 2) Apply it to footage
python3 ~/.claude/skills/lut-snap/scripts/lut_snap.py apply \
  --lut my_grade.cube --input clip.mp4 --out graded.mp4

# 3) One-shot: extract + apply
python3 ~/.claude/skills/lut-snap/scripts/lut_snap.py snap \
  --ref ref.jpg --input clip.mp4 --out graded.mp4 --lut-out grade.cube
```

## How it works

1. Sample 5000+ pixels from the reference image.
2. Build a color transfer using histogram matching per RGB channel against a neutral identity grid.
3. Export as a 33x33x33 .cube LUT (industry standard).
4. ffmpeg's `lut3d` filter applies it to any video.

## Notes

- LUTs work in Premiere / Resolve / Final Cut by importing the `.cube` file.
- For nuanced grades use `--size 65` (slower but smoother).
- Reference images should already be color-graded (movie stills, album art, IG photos).
