Cant Change Color of the Particle System

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class JumpParticleColor : MonoBehaviour {

    private ParticleSystem theParticleSystem;

	// Use this for initialization
	void Start () {
        theParticleSystem = GetComponent<ParticleSystem>();
        PlayerPrefs.SetFloat("JumpParticleColor", 0);
	}
	
	// Update is called once per frame
	void Update () {
		
        if (PlayerPrefs.GetFloat("JumpParticleColor")==0)
        {
            theParticleSystem.main.startColor = Color.red;

        }



	}
}

CANT MODIFY PARTICLE SISTEM. MAIN BECAUSE IS NOT A VARIABLE

Refer this official blog: Particle System Modules - FAQ | Unity Blog

You need to have a var to define the particle module first then access its functions. For example:

ParticleSystem ps;
ParticleSystem.MainModule main;
void Start(){
ps = GetComponent<ParticleSystem>();
main = ps.main;
main.startColor = new Color(1,0,0,1);
}