How can I write a custom cutout diffuse shader that supports custom vertex colors?

I’m currently writing a voxel engine to get some practice in, and it’s been going well so far, with the exception of one thing. In order to do lighting that fits the voxel engine and feels better aesthetically, I need to be able to set the color values of individual vertices when I’m generating a voxel mesh. Unfortunately, none of the default Unity shaders (even some of the legacy ones) seem to support the coloring of vertices when generating a mesh from code. I’m currently using the “Legacy/Cutout Diffuse”, but I’m not sure how to modify it so that it supports custom vertex coloring. Is this even possible?

Of course - vertex colours of a mesh are passed in the input struct to a vertex shader using the COLOR semantic, as described at Unity - Manual: Providing vertex data to vertex programs