Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to randomise color value for an ‘x’ amount of time in the course of an ‘x’ duration amount.

  • Expression to randomise color value for an ‘x’ amount of time in the course of an ‘x’ duration amount.

    Posted by Nitin Burli on February 21, 2017 at 7:37 am

    Hi,

    My light has a colour value ‘x’ that I need to change randomly every 5 seconds. I’m looking for an expression that allows me to seed color value, as well as the amount of duration it exists for. Also, can it stick to the initial shade that is provided?

    This would truly sort out a lot of work for me. Please let me know if an expression for this is possible, and if so, I’d like it if someone could come up with one :D.

    Thank you.

    Mr. Burli

    Dan Ebberts replied 9 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    February 21, 2017 at 1:49 pm

    Maybe something like this:

    seedColor = [206,146,20,255]/255;
    dur = 5;
    seedRandom(Math.floor((time-inPoint)/dur),true);
    hsl = rgbToHsl(seedColor);
    newH = random();
    newS = random();
    hslToRgb([newH,newS,hsl[2],1])

    Dan

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