# SetColors(Color, Color)

> Set the line color at the start and at the end.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

> **Warning:**
>
> **Deprecated.** Use startColor, endColor or colorGradient instead.

```csharp
public void SetColors(Color start, Color end)
```

### Parameters

**** (\[Color]\(/engine/6000.7/script-reference/unityengine/color)): **** (\[Color]\(/engine/6000.7/script-reference/unityengine/color)):&#x20;

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Adds a lineRenderer to this transform and
    // makes the line renderer fade at the end.

    Color c1 = Color.white;
    Color c2 = new Color(1, 1, 1, 0);

    void Start()
    {
        LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
        lineRenderer.material = new Material(Shader.Find("Sprites/Default"));
        lineRenderer.SetColors(c1, c2);
    }
}
```
