Not sure if you mean this, but, referring to your previous post about the rainbow triangle, you basically do this:
glVertexAttribPointer(attPosition, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
glVertexAttribPointer(attColor, 4, GL_FLOAT, GL_FALSE, 0, warna);
with a different set of vertices and colors.