Skip to main content
Participant
February 14, 2024
Question

How to change colour of each repeator copies?

  • February 14, 2024
  • 2 replies
  • 1848 views
  1. Hello, i need a little help.  i created a layer with circle. i have added a repeator with 8 copies. i want those 8 circles to have alternate colour. like, 1st circle should have yellow colour , second circle should have green colour and again third circle should have the yellow colour like 1st one , again 4th circle should have green colour like 2nd circle one and go on same for remaining circle. how can i do that ? I tried using expression from chatgpt but it didn't help😫
This topic has been closed for replies.

2 replies

Legend
February 15, 2024

Maybe you can deal with this:

- create a null with 4 slider controls (num of circles, dist from null, size, offset time)

- create 1 circle parented to the null and add these expressions

 

Position Expression:

idx = parent.index - index - 1;
noc = parent.effect("num of circles")(1);
offset = parent.effect("offset time")(1);
radius = parent.effect("dist from null")(1).valueAtTime(time - offset * idx);
angle = 360 / noc;
x = Math.cos(degreesToRadians(angle) * idx) * radius;
y = Math.sin(degreesToRadians(angle) * idx) * radius;
[x, y]

 

Size Expression:

idx = parent.index - index - 1;
offset = parent.effect("offset time")(1);
s = parent.effect("size")(1).valueAtTime(time - offset * idx);
[s, s]

 

Community Expert
February 14, 2024

Repeaters only work on the path (shape). You need four different colored ellipses (circles) and four repeaters. They can all be on the same layer.After you create your first ellipse, position it, and add the first repeater, select the path, duplicate it, then adjust the Ellipse Path 1/postion and change the fill color. Repeat that 3 times and you have got it. If you want to repeat the stack of four repeated shapes, group the shapes and add another repeater. The workflow looks like this:

 

Participant
February 15, 2024
  • Hi Rick, thank you for this guidance but i am making it in a round shape animation for my company logo design so this method may not give a smooth animation like this. Please let me know if there is any other method where i can achieve two different colors for this animation like the photo i have attached 
Community Expert
February 15, 2024

Don't try to do it on one layer. Use Parenting and multiple layers. I don't have time to set things up for you.

 

If you have the company logo as an Illustrator file, I would put every object you want to move on a separate layer, import it as a composition retaining layer size, and then set up one or more nulls at the center for rotation and maybe add an expression control slider to control scale animations of each layer.