you can do this, but you don’t really want to get into conditional checkbox controls… it rarely ends up well.
you might consider setting the different ramp effects on different layers, then using a layer control to select the layer. if your comp structure will remain this simple (with a control layer and only BG layers) this might be the best way to go.
once you’ve added the layer control to the control layer, you’d use an expression like this to control the bg layers’ opacity:
target = thisComp.layer(“Control”);
bg = target.effect(“Layer Control”)(“Layer”).name;
if (bg == name) 100 else 0
if you only had the 2 bg options, you could use a checkbox, but i’d only use one… label it “BG Red” and have that control the opacity of the red bg layer.
or if you only wanted a single bg layer, but control the color, don’t add another ramp effect, just add keyframes to the ramp colors and control which keyframes to use if the red checkbox is selected.
ex: set the first keyframe of each ramp color chip to be the red options, then set the second keyframe to be the blue options. then the expressions for each color chip would be something like this:
target = thisComp.layer(“sparkles Comp 2”);
bg = thisComp.layer(“sparkles Comp 2”).effect(“Red BG”)(“Checkbox”);
if (bg == true) key(1).value else key(2).value
Kevin Camp
Art Director
KCPQ, KZJO & KRCW