I'm working with a json response that contains various vehicle objects, each with a hexcode value representing the color of the vehicle:
[ { "name":"Ford", "hexCode": "4B1A1F"},
{ "name":"BMW", "hexCode": "FFFFFF"},
{ "name":"Fiat", "hexCode":"000000"}
]
My goal is to determine which hexcode corresponds to the darkest color among them. Since not all manufacturers use #000000 for black, I need to find a way to identify the darkest color.
Is there a solution to achieve this using regex or JavaScript?