Hello!
I think the example is better to be renamed otherwise its confusing. It doesn't really track a ball. There is nothing about a shape of an object, its just a color that matters. The actual tracking part is:
Vilib.color_detect(color="red") # close, red, green, blue, yellow , orange, purple
Cheers