Depending on your painting system...
A tilemap utilizing 1 pixel tile sizes is a good way to manipulate and access information about the state of any given pixel. You can make it invisible and just use it to record and check tile states.
Otherwise if you actually want to check the color of each pixel, you can use the drawing canvas plugin, take a snapshot, and loop through every pixel to check the snapshot RGBa on every pixel. Unless your paintable area is very small, I don't recommend this as a feasible solution, as it would probably be too resource intensive.