Algorithm for Hue/Saturation Adjustment Layer from Photoshop

后端 未结 6 598
春和景丽
春和景丽 2021-01-31 11:39

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

6条回答
  •  盖世英雄少女心
    2021-01-31 12:08

    Hello I wrote colorize shader and my equation is as folows

    inputRGB is the source image which should be in monochrome

    (r+g+b) * 0.333
    

    colorRGB is your destination color
    finalRGB is the result

    pseudo code:

    finalRGB = inputRGB * (colorRGB + inputRGB * 0.5);
    

    I think it's fast and efficient

提交回复
热议问题