Its a simple and pratice method to create a coloured id pass.
- append the id_pass NodeTree into your file
- set your material or objects id's for each id
- enable indexOB or IndexMA on Render Layers Properties
- Enable Composition Nodes
- Use the new id_pass group afer IndexOB or IndexMa output in Rander Layers node
- get your colored ID pass