Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Finding a Operator for transition between to Color

  • Finding a Operator for transition between to Color

    Posted by Shahed Naderi on August 26, 2015 at 3:13 pm

    I’m interested to find an operator (in HLS mode ) between two colors.
    for example if you have a Blue as C1 and then you have Darker One as a C2 .I want to find the expression which transfer C1 to C2 . then if I have C3 as a new color C4 would be obvious.

    Kalleheikki Kannisto replied 11 years ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    August 26, 2015 at 6:28 pm

    Not that I’ve done anything like this, but there are three key expressions that will help you here.

    sampleImage(point, radius = [.5, .5], postEffect=true, t=time)

    rgbToHsl(rgbaArray)

    and

    hslToRgb(hslaArray)

    In theory, you should be able to sample the color values of two points (C1 and C2), then convert them to hlsa and see what the difference is. I’d imagine simply deducting one from the other will give you an array that you can apply to other colors (such as C3) by adding it to the value. They you can convert the result back to rgba values and apply the resulting color (C4) to something.

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