Bascially I'm applying this expressioon to a fill effect on another layer to generate the complementary colour. Working in 16 bit, hence the 32768. I've applied the esxpression to a text layer and the results I'm getting I don't understand. I seem to be getting the correct answer mulitplied by 32768 for some reason but I can't see where I'm going wrong.
Code: Select all
Col = thisComp.layer("LIGHT CONTROLLERS").effect("Color 001")("Color") ; BitD = 32768; R = Math.round(Col*BitD); G = Math.round(Col*BitD); B = Math.round(Col*BitD); A = Math.round(Col*BitD); [BitD - R,BitD - G,BitD - B,A]