pair
A palette of two color props, mixed in the color space named by the space prop.
pair(a: PropRef, b: PropRef, space: PropRef): Palette
Import paint from shaders/std and use paint.pair.
Mark the space prop compileTime. Field value 0 gives a, 1 gives b.
Parameters
| Name | Type | Notes |
|---|---|---|
a | PropRef | |
b | PropRef | |
space | PropRef |
Example
paint: rampOver(dist.radial({center: p('center'), radius: p('radius'), aspect: 1, skew: 0}), pair(p('colorA'), p('colorB'), p('colorSpace')))
See also
stops— The standard multi-stop palette, read from thestops,colorAandcolorBprops.standardPalette— The color for a 0–1 value from the standard palette props:colorA,colorB,stops,colorSpace.