You could identify the colors with the materials assigned. A simple trace from the camera in the viewing direction would hit the object and you can easily find out (material name, maybe, but a tag would be better) if it's "red" or "blue".
A limited strategy, as every model would have only one color. But, depending on the project, it could be sufficient.
↧