There is not an option or method to painting to restricting paint in the 2d UV/Image editor as it is in the 3d view. For this reason, it is much easier to use the face selection masking in the 3d view with the use of the L key to select the linked island faces, and then paint in your solid color there.
(This is the main reason I got into making my early versions of EZ Draw addon that was originally the Artist Paint Panel addon - I had worked out a way to use curves converted to mesh and project to uv through the camera view on an image plane to use as a masking object. Spirou4D spent a lot of work fixing my mistakes and we got a working grease pencil mask as well, and this was my work around for not being able to mask or limit paint in the 2d view.)
I can recommend that you look at the Options tab and the Fill tool - turn up the fill tool to full strength and turn off the Occlude, Cull and Normal so that your brush will go all the way through the mesh. Use the Face Selection masking and drop in the base colors where you want, and then after you can then turn the occlude and other options back on so that you can go back to regular projection.
After you do, you can come back to paint with textures and brush masks/mask tool painting to rework those areas, and I think you might be able to save a copy of the flat colors as an ID image for use in the compositor, though I haven't done much experimentation with that.
Also: Select a single face in the area you want to paint in 3d view, and then press Shift Numpad 7 to align to top view and then you can quickly set your paint view without too much trouble.