Conditional Text Color (if/else expression)
Hi, I am uploading information into my after effects animation via CSV. Some of these contain numbers and I would like to change the color based on if they're negative or positive.
my script so far is as follows
var textcolor = thisComp.layer("Testgame4.csv")("Data")("Outline")("Difference")("Difference 12")
if (textcolor < 0 ){
textcolor.fillColor = hslToRgb(C20621);
}else { textcolor.fillColor = hslToRgb(44C206)}
but it keeps throwing an error one way or the other. Sometimes it's expecting a semi-colon where there is one and other times it's expecting a parenthisies where there is one.
Any help would be appreciated as this would save a ton of time while creating content. Cheers!
