colorLadder3

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

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

NameTypeNotes
slots{a: PropRef; b: PropRef; c: PropRef; space: PropRef}

Example

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

See also

  • pair — A palette of two color props, mixed in the color space named by the space prop.
  • 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, Marble