refactor color_to_value -- all tests passing