Files
photocraft/crates/gpu
timothydaly1andClaude Opus 5.5 e41bc273fe Hue/Saturation: a 32-bit Colorize scales its saturation by 1 - |Lightness|
Photoshop's 32-bit Colorize builds its colour with less chroma than the
8/16-bit one: in the photoshop corpus's rgb32 hue-saturation-colorize
(hue -160, saturation 40, lightness +5) every output has the same hue
and lightness as ours but exactly 0.95 of the chroma, at every input
lightness from black to white. Scaling the saturation by 1 - |Lightness|
at 32 bits makes the file exact; 8 and 16 bits keep the full saturation
(their oracles are exact without it, and scaling there breaks them).
Only a raised Lightness is measured; a lowered one is taken to scale
the same way.

CPU (adjust::colorize_saturation) and the GPU planner alike. Photoshop
oracles 185 -> 186, floor 186.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:50:04 -04:00
..