Gradient - Maple Help

Online Help

All Products    Maple    MapleSim


ColorTools

  

Gradient

  

generate a selection of intermediate colors

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Gradient(color1..color2)

Parameters

color1,color2

-

colors in formats recognized by ColorTools

Options

• 

number=nonnegint

  

the number of intermediate colors to compute (default is 10)

• 

space=string

  

the color space in which to compute the intermediate colors. By default this is inferred from the colors spaces of the input.

• 

best

  

if this keyword is given, a heuristic is used to get a well-spaced set of colors

• 

displayable

  

if this keyword is given, then each output color will be displayable

Description

• 

The Gradient command computes a number of intermediate colors that transition between the two colors in the input range.

Examples

with(ColorTools):

G := Gradient("Red".."Blue");

GRGB : 1 0 0,RGB : 0.909 0 0.0909,RGB : 0.818 0 0.182,RGB : 0.727 0 0.273,RGB : 0.636 0 0.364,RGB : 0.545 0 0.455,RGB : 0.455 0 0.545,RGB : 0.364 0 0.636,RGB : 0.273 0 0.727,RGB : 0.182 0 0.818,RGB : 0.0909 0 0.909,RGB : 0 0 1

(1)

H := Gradient("Red".."Blue", best);

HRGB : 1 0 0,RGB : 0.967 0 0.176,RGB : 0.933 0 0.27,RGB : 0.896 0 0.351,RGB : 0.857 0 0.429,RGB : 0.813 0 0.505,RGB : 0.762 0 0.583,RGB : 0.703 0 0.661,RGB : 0.63 0 0.742,RGB : 0.536 0 0.825,RGB : 0.397 0 0.911,RGB : 0 0 1

(2)

Swatches([G[], H[]], rows=2);

Compatibility

• 

The ColorTools[Gradient] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

ColorTools

ColorTools/ColorSpaces

ColorTools[AnalogousSpread]

ColorTools[Color]

ColorTools[EvenSpread]

ColorTools[GraySpread]

ColorTools[HueSpread]

ColorTools[NeutralSpread]