Does anyone know how adjustment layers work in Photoshop? I need to generate a result image having a source image and HSL values from Hue/Saturation adjustment layer. Conversion to RGB and then multiplication with the source color does not work.
Or is it possible to replace Hue/Saturation Adjustment Layer with normal layers with appropriately set blending modes (Mulitiply, Screen, Hue, Saturation, Color, Luminocity,…)?
If so then how?
Thanks
Best Answer
I've reverse-engineered the computation for when the "Colorize" checkbox is checked. All of the code below is pseudo-code.
The inputs are:
HSV(photoshop_hue, 100, 100).ToRGB()
photoshop_saturation / 100.0
(i.e. 0..1)photoshop_lightness / 100.0
(i.e. -1..1)pixel.ToHSV().Value
, scaled into 0..1 range.The method to colorize a single pixel:
Where
blend2
andblend3
are: