The problem is, theoretically at least, solved if you use MobileMe to sync rather tha syncing directly from your Mac, but at least for some people this doesn't seem to resolve the problem.
It currently looks like if you were a .Mac subscriber, and your calendars were already synced to .Mac, then you still get randomly assigned colours when the calendars sync to your iPhone from MobileMe. However interestingly, the calendar colours are correct inside the MobileMe web application. This recently suggested a fix to me...
Go to MobileMe and select each calendar in turn, hit the calendar actions button which is just to the right of the
Monthdrop-down at the top of the calendar. Select
Calendar Infoand you'll get a pop-up which has the calendar name a selector to choose the colour for the calendar. Re-select the correct colour, and hit
Okto save the colour choice. Now, after syncing with your iPhone, it'll show up with the correct colour. Even if the colour you just selected was the same colour you always had.
Irritating, but there you go...