Element: graduation.blend_positions[ ]

Type

numeric[]

Description

The blend positions of a graduation determine where color transitions are applied across the area being filled.

Each position value is a factor of the area dimension being filled (in the direction of graduation) 0 through 1, e.g. 0 is the start of the graduation, 1 is the finish of the graduation, 0.5 is half way.

2-colors

For 2-color graduations, blend positions are typically combined with blend factors. Graduations with blend factors (and/or blend positions) are known as custom blends.

There can be a maximum of 32 positons (and factors), producing a maximum of 32 color transitions.

Unless blend factors are also defined, the colors at the transition positions are assumed to be start color, finish color, start color, finish color etc.

See graduation.blend_factors for some examples.

multi-colors

For graduations with more than 2 colors, the blend positions determine where one color changes to the next. There should be as many positions as there are colors defined, and the first position should be 0, and the last position should be 1.

Consider the following examples, with 5 colors and 5 positions:

Linear
Non-linear
Circular shape

The commands to create these graduations are as follows:

graduation mygrad,-rgb=<white.rgb,maroon.rgb,yellow.rgb,green.rgb, 75,75,75>,-pos=<0,0.3,0.6,0.8,1>
graduation mygrad,-rgb=<white.rgb,maroon.rgb,yellow.rgb,green.rgb, 75,75,75>,-pos=<0,0.3,0.6,0.8,1>,-sh=2

See Also

Commands:

graduation