Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Does anyone know how Ray Dynamic Color works?

  • Does anyone know how Ray Dynamic Color works?

  • Paul Roper

    October 6, 2021 at 5:03 pm

    I’ve always been baffled by the expressions that Ray Dynamic Color puts into a colour swatch. Somehow, with exactly the same expression, it can make a different colour appear in a colour swatch.

    For example, I have a simple palette set up with two colours – blue and yellow. If I click the blue swatch in the Ray Dynamic Color panel, the expression it puts in is:

    //01Ray Color 2.0
    rayColorPalette = comp("Ray - Palette");
    rayColorSwatch = Math.floor(value[2]*255);
    try{ rayColorPalette.layer(1)(4)(rayColorSwatch)(1); }catch(e){ value; }

    …and if I click the yellow swatch, the expression does not change, but the colour does.

    The layer that Ray adds to my comp does not change at all when I click the swatches.

    I’m just curious if anyone out there knows how on earth this witchcraft works?!

  • Dan Ebberts

    October 6, 2021 at 6:16 pm

    What’s changing is the value[2] part. If you turn off the expression and put your cursor over the layer, in the Info panel you see that the value of the blue channel changes, depending on the swatch selected. Even though it appears black, there is data embedded in the blue channel.

  • Paul Roper

    October 7, 2021 at 8:52 am

    Oh yes – so there is!

    Thanks for sharing your bottomless well of expressions knowledge to us mere mortals, Dan!

Viewing 1 - 3 of 3 posts

Log in to reply.

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