Late night quick coding challenge. Read in all the pixels of the scrambled images, rudimentarily sort them, and then send them back out as images. This will give you a much better idea of what colors you are actually looking at, and can eyeball what the answers might be.
Code runs on both png and gif filetypes, so you can just download the images and go!
Here's France compared to Flag 1:
Here's Brazil compared to Flag 2:
Here's Namibia compared to Flag 3: