title: Generating random color in Unity isn't working properly
body: <p>So i have a very strange bug i think.. I have a script where i generate a random color and assign it to the player, the thing is that the color is always white but when i look to the color panel in inspector it is showing a normal random color.Another fun thing is that when i change the color in inspector in play mode it actually changes<img src="https://i.stack.imgur.com/I1Pqv.png" alt="enter image description here" /></p>
  <pre><code>    float R = Random.Range(0, 226);
      float G = Random.Range(0, 226);
      float B = Random.Range(0, 226);
      ColorToBeGenerate = new Color(R, G, B);
      Player.GetComponent&lt;SpriteRenderer&gt;().color = ColorToBeGenerate;
  </code></pre>