Skip to content

Show each LUT's fingerprint in the sidebar - #42

Merged
tsvb merged 1 commit into
mainfrom
claude/lut-swatches
Sep 14, 2026
Merged

tsvb merged 1 commit into
mainfrom
claude/lut-swatches

Conversation

@tsvb

@tsvb tsvb commented Sep 14, 2026

Copy link
Copy Markdown
Owner

The LUT list was names only. Each row now leads with a strip of seven reference colors — a three-step gray ramp, skin, sky, foliage and red — sampled through that cube, so a look's tone curve and hue shifts are visible before selecting it. The None row shows the untouched patches, which every other row is a change from. That strip is the only new element in the row; the size goes into the tooltip.

  • CubeLUT.sample(_:): trilinear lookup on the CPU, matching CIColorCube, reading the table in place.
  • CubeLUT.swatches: computed once at init, for file and in-memory LUTs alike.
  • SwatchStrip: 56×18, rounded, hairline border, accessibility-hidden (the name carries the row).

Test plan

  • swift test: 359 tests, 0 failures. New: identity leaves the patches alone, red-fastest ordering, interpolation between lattice points.
  • Eyeball the sidebar in light and dark, with a derived LUT in the list.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ViSYWttguWwFQm1PEksQ7K

…rough the cube

The LUT list was names only. Each row now leads with a small strip of
seven reference patches — a three-step gray ramp, skin, sky, foliage and
red — sampled through that cube, so the tone curve and the hue shifts of
a look are visible before it is selected. The "None" row shows the
untouched patches, which is what every other row is a change from.

`CubeLUT.sample(_:)` is a trilinear lookup on the CPU, the same
interpolation CIColorCube does; `swatches` is computed once at init from
the floats the table is built from. Three tests pin identity, red-fastest
ordering, and interpolation between lattice points.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ViSYWttguWwFQm1PEksQ7K
@tsvb
tsvb merged commit 018802a into main Sep 14, 2026
2 checks passed
@tsvb
tsvb deleted the claude/lut-swatches branch September 14, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant