I tried to assign different random colors to instances based on [this answer](https://blender.stackexchange.com/a/254677/2952), but for some reason each triangle of my instancer mesh produces different color for the instances.

[![Instance Attribute colors vary depending on the face triangle the instances spawn from][1]][1]

Each face triangle of the mesh is producing different results. If using a ColorRamp it's easy to see that the position on the ramp gradient varies greatly from one tri to another. Ideally, the ColorRamp gradient position should fall randomly for each instance, with an equal likelihood of landing anywhere between values `0.0` and `1.0`.

Here's another example, with different mesh geometry, different Density Max value, and a standard grayscale ColorRamp (Emission Shader is used in this example, these are not shadows):

<img src="https://i.sstatic.net/tbHKA.png" width="340"/>

Why is this happening, and how can I get the distribution of my random colors to be uniform? Thanks.

[<img src="https://blend-exchange.com/embedImage.png?bid=7l12qyGj" />](https://blend-exchange.com/b/7l12qyGj/)


  [1]: https://i.sstatic.net/uK5Sc.png
  [2]: https://i.sstatic.net/tbHKA.png