Change a single vertex color after mesh is created?

for example, I’ve created a simple mesh with six vertices two triangles, and colored each vertex white at the start, and provided a vertex shader on the object that renders the mesh.

It works fine.

However, if I want to change the color of a triangle, say, defined by vertices with indexes 0, 1, and 2, at runtime after the mesh has been initially created and colored:

myMesh.colors[0] = myNewColor;
myMesh.colors[1] = myNewColor;
myMesh.colors[2] = myNewColor;

(and myNewColor debugs to: RGBA(0.496, 0.647, 0.476, 0.000)

the new color doesn’t stick - if I debug the vertices immediately after the obove statements, each vertex still has the old white color.

Is there something I am missing? No where to I see in the docs that mesh.colors is read only or anything… and I;m not getting any error codes…

Thanks for your help in advance

I figured it out - mesh.color must immutable, though nowhere in the documentation does it state this. you have to make a copy of the array, modify the copy and then assign the copy to mesh.colors