changing trail color unity code example
Example: change trail color in script
TrailRenderer myTrailRenderer = GetComponent<TrailRenderer>();
myTrailRenderer.material.color = myColor;
myTailRenderer.startColor = Color.white;
myTailRenderer.endColor = new Color (0.35f, 1f, 0.75f);