If your defined vertex format takes a colour value you can use this function to add that data to the vertex being defined for the current primitive. The function needs a buffer to store the data in and will take either a colour constant, or a hex value (using the standard GameMaker Studio 2 format of BGR, eg: $FF0000 for blue) as well as an alpha value from 0 (transparent) to 1 (fully opaque).
vertex_colour(buffer, colour, alpha);
|buffer||The buffer to write the information to.|
|colour||The colour for this vertex (can be a constant or a hex value).|
|alpha||The alpha value for the vertex (from 0 to 1).|
vertex_colour(b, c_white, 1);
The above code will set the vertex being defined to be white with an alpha value of 1.