here the function parameters in the photo above explained :
color1 : it's a brickcolor value
color2 : same as color1
color3 : again, same as color1
sec1 : the amount of sec to wait as shown in the photo like it if it was set to 2 sec, it will change the color each 2 seconds
and finally!
num1 : it's a number that if the counter variable is equal to the number after each loop, (like for an example, if num1 was set to 3, then we'll have 3 loops)
P.S some examples are shown in bottom of the photo iyk.