Hi, this was a closed source project so I can't share the code.
Just group your vertices into triangles and then have the three vertices of each triangle share the color that you want to fill it with. This will result in adjacent triangles having vertices with the same coordinates which sounds wasteful but AFAIK it's the only way to get around having your geometry lerp between colors.