stops
The standard multi-stop palette, read from the stops, colorA and colorB props.
stops(space: PropRef): Palette
Import paint from shaders/std and use paint.stops.
Declare stops: colorStopsPropConfig() plus colorA and colorB on the definition. When the user has set two or more stops the ramp uses them, otherwise it mixes colorA to colorB. Both mix in the color space named by the space prop (mark it compileTime).
Parameters
| Name | Type | Notes |
|---|---|---|
space | PropRef |
Example
paint: rampOver(dist.linear({from: p('start'), to: p('end'), angle: p('angle')}), stops(p('colorSpace')), {edges: p('edges')})
Tip. The prop names are fixed:
stops,colorA,colorB. Usepairwhen yours differ.
See also
pair— A palette of two color props, mixed in the color space named by thespaceprop.standardPalette— The color for a 0–1 value from the standard palette props:colorA,colorB,stops,colorSpace.
Used by
Blob, BlockNoise, BlueNoise, ConicGradient, CurlNoise, DiamondGradient, ErosionNoise, GaborNoise, LinearGradient, Obsidian, PerlinNoise, Plasma, RadialGradient, SimplexNoise, Swirl, Voronoi, Waveform, WaveletNoise