How to use part of an image for a button

I am trying to create a region select type thing with a map of a country. Below is similar to the image I will be using. I was wondering how you would create each color(region) on the map do a different function, so basically make each color its own button. The image is currently in unity as a texture.


One solution is to switch based on the color at the position clicked. Use a form of Physics.Raycast() that takes a RaycastHit parameter. Use the textureCoord property in the RaycastHit to access the pixel of the texture hit. Execute appropriate code based on the color.

Note if your graphics are not pure colors like you have in the diagram above, you can put a simplified version of the map on top on using a separate plane with a very slight alpha.