fix an issue with color math