Assuming you have a material assigned in a particle system:
ParticleSystemRenderer particleRend;
void Start()
{
particleRend = GetComponent<ParticleSystemRenderer>();
Material particleMat = particleRend.material;
particleMat.color = new Color(1,0,0);
}
You get the ParticleSystemRenderer in your particle, then change the material that assigned to it, or assign a new material.
If the material property doesn’t get changed, then it’s most likely different/non-standard name than assumed… In that case you have to find it by name: