How to color vertices of cube I am trying to color the vertex points of a octahedron and want to have control over how they blend into each other.
I am using a mapping node but am not able to achieve the desired result. 

The image below shows the desired effect, however it was created with lights.
It seems like your UV mapping is off; using a similar setup and a default cube, I'm getting this result:



You can also achieve what you're trying to do using vertex colors:



Also see: How can vertex paint be rendered?