How do I pixel color search within a rectangle of pixels?

It looks like ImageMagick might have something that could work. I noticed that several people have mentioned it on this forum, so I thought I’d mention it.

Haven’t used it myself.