Set Colors - Maple Help

Student

 SetColors
 set the colors of plot objects in the Student subpackages

 Calling Sequence SetColors(color1, color2, ...) SetColors(colors)

Parameters

 color1, color2, ... - (optional) valid colors colors - (optional) a collection of colors, either the name of a ColorTools:-Palette or a container that can be converted to a list of colors.

Description

 • The SetColors(color1, color2, ...) calling sequence sets the colors of the plot objects in the Student subpackages. SetColors affects plot objects displayed using visualization routines within the worksheet interface, as well as plot objects displayed in the interactive tutors. The given colors will replace the first colors in in the current list of colors, any further colors will remain unchanged.
 • The SetColors( colors ) calling sequence sets the entire list of current colors. If colors is the name of a known ColorTools Palette, the colors of that palette will be used. Otherwise, convert/list will be called on colors and if the result is a list of colors, that will replace the current colors. If there are fewer than 10 colors in colors, the list will repeated so the current colors list contains at least 10 colors.
 • If called with no arguments, a standard color selection Maplet application is displayed.
 • In all cases, SetColors returns a list of the current colors.
 • By default, the Student subpackages use the CVD color palette.
 • In applicable tutors, a Colors button changes the colors being used for that instance of the tutor.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\right):$

Change the colors using the SetColors Maplet application.

 > $\mathrm{SetColors}\left(\right)$

A new palette can be selected by name, replacing all colors

 > $\mathrm{SetColors}\left("Niagara"\right)$
 $\left[{"#78000E"}{,}{"#000E78"}{,}{"#4A7800"}{,}{"#3E578A"}{,}{"#780072"}{,}{"#00786A"}{,}{"#604191"}{,}{"#004A78"}{,}{"#784C00"}{,}{"#91414A"}{,}{"#3E738A"}{,}{"#78003B"}{,}{"#00783F"}{,}{"#914186"}{,}{"#510078"}{,}{"#777800"}\right]$ (1)

Or a sequence of colors can be give. Here replace just the first three colors:

 > $\mathrm{SetColors}\left("Black","Red","Blue"\right)$
 $\left[{"#000000"}{,}{"#FF0000"}{,}{"#0000FF"}{,}{"#3E578A"}{,}{"#780072"}{,}{"#00786A"}{,}{"#604191"}{,}{"#004A78"}{,}{"#784C00"}{,}{"#91414A"}{,}{"#3E738A"}{,}{"#78003B"}{,}{"#00783F"}{,}{"#914186"}{,}{"#510078"}{,}{"#777800"}\right]$ (2)
 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{Precalculus}\right]\right):$

Display a plot with the new set of default colors.

 > $\mathrm{RationalFunctionPlot}\left(\frac{3{x}^{2}+2x-1}{x+2}\right)$

A new palette can be selected by name, replacing all colors

 > $\mathrm{SetColors}\left("Spring"\right)$
 $\left[{"#0074CC"}{,}{"#CC0074"}{,}{"#74CC00"}{,}{"#00CCBE"}{,}{"#5800CC"}{,}{"#4B7EA6"}{,}{"#C1CC00"}{,}{"#CC004E"}{,}{"#0041CC"}{,}{"#4BA673"}{,}{"#CC7E00"}{,}{"#BE00CC"}{,}{"#00CC33"}{,}{"#00A7CC"}{,}{"#9BA64B"}{,}{"#4BA6A6"}\right]$ (3)
 > $\mathrm{RationalFunctionPlot}\left(\frac{3{x}^{2}+2x-1}{x+2}\right)$

A list of colors will replace the whole list of current colors

 > $L≔\mathrm{convert}\left(\mathrm{ColorTools}:-\mathrm{GetPalette}\left("Nautical"\right),'\mathrm{list}'\right)\left[1..10\right]$
 ${L}{≔}\left[{⟨}\colorbox[rgb]{0.2,0.301960784313725,0.392156862745098}{{RGB : Gray Blue}}{⟩}{,}{⟨}\colorbox[rgb]{0.631372549019608,0.0156862745098039,0.0431372549019608}{{RGB : Red}}{⟩}{,}{⟨}\colorbox[rgb]{0.2,0.2,0.2}{{RGB : Dark Gray}}{⟩}{,}{⟨}\colorbox[rgb]{0.305882352941176,0.388235294117647,0.2}{{RGB : Olive}}{⟩}{,}{⟨}\colorbox[rgb]{0.470588235294118,0.603921568627451,0.741176470588235}{RGB : Light Blue}{⟩}{,}{⟨}\colorbox[rgb]{0.4,0.4,0.4}{{RGB : Gray}}{⟩}{,}{⟨}\colorbox[rgb]{0.309803921568627,0.309803921568627,0.443137254901961}{{RGB : Gray Violet}}{⟩}{,}{⟨}\colorbox[rgb]{0.0666666666666667,0.631372549019608,0.0156862745098039}{{RGB : Dark Green}}{⟩}{,}{⟨}\colorbox[rgb]{0.0509803921568627,0.0156862745098039,0.631372549019608}{{RGB : Dark Blue}}{⟩}{,}{⟨}\colorbox[rgb]{0.741176470588235,0.494117647058824,0.470588235294118}{RGB : Pale Red}{⟩}\right]$ (4)
 > $\mathrm{SetColors}\left(L\right)$
 $\left[{"#334D64"}{,}{"#A1040B"}{,}{"#333333"}{,}{"#4E6333"}{,}{"#789ABD"}{,}{"#666666"}{,}{"#4F4F71"}{,}{"#11A104"}{,}{"#0D04A1"}{,}{"#BD7E78"}\right]$ (5)

If a list of few colors is given, they will be repeated so there are at least ten

 > $\mathrm{SetColors}\left(\left["Red","Blue","Green"\right]\right)$
 $\left[{"#FF0000"}{,}{"#0000FF"}{,}{"#008000"}{,}{"#FF0000"}{,}{"#0000FF"}{,}{"#008000"}{,}{"#FF0000"}{,}{"#0000FF"}{,}{"#008000"}{,}{"#FF0000"}{,}{"#0000FF"}{,}{"#008000"}\right]$ (6)

Compatibility

 • The colors parameter was introduced in Maple 2023.