Step by step adding a transparency mask using GIMP
In gimp if you select the color to change, there is a slider labeled V you can change the color of the alpha by adjusting this setting.
But if you are looking for a more programmatic way of adjusting the color you can use this simple method written in lua.
In gimp if you select the color to change, there is a slider labeled V you can change the color of the alpha by adjusting this setting.
But if you are looking for a more programmatic way of adjusting the color you can use this simple method written in lua.
Lua:
function transparencyCalc(percent)
if percent >= 0 and percent <= 256 then
return 256 * (percent * .01)
end
return 256
end
print(transparencyCalc(50))
-- 128
Last edited: