Change startcolor of particle system through script

I have 2 scripts, in one of which I have 2 color variables:

public Color color;
public Color sparkColor;

In the other script, I have a function where I want to change the startcolor of a particle system to the given colors:

void ChangeColor()
{
    particleSystem.GetComponent<ParticleSystem>().startcolor = otherScript.color;
    particleSystem2.GetComponent<ParticleSystem>().startcolor = otherScript.sparkColor;
}

The problem is, when I do this the particle system shuts off.
I tried changing the function to one of the preset colors (startcolor = Color.red) and this worked. But how do I make it so I can change it to a color I choose?

Apparently the alpha was all the way down, no idea why - but it was. Turning the alpha up again fixed it! :smiley:

  • Thanks to @mj321 for the answer, and thanks to glantucan for trying to help :smiley: