Use the magic wand tool, which selects pixels of similar colour. Set it to 0 tolerance, no anti-aliasing, contiguous on, no all layers and click on the first blue stripe from the left. It should only select the blue stripe, but this is what it selects:
- selecting the white background works
- selecting the resulting black stripe in the 3rd image selects both black stripes, and all the white area
OH I'VE FIXED IT
While using the eyedropper tool I noticed that I set it to 3×3 previously. Setting it back to point fixed the problem.
Magic wand areas are affected by the sample size defined in eyedropper tool. Is this a bug?