Swatches - Maple Help

# Online Help

###### All Products    Maple    MapleSim

ColorTools

 Swatches
 plot squares of color

 Calling Sequence Swatches(colors, opts)

Parameters

 colors - a list of colors in formats recognized by ColorTools or a Palette object

Options

 • rows= positive integer
 The number of rows in which to lay out the colors
 • gap= constant between 0 and 1
 The distance between color squares
 • borders=list
 A list of the two colors to use for the backgrounds of the plot
 • bottomup=true or false
 If true, the first color in the palette will appear in the bottom left corner instead of the top left.

Description

 • The Swatches command creates a plot of squares of the input colors.  The colors are laid out into a grid that is as close to square as possible by default. This can be overridden with the rows option.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $\mathrm{Swatches}\left(\left["Red","Green","Blue","Yellow"\right]\right)$
 > $\mathrm{Swatches}\left(\left["Red","Green","Blue","Yellow"\right],\mathrm{rows}=1,\mathrm{gap}=0.,\mathrm{borders}=\left["White","White"\right]\right)$
 > $\mathrm{Swatches}\left(\mathrm{GetPalette}\left("Executive"\right)\right)$

Compatibility

 • The ColorTools[Swatches] command was introduced in Maple 16.
 • For more information on Maple 16 changes, see Updates in Maple 16.
 • The bottomup option was introduced in Maple 2017.
 • For more information on Maple 2017 changes, see Updates in Maple 2017.

 See Also