# Evaluate

> Manually query the gradient to calculate colors based on what mode it is in.

## Definition

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

## Evaluate(float)

Manually query the gradient to calculate colors based on what mode it is in.

```csharp
public Color Evaluate(float time)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Normalized time (in the range 0 - 1, where 1 represents 100%) at which to evaluate the gradient. This is valid when [ParticleSystem.MinMaxGradient.mode](/engine/6000.5/script-reference/unityengine/particlesystem/minmaxgradient/mode.md) is set to [ParticleSystemGradientMode.Gradient](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/gradient.md) or [ParticleSystemGradientMode.TwoGradients](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/twogradients.md).

### Returns

| Type                                                          | Description                      |
| ------------------------------------------------------------- | -------------------------------- |
| [Color](/engine/6000.5/script-reference/unityengine/color.md) | Calculated gradient/color value. |

### Remarks

This automatically clamps the time and lerpFactor properties between 0 and 1.

## Evaluate(float, float)

Manually query the gradient to calculate colors based on what mode it is in.

```csharp
public Color Evaluate(float time, float lerpFactor)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Normalized time (in the range 0 - 1, where 1 represents 100%) at which to evaluate the gradient. This is valid when [ParticleSystem.MinMaxGradient.mode](/engine/6000.5/script-reference/unityengine/particlesystem/minmaxgradient/mode.md) is set to [ParticleSystemGradientMode.Gradient](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/gradient.md) or [ParticleSystemGradientMode.TwoGradients](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/twogradients.md).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Blend between the two gradients/colors (Valid when [ParticleSystem.MinMaxGradient.mode](/engine/6000.5/script-reference/unityengine/particlesystem/minmaxgradient/mode.md) is set to [ParticleSystemGradientMode.TwoColors](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/twocolors.md) or [ParticleSystemGradientMode.TwoGradients](/engine/6000.5/script-reference/unityengine/particlesystemgradientmode/twogradients.md)).

### Returns

| Type                                                          | Description                      |
| ------------------------------------------------------------- | -------------------------------- |
| [Color](/engine/6000.5/script-reference/unityengine/color.md) | Calculated gradient/color value. |

### Remarks

This automatically clamps the time and lerpFactor properties between 0 and 1.
