moved color related code to seperate file