# Color Interpolators

## Linear

The `LinearColorInterpolator` is a generalised linear interpolator where you specify the two colours to interpolate between.

![](https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeeySzC9nnDrDOoC8wV%2F-Meez0jkghK71OdZzzA5%2FDrawLinearBlueRed.png?alt=media\&token=ca066131-a791-4551-9364-7e0c942a1f81)

### Options

| Property | Type  | Description         |
| -------- | ----- | ------------------- |
| Start    | Color | Color if value is 0 |
| End      | Color | Color if value is 1 |

## Greyscale

The `GreyscaleColorInterpolator` is a common linear interpolator from Black -> While

![](https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeeySzC9nnDrDOoC8wV%2F-Meez-Edymm-UyZPye0y%2FDrawGreyscale.png?alt=media\&token=10929c13-6ddb-4ebb-a7ef-6d29af766641)

```csharp
public class GreyscaleInterpolator : LinearColorInterpolator, IColorInterpolator
```

### Options

| Property | Type | Description                                 |
| -------- | ---- | ------------------------------------------- |
| Reverse  | bool | If true, starts from white instead of black |

## Gold

A custom interpolator which emphasises the mid-range, going from Blue -> Yellow -> Red

![](https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeeySzC9nnDrDOoC8wV%2F-MeeyxRncZnYhEXRJTV8%2FDrawGold.png?alt=media\&token=87127956-9d56-46a4-85d8-f3cfefa083a0)

### Channels

| Channel | Formula                                     | Graph                                                                                                                                                                                                                                                                       |
| ------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Red     | $$255x + 127(1 - 2|\frac{1}{2} - x|)$$      | <img src="https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeWR4epu4dSokN5M4aF%2F-MeWSXwy5FcSNbsA7tKw%2Fgold_red2.png?alt=media&#x26;token=6b70fb9b-2cd3-4c7b-a5bd-a636a9c3d7b8" alt="" data-size="original">        |
| Green   | $$127(1 - 2|\frac{1}{2} - x|)$$             | <img src="https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeWR4epu4dSokN5M4aF%2F-MeWSHQCEtZ_Gu-127nc%2Fgold_blue%20(2).png?alt=media&#x26;token=b47b462a-78cd-4da8-8871-22d459a83ab9" alt="" data-size="original">  |
| Blue    | $$255(1 - x) - 127(1 - 2|\frac{1}{2}-x|)$$  |  <img src="https://218903290-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdM8iXEiSa6vIC3EFqT%2F-MeWR4epu4dSokN5M4aF%2F-MeWSHQCEtZ_Gu-127nc%2Fgold_blue%20(2).png?alt=media&#x26;token=b47b462a-78cd-4da8-8871-22d459a83ab9" alt="" data-size="original"> |

### Options

_None_
