FORUMS: list search recent posts

rgbToHsl set colour with expression

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michael Thompson
rgbToHsl set colour with expression
on May 31, 2017 at 9:15:47 am

I'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]);


Return to posts index

Dave LaRonde
Re: rgbToHsl set colour with expression
on May 31, 2017 at 4:06:34 pm

I'm pretty sure HSL doesn't support an alpha channel, so the last number (1) is unnecessary.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Walter Soyka
Re: rgbToHsl set colour with expression
on May 31, 2017 at 4:51:04 pm

The documentation is here:
https://helpx.adobe.com/after-effects/using/expression-language-reference.h...

There 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]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]