mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 01:18:43 +00:00
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>