Color of the marker to be read from a dictionary

That’s probably because the order of keys and values in a dictionary is not guaranteed. Judging by your example it’s unclear what you need the keys for, but the secret is to always iterate over a predefined vector of keys to get the associated values in the same order.