I see, the command does work for Object display color, but each object needs to be in a separate layer.
I found the script you need here. (VB language)
Set Material Colors from Object Colors.rvb (1.5 KB)
To run the script:
Command: Loadscript/ Then select the file I just attached.
Command: Runscript