-
Adjust hue, brightness AND saturation through rgbtohsl?
Hi,
I’m working on a preset to add grain to shape layers. I’m trying to set it up with slider controls and color controls to easily adjust the hue, brightness and saturation of the grain. So far I’ve been able to adjust the brightness of the grain color through expressions, linking it to the fill color of the shape layers. I’m now trying to write an expression so that I can also adjust the hue and the saturation of the grain color, but I can’t get it to work.
This is my setup. It’d be great if I could link the Shadow Color of the layer style to the three seperate sliders. Does anyone know how?

lightnessOffset = effect("Brightness")("Slider")
hsl = rgbToHsl(content("Rectangle 1").content("Fill 1").color.value);
hsl[2] = Math.max(0.0, Math.min(hsl[2]+lightnessOffset/100, 1));
hslToRgb(hsl);
