CoolWarmPair - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ColorTools

  

CoolWarmPair

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

CoolWarmPair( palette )

Parameters

palette

-

palette name as a string (see ColorCollections), a palette object (see Palette) or a list of colors

Options

• 

shade : a shade modifier passed to the color lookup if palette name or object is given

• 

paletteonly : if given, both colors are chosen from the palette instead of one of them being generated

Description

• 

CoolWarmPair returns a list of two colors that can be used for a "cool" to "warm" gradient (or light to dark in the case of grayscale). One of the colors returned is always the first color from the palette provided, and the other color is a computed contrasting color.

• 

An exception is made for the case of the CVD palettes, in which case the return is always the first two colors of those palettes.

Examples

Here are the coolwarm pairs for all the built-in plot palettes.

plotpalettesselectp:−GetPaletteTypeColorTools:−GetPalettepinfill,line,ColorTools:-PaletteNames

plotpalettesBright,Dalton,Executive,Mono,Nautical,Niagara,Patchwork,Spring,CVD,CVD2,CVD3

(1)

CWpairsseqp,ColorTools:-CoolWarmPairp,pinplotpalettes

CWpairsBright,RGB : 0.2 0.4 0.8,RGB : 0.898 0.331 0.313,Dalton,RGB : 0.337 0.706 0.914,RGB : 0.796 0.324 0.484,Executive,RGB : 0.271 0.451 0.655,RGB : 0.847 0.427 0.464,Mono,Gs : 0.597,Gs : 0.18,Nautical,RGB : 0.2 0.302 0.392,RGB : 0.613 0.362 0.403,Niagara,RGB : 0.229 0.403 0.782,RGB : 0.471 0 0.0549,Patchwork,RGB : 0.267 0.424 0.702,RGB : 0.862 0.394 0.38,Spring,RGB : 0 0.455 0.8,RGB : 0.93 0.342 0.421,CVD,RGB : 0 0.353 0.784,RGB : 0.98 0.471 0.314,CVD2,RGB : 0 0.431 0.51,RGB : 0.941 0.941 0.196,CVD3,RGB : 0 0.431 0.51,RGB : 0.98 0.471 0.314

(2)

DocumentTools:-TabulatePalette Name,Cool,Warm,maprr1,\n,\n,CWpairs,`=`fillcolor,M,i,jifelsei=1,LightGrey,ifelsej=1,White,ColorTools:−RGB24ToHex:−ToRGB24CWpairsi1j:

Palette Name

Cool

Warm

Bright



Dalton



Executive



Mono



Nautical



Niagara



Patchwork



Spring



CVD



CVD2



CVD3



 

Compatibility

• 

The ColorTools:-CoolWarmPair command was introduced in Maple 2023.

• 

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

See Also

ColorCollections

ColorTools