Is there a way to assign a distinct "random" color to a mesh based on the string-value of one of its "Custom Properties"? I am most interested in having this color visible in the 3D viewport to distinguish objects based on their properties while editing a scene.
I'm not sure whether the solution should be based on shading or not. The viewport "solid mode" view with "random" color assignment is close to what I want except that it chooses a separate color for each object rather than for a group with the same property.
For example, supposing that I would have a large number of meshes each with a property "country" and I wanted each mesh with value "australia" to be one color, each with value "usa" to be another color, and so on.