Imgix APIsRendering APIStylizeGradient Map Stops

Gradient Map Stops

gradient-map-stops

The gradient-map-stops parameter sets where each gradient-map color sits on the shadow-to-highlight range. Without it, the colors are spaced evenly.

Pass one position per color, from 0 (the darkest pixels) to 100 (the brightest), separated by commas. Positions must never decrease. Two neighbors at the same position produce a hard edge between the colors rather than a blend, which is how you posterize an image into flat bands.

A list whose length does not match the color count, whose positions decrease, or whose values fall outside 0–100 is ignored, and the colors are spaced evenly instead.

Evenly spaced: stops at 0, 50 and 100
sandbox-demo
gradient-map-stops=0,20,100 pushes the pink into the shadows
sandbox-demo

Repeating a position gives a hard-edged, two-tone result.

gradient-map-stops=0,50,50,100 posterizes to two flat tones
sandbox-demo