The formula generator helps you build color coded lists or calendars in SharePoint 2007.
1/ Fill out the form. Based on your choices, the formulas are automatically updated at the bottom of the form.
2/ Paste the formulas in calculated columns in your list.
3/ Get the script available in the Downloads page and add it to the page, under your list.
See this article for detailed explanations. And if you need more than 7 different colors, this other article will guide you.