I sample image data for my color picker utility. Raycasting will effectively return all objects that were clicked on, regardless if they appear underneath another one.

So first, you need to extract the image color data.
Color[] Data;
SpriteRenderer SpriteRenderer;
public int Width { get { return SpriteRenderer.sprite.texture.width; } }
public int Height { get { return SpriteRenderer.sprite.texture.height; }
void Awake()
{
// Get renderer you want to probe
SpriteRenderer = GetComponent<SpriteRenderer> ();
// extract color data
Data = SpriteRenderer.sprite.texture.GetPixels();
}
Then on Touch or MouseDown, you would determine if the click is inside of your image (via a collider and raycast) and then determine what pixel you clicked on inside of your image:
if (Input.GetMouseButton (0)) {
// Get Mouse position - convert to world position
Vector3 screenPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
screenPos = new Vector2(screenPos.x, screenPos.y);
// Check if we clicked on our object
RaycastHit2D[] ray = Physics2D.RaycastAll(screenPos, Vector2.zero, 0.01f);
for (int i = 0; i < ray.Length; i++)
{
// You will want to tag the image you want to lookup
if (ray[i].collider.tag == "TAGNAME")
{
// Set click position to the gameobject area
screenPos -= ray[i].collider.gameObject.transform.position;
int x = (int)(screenPos.x * Width);
int y = (int)(screenPos.y * Height) + Height;
// Get color data
if (x > 0 && x < Width && y > 0 && y < Height)
{
Color = Data[y * Width + x];
}
break;
}
}
}
My picker is opened sourced, so if you want to further investigate this, check out https://github.com/jongallant/UnityColorPicker