target = thisComp.layer("Candle"); // this would be your footage layer maxO = 100; // set the max opacity value minO = 0; // set the min opacity value lum = rgbToHsl(target.sampleImage(anchorPoint, radius = [target.width/2, target.height/2], postEffect = true, t = time))[2]; linear(lum, minO, maxO)