Forum Replies Created

  • Alan Boro

    May 15, 2020 at 5:49 pm in reply to: If statement for Colour

    Wow Dan.
    Thank you very much for your help. You truly are a coding master!

    Thanks!

  • Alan Boro

    May 15, 2020 at 5:27 pm in reply to: If statement for Colour

    If that function is not available in my version, then I guess I’ll have to work somehow with the RGB arrays o the HSL values?

    Its incredible how after effects allows the user to do incredible things with one button, but when trying to compare two colours for an “if” statement is somehow so complex!

  • Alan Boro

    May 15, 2020 at 5:07 pm in reply to: If statement for Colour

    Wow, very clever solution Dan. I’ve also noticed how you take your time to help a lot of people around here, so thank you!
    at least it is to my newbie eyes!

    I write your expression inside the color parameter of the fill efect on my text layer, but it doesn’t seem to recognize it.

    I made sure that the box layer has the same name and everything.

    It outputs this:

  • Alan Boro

    May 15, 2020 at 4:22 pm in reply to: If statement for Colour

    Thank you for your time DAN.

    I’m struggling a bit trying to understand what the C variable does.

    I gather that the result of the V variable is an array of 4 values [x,x,x,x].

    then the C grabs each “position” (leaving the last one out, the alpha) and multiplies 255 times and then 256 times. I don’t understand this step.

    Then it converts the output to a string of 16 characters?

    How would the expression be, if I used rgb arrays instead of Hex colour?
    c1 being [0.2,0.2,0.2,1] and
    c2 being [1,1,1,1] ?

  • Alan Boro

    May 15, 2020 at 2:38 pm in reply to: If statement for Colour

  • Alan Boro

    May 15, 2020 at 2:31 pm in reply to: If statement for Colour

    Thank you for the help.

    I am trying to understand how color is managed by After Effects when used in expressions.

    When I paste that code in my colour parameter, it doesn’t work, I’m trying to understand why that is.

    Is, the value return of the hexToRgb function, already between 0 and 1? or I have to further divide the return value by /255 in order to get its correspondent floating point?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy