Refactor color scheme code