How to give shader a one per object parameter

I have multiple guys sharing a single material. I want to give each of thes guys their own color as a per object parameter. I can not set it as a material uniform since they all use the same material.

The vertex shader seems to know the matrix for every object, but can I send more information to it? How would I handle that?

You can set material parameter overrides on the spatials… which is essentially swapping out a material value at runtime.

Does it come with a performance cost?

Or more important: I want to limit the number of materials because as I understand it, are costly performance wise. What would be cheaper: 20 different materials with 20 different textures or 200 guys with an override for their tribe color?

…because it was sent as a material parameter.

If so then you are already paying it because material parameters are sent for each draw call.