What do the different missile colours mean

So i was just wondering if the different colours of the missiles actually mean anything or if its just for aesthetic

Just to give you visual cues to show they are different AFAIK.

They change to show they are an upgrade.

Stock ones have no coloring. The upgrade is red.
If there are 2 upgrades, first is red and second is yellow.
If there are 3 upgrades, it goes red, yellow, then green.

This color code simply distinguishes between different models of the same guidance type.

Typically, the colors—white, yellow, red, and green—indicate increasing levels of capability. But there are exceptions: the Japanese AAM-3, for example, is yellow though it’s more powerful than the green AIM-9M