moved color definitions to top of code