ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression to constantly change color of a spectrum

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mario Pascal
Expression to constantly change color of a spectrum
on Mar 22, 2017 at 2:03:00 am

Hi,
I'm running a music channel where I upload music regularly, and I need an expression for the color effects on my audio spectrum layer (Inside Color/Outside color)
Basically, I need a way to keep this spectrum constantly changing in a rainbow form, if not I can put in my own colors if needed, if you don't understand what I mean look at the spectrum at the back of the black spectrum, I need an expression that can do that.




Thanks In advance!


Return to posts index

Dan Ebberts
Re: Expression to constantly change color of a spectrum
on Mar 22, 2017 at 6:04:51 pm

This might be a place to start:

hues = [0,30,60,120,180,240,300];
freq = 1;
idx = Math.floor(time*freq)%hues.length;
hslToRgb([hues[idx]/360,.85,.4,1])


Dan



Return to posts index

Mario Pascal
Re: Expression to constantly change color of a spectrum
on Mar 23, 2017 at 12:41:09 am

Yes, it's something like how I want it to be.. Thanks alot! But question.. is there a way to modify the expression to make it change a little slower?


Return to posts index


Dan Ebberts
Re: Expression to constantly change color of a spectrum
on Mar 23, 2017 at 12:50:21 am

To make it go half as fast, change this line:

freq = 1;

to this:

freq = .5;

Dan



Return to posts index

Mario Pascal
Re: Expression to constantly change color of a spectrum
on Mar 29, 2017 at 6:20:30 pm

Isn't there a way to make the colors smoothly blend?


Return to posts index

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