RGB Vertex Color Average

Hello everyone,

it seems quite simple in theory, but...

if I have a series of vertexes selected, how can I find out the average of all their vertex colors values ?

I am using "polyColorPerVertex -q -rgb" to determine their RGB values, but how can I put all of that together and get the average ?

I imagine I have to line up the R, the G and the B and average them... I could use a Matrix, but of course, the number of vertices selected changes every time, so would I have to create matrices on the fly ?

Any suggestions would be greatly appreciated !

Thanks

I have a UI that does this. Just use a for loop: For each vert selected, get the value, then add it's value to the previous one. when the loop's done, take the total, and divide by the number of verts selected. shazzam, color averaged.