---
title: "colorLadder3"
description: "A three-color blend: `a` to `b` by the first value, then on to `c` by the second."
group: "paint"
groupTitle: "Painting"
categoryId: "paint"
categorySlug: "paint"
categoryTitle: "Fields, palettes & ramps"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/fields.ts#L128"
---

# colorLadder3

A three-color blend: `a` to `b` by the first value, then on to `c` by the second.

```ts
colorLadder3(slots: {a: PropRef; b: PropRef; c: PropRef; space: PropRef}): (t1: Expr, t2: Expr, params: GpuFragmentParams) => Expr
```

Import `paint` from `shaders/std` and use `paint.colorLadder3`.

Returns a function you call with two 0–1 values and the params. Both mixes happen in the color space named by the `space` prop (mark it `compileTime`).

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{a: PropRef; b: PropRef; c: PropRef; space: PropRef}` |  |

## Example

```ts
paint: (params) => colorLadder3({a: p('colorA'), b: p('colorB'), c: p('colorC'), space: p('colorSpace')})(t1, t2, params)
```

## See also

- [`pair`](/docs/primitives/paint/pair) — A palette of two color props, mixed in the color space named by the `space` prop.
- [`quadBlend`](/docs/primitives/paint/quadblend) — A four-color blend on a square: `a` to `b` across the top, `c` to `d` across the bottom, then top to bottom.

## Used by

[Aurora](/docs/components/aurora), [Marble](/docs/components/marble)