Material color changing in Photon Multiplayer scenes

I want each player to choose a special color for themselves. I use material.SetColor (“_ Color”, color) to change color and change the material color of the prefab.

When I took the material color information in Local and started the multiplayer scene, I tried checking it with PhotonView.IsMine and applying that color. But whatever color each player chose, they saw the others as the same color.

Here’s my code:

void Start()
{
if (photonView.IsMine){
            photonView.RPC("SetColor", RpcTarget.All);
		}
}

[PunRPC]
 void SetColor()
 {
        
        Color playerColor = new Color(gameObject.materials[0].color.r, gameObject.materials[0].color.g, gameObject.materials[0].color.b);

        gameObject.materials[0].SetColor("_Color", playerColor);
    }

Does anyone know where I went wrong? I have tried most of the methods on the forums and have definitely been unable to figure it out for days.

Thank you in advance to those who can help

void Start()
{
if (photonView.IsMine)
{

                float r = gameObject.GetComponent<Renderer>().materials[0].color.r;
                float g = gameObject.GetComponent<Renderer>().materials[0].color.g;
                float b = gameObject.GetComponent<Renderer>().materials[0].color.b;

                photonView.RPC("SetColor", RpcTarget.All, r, g, b);
           
   }
 
 [PunRPC]
  void SetColor(float re, float gr, float ,bl)
  {
         Color c = new Color (re,gr,bl);
        gameObject.GetComponent<Renderer>().materials[0].color = c;

   }

did you figured it out ?