title: How to get the color of pixel currently under mouse pointer
body: <p>I want to get the color of pixel which is currently under mouse pointer.</p>
  
  <p>I have come up with this code, but this does not give the exact position as Texture2d.GetPixel does not work with float.
  This code does give the color but it does not give the color of exact mouse position as i have to cast the values to integer since Texture2D.GetPixel cant handle float</p>
  
  <pre><code>Texture2D texture;
  public Color ColorBelowMouse;
  public Vector3 x;
  
  // Use this for initialization
  void Start () 
  {
      texture=gameObject.GetComponent&lt;GUITexture&gt;().texture as Texture2D;
  
  }
  
  // Update is called once per frame
  void Update () 
  {
      Debug.Log(texture.GetPixel((int) Input.mousePosition.x, (int) Input.mousePosition.y));
      ColorBelowMouse=texture.GetPixel( (int) Input.mousePosition.x, (int) Input.mousePosition.y);
  }
  </code></pre>
  
  <p>Please tell me how to get the color of the exact mouse position. </p>
  
  <p>If my approach is wrong, please tell me the correct one.</p>