highlight sections in direction board

package com.example.image;

import android.os.Bundle;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.util.Log;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ImageView;
import android.widget.Toast;

public class MainActivity extends Activity implements OnTouchListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		
		ImageView topimage=(ImageView)findViewById(R.id.image_areas);
		
		topimage.setOnTouchListener(new OnTouchListener() {
			
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				 switch (event.getAction()) {
				 case MotionEvent.ACTION_DOWN:
					 float eventX = event.getX();
					   float eventY = event.getY();
					   float[] eventXY = new float[] {eventX, eventY};
					   
					   Matrix invertMatrix = new Matrix();
					   ((ImageView)v).getImageMatrix().invert(invertMatrix);
					   
					   invertMatrix.mapPoints(eventXY);
					   int x = Integer.valueOf((int)eventXY[0]);
					   int y = Integer.valueOf((int)eventXY[1]);
			            ImageView img=((ImageView)v);
			               Bitmap bitmap=((BitmapDrawable)img.getDrawable()).getBitmap();
			               if(x < 0){
			            	    x = 0;
			            	   }else if(x > bitmap.getWidth()-1){
			            	    x = bitmap.getWidth()-1;
			            	   }
			            	   
			            	   if(y < 0){
			            	    y = 0;
			            	   }else if(y > bitmap.getHeight()-1){
			            	    y = bitmap.getHeight()-1;
			            	   }
			               
			               
			               int pixel = bitmap.getPixel(x,y);
			               int redValue = Color.red(pixel);
			               int blueValue = Color.blue(pixel);
			               int greenValue = Color.green(pixel);
			               Log.e("x1", String.valueOf(Integer.toHexString(pixel)));
			               Log.e("x2", String.valueOf(blueValue));
			               Log.e("x3", String.valueOf(greenValue));
			               
			               String color=String.valueOf(Integer.toHexString(pixel));
			               if(color.equals("ffba0000")){
			            	   Toast.makeText(getApplicationContext(), "WOW!",
			            			   Toast.LENGTH_LONG).show();
			            	}
			               if(color.equals("ff244aaa")){
			            	   Toast.makeText(getApplicationContext(), "Hi!",
			            			   Toast.LENGTH_LONG).show();
			            	}
			               if(pixel == Color.GREEN){
			            	   Log.e("ggg", "Magenta");
			            	}
					 break;
				 }
              /* int x=0;
               int y=0;
               ImageView img=((ImageView)v);
               Bitmap bitmap=((BitmapDrawable)img.getDrawable()).getBitmap();
               int pixel = bitmap.getPixel(x,y);
               int redValue = Color.red(pixel);
               int blueValue = Color.blue(pixel);
               int greenValue = Color.green(pixel);*/
				return true;
			}
		});
		
		
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {
		// TODO Auto-generated method stub
		return false;
	}

	

}






<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/my_frame"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:background="#000000"
 >
<ImageView 
 android:id="@+id/image_areas"
 android:layout_width="fill_parent" 
 android:layout_height="fill_parent" 
 android:scaleType="fitCenter"

 android:src="@drawable/imagearea" 
 />
 <ImageView 
 android:id="@+id/image"
 android:layout_width="fill_parent" 
 android:layout_height="fill_parent" 
 android:scaleType="fitCenter"
 
 android:src="@drawable/direction_board" 
 />
 <ImageView 
 android:id="@+id/image"
 android:layout_width="fill_parent" 
 android:layout_height="fill_parent" 
 android:scaleType="fitCenter"
 
 android:src="@drawable/highlight" 
 />
  
 </FrameLayout> 
![highlight](https://f.cloud.github.com/assets/7008751/2470794/a6b6af90-b018-11e3-9c7a-b016e84dfe26.png)
![direction_board](https://f.cloud.github.com/assets/7008751/2470793/a6b450c4-b018-11e3-9c9f-7fe6f4e3a620.jpg)
![imagearea](https://f.cloud.github.com/assets/7008751/2470795/a6b9fccc-b018-11e3-98d6-fee4ef3d3146.png)