generate a selection of intermediate colors - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : ColorTools : ColorTools/Gradient

ColorTools[Gradient] - generate a selection of intermediate colors

Calling Sequence

Gradient(color1..color2)

Parameters

color1,color2

-

colors in formats recognized by ColorTools

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");

G:=RGB : 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);

H:=RGB : 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);

See Also

ColorTools, ColorTools/ColorSpaces, ColorTools[Color]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam