EDIT :
While we are on the color subject, I wondering how can I compare colors to each others.
For exemple I tried this code :
EDIT :
c = thisComp.layer("Shape layer 1").content("Rectangle 1").content("Fill 1").color;
purple = [0.498, 0.2902, 0.8, 1];
yellow = [0.9961, 0.8941, 0.251, 1];
if (c[0] == 0.489 && c[1] == 0.2902 && c[2] == 0.8 && c[3] == 1){
[0.9961, 0.8941, 0.251, 1]
}else{
[0.498, 0.2902, 0.8, 1]
}
The color don’t change I tried to apply RgbToHsl() but I surely did it wrong.