Forums › Adobe After Effects › rgbToHsl set colour with expression
rgbToHsl set colour with expression
Michael Thompson
May 31, 2017 at 9:15 amI’m trying to set colour of a shape with the below expression. The expression works but the colour that the shape displays with the below example does not reflect the RGB values provided. I can not find the Adobe documentation anywhere that describes what this method should do. If anyone could help point me to the documentation or explain how this method work I’d be very great full.
rgbToHsl([255,255,255,1]);
Walter Soyka
May 31, 2017 at 4:51 pmThe documentation is here:
https://helpx.adobe.com/after-effects/using/expression-language-reference.html#color_conversion_methods_expression_referenceThere are a couple of problems I suspect you’re running into:
1) Color values should to be scaled from 0.0 to 1.0, not from 0 to 255.
2) This function returns the HSLA values of the given RGBA color, but Ae always thinks in RGBA. Unless you’re doing something in your shape layer to ultimately convert those HSLA color values back to RGBA, (like with Channel Combiner or Set Channels), you will not get the results you expect.
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter] | RenderBreak [blog] | Profile [LinkedIn]
Log in to reply.