Object colors to single layers

Hi, I have a previously imported geometry that contains all objects in the same default Layer 01. The displayed colors are, however, different. Now, I would like to put all the objects with the same “Display Color” in the same Layer. I am looking for a script, that does this automatically for each color. Who can give me a hint?

See this thread:

Fantastic. It works, thank you!