For 2D, some steps:
1) Determine your representative pixels, store color, x pos and y pos for each somewhere, an array for example.
2) Take an screenshot as bitmap using something like
this
3) Use
Fastpix (submitted by boops boops to the Codebank) for fast pixel processing. With this you'll create a loop checking each pixel in the screenshot bitmap, when you find the first see if the second is also in position and so on, if you find all of them then you found your bitmap, if not then continue looping.
Assume your 1st representative pixel is at X=40 / Y=20, then you know that moving 40 towards LEFT and 20 towards TOP you'll find the first point (top-left corner) for your image found in the screen, and if you need the center it will be:
X = X pos + YourImageWidth / 2
Y = Y pos + YourImageHeight / 2