Get Vertex color value. (Vertex Paint)

I want to give my level exporter a vertex paint export as well after the UV coordinates and I’m not too familiar with Blender Python scripting. So my goal is to export light or paint values on of each vertex. So when I load the level in my game engine in OpenGL I can easily create low or simple looking shadows. My level file is just like a obj file. So It would work like this:

v   x y z
uv x y
c  r g b

]Thanks, Andrew.