correctly parses a color code