Same mesh with different colors I have to display several versions of the same object, with only the color changing. My first approach was to duplicate the mesh and add a different material to each.

My problem is: when I want to modify the mesh, I have to do it on each object separately. I tried to have different objects with the same mesh, but the color seems to be linked to the mesh and not to the object.

Is there a way (even programmatically) to have the same mesh in different objects with different colors?

Additionnal info:

I'm using Cycles and my material is a node material in which there is only one changing color.
You have a couple options:
One material:
You can set a unique index per object in Properties &gt; Object &gt; Relations:

Using the Object info node, you can get this value in the node tree and use it to mix colors (or shaders) accordingly (also see Get &quot;Object Color&quot; property in Cycles).
Using three linked cubes (duplicated with AltD) with the same material as an example:

Note that this node setup is a lot cleaner and easier to manage when node groups are used.
Multiple materials:
By setting the material to link to that specific Object instead of it's data, which is shared by the other linked objects, you can have separate materials on separate objects which share the same mesh/data.
Just select Object in the menu to the right of the material selector: