title: How to change the color of a white sprite using HEX values?
body: <p>I have been trying to change the color of a white sprite using script.
  I have the HEX valve which I convert into RGB and try to change the color of the sprite.
  The color gets changed but it is not exactly what I require.
  It changes to some random color.
  Below is the code which I'm Trying, I can't understand where I'm going wrong.
  Please Help me out.
  Thank You.</p>
  
  <pre><code>    string tempColor;
      tempColor = "E2270A";
      Color m_NewColor;
      float m_Red, m_Green, m_Blue;
      m_Red = System.Convert.ToInt32 (tempColor.Substring (0, 2), 16);
      m_Green = System.Convert.ToInt32 (tempColor.Substring (2, 2), 16);
      m_Blue = System.Convert.ToInt32 (tempColor.Substring (4, 2), 16);
  
      m_NewColor = new Color (m_Red, m_Green, m_Blue);
      Animinstance.GetComponent&lt;SpriteRenderer&gt; ().color = m_NewColor;
  </code></pre>