One way would be to have a light logo with an opacity expression like this:
bg = thisComp.layer(“background”);
rgb = bg.sampleImage([bg.width,bg.height]/2,[bg.width,bg.height]/2);
hsl = rgbToHsl(rgb);
if (hsl[2] > .5) 0 else 100
and an expression like this on the dark logo:
bg = thisComp.layer(“background”);
rgb = bg.sampleImage([bg.width,bg.height]/2,[bg.width,bg.height]/2);
hsl = rgbToHsl(rgb);
if (hsl[2] > .5) 100 else 0
Or you could use a similar concept to control the fill color of a single logo like this:
bg = thisComp.layer(“background”);
rgb = bg.sampleImage([bg.width,bg.height]/2,[bg.width,bg.height]/2);
hsl = rgbToHsl(rgb);
if (hsl[2] > .5) [0,0,0,1] else [1,1,1,1]
Dan