I am trying to animate the lines in after effects using trim paths, I want them to change color when they enter the box, and remain white while outside the box. How do I do this changing of the color inside the box?
If you want a trimmed line to have two different color states the easiest way is to duplicate the layer that contains the line (Edit > Duplicate), change the color on the top layer and then mask the area of the box on the top layer. Make sure to animate Trim paths before you duplicate them.