📜  获取随机颜色 32 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.429000             🧑  作者: Mango

代码示例1
private Color32 GetRandomColour32()
{
    //using Color32
    return new Color32(
      (byte)UnityEngine.Random.Range(0, 255), //Red
      (byte)UnityEngine.Random.Range(0, 255), //Green
      (byte)UnityEngine.Random.Range(0, 255), //Blue
      255 //Alpha (transparency)
    );
}