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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Information : Updates : Maple 16 : ColorTools Package

ColorTools Package in Maple 16

 

The new ColorTools Package

Color Palettes

The new ColorTools Package

The new ColorTools package in Maple 16 allows you to use predefined or custom color palettes, work with different color spaces, and generate or manipulate colors with a variety of tools.

withColorTools;

AddPalette,Adjust,AnalogousSpread,Color,ColorDescription,ColorsFromImage,Convert,Darken,Desaturate,Distance,EvenSpread,ExpandPalette,GetColorNames,GetPalette,Gradient,GraySpread,HSVColorWheel,HexToRGB24,HexToString,HueSplit,HueSpread,KnownPalette,LCHColorWheel,Lighten,NameToRGB24,NearestNamedColor,NeutralSpread,Palette,PaletteNames,PlotColorToRGB24,RGB24ToHex,RGB24ToName,RGB24ToRGB,RGBGrid,RGBToRGB24,ReducePalette,RemovePalette,Saturate,SortPalette,SpatterPlot,SpatterPlot3d,Swatches,ToDisplayable,ToRGB24,WavelengthToColor

(1.1)

 

 

Color Palettes

You can use predefined color palettes or create your own.

GetPaletteSpring;

Palette Spring:BlueRoseYellowGreenBlueGreenVioletCobalt

(2.1)

GetPaletteHTML;

Palette HTML:BlackDimGrayGrayDarkGraySilverLightGrayGainsboroWhiteSmokeWhiteMaroonDarkRedRedFirebrickBrownIndianRedRosyBrownLightCoralSnowMistyRoseSalmonTomatoDarkSalmonCoralOrangeRedLightSalmonFeldsparSiennaSeashellChocolateSaddleBrownSandyBrownPeachPuffPeruLinenBisqueDarkOrangeBurlywoodTanAntiqueWhiteNavajoWhiteBlanchedAlmondPapayaWhipMoccasinOrangeWheatOldLaceFloralWhiteDarkGoldenrodGoldenrodCornsilkLightGoldenrodGoldKhakiLemonChiffonPaleGoldenrodDarkKhakiOliveYellowBeigeLightGoldenrodYellowLightYellowIvoryOliveDrabYellowGreenDarkOliveGreenGreenYellowChartreuseLawnGreenDarkGreenGreenForestGreenLimeGreenLimeDarkSeaGreenLightGreenPaleGreenHoneydewSeaGreenMediumSeaGreenSpringGreenMintCreamMediumSpringGreenMediumAquamarineAquamarineTurquoiseLightSeaGreenMediumTurquoiseDarkSlateGrayTealDarkCyanCyanPaleTurquoiseLightCyanAzureDarkTurquoiseCadetBluePowderBlueLightBlueDeepSkyBlueSkyBlueLightSkyBlueSteelBlueAliceBlueDodgerBlueLightSlateGraySlateGrayLightSteelBlueCornflowerBlueRoyalBlueNavyDarkBlueMediumBlueBlueMidnightBlueLavenderGhostWhiteSlateBlueLightSlateBlueDarkSlateBlueMediumSlateBlueMediumPurpleBlueVioletIndigoDarkOrchidDarkVioletMediumOrchidPurpleDarkFuchsiaFuchsiaVioletPlumThistleOrchidVioletRedMediumVioletRedDeepPinkHotPinkLavenderBlushPaleVioletRedCrimsonPinkLightPink

(2.2)

 

The colors can be viewed as swatches.

SwatchesGetPaletteNiagara;

 

Commands such as ColorTools:-AnalogousSpread or ColorTools:-EvenSpread make creating new palettes easy.

 

P PaletteAnalogousSpreadSeaGreen, 24

P:=Palette:YellowYellow 2Yellow 3Green YellowYellow GreenYellow Green 2Yellow Green 3GreenGreen 2Green 3Green 4Green 5Green 6Green 7Blue GreenBlue Green 2Green BlueGreen Blue 2Green Blue 3Green Blue 4Green Blue 5Green Blue 6BlueBlue 2

(2.3)

SwatchesP, rows=4;

 

Palettes created with the ColorTools package can be used with 2-d plots.

 

plots:-setcolorsP:

plotseqsinx+iPi20, i=1..20, x=0..2Pi, axes=boxed;

 plots:-setcolorsdefault:

 

Color Spaces

The ColorTools package allows you to work with different color spaces, such as the default RGB (Red Green Blue) space, the CMY (Cyan Magenta Yellow) space or the HSV (Hue Saturation Value) space. A full list is given in the ColorTools/ColorSpaces help page. 

Color0.4, 0.3, 0.8;

RGB : 0.4 0.3 0.8

(2.1.1)

ColorHSV, 0.5, 0.3,0.8;

HSV : 0.5 0.3 0.8

(2.1.2)

ColorXYZ, 0.5, 0.6, 0.4;

XYZ : 0.5 0.6 0.4

(2.1.3)

 

You can also view colors on the HSV color wheel or a grid of RGB colors with one color channel fixed at a specified value.

HSVColorWheelRed, Blue, Yellow, Green;

RGBGridred=0.3;

 

Tools for Manipulating Colors

The ColorTools package contains a large number of tools for generating and manipulating colors. Examples of a few are shown below.

ColorLavender, SaturateLavender, 3;

RGB : 0.902 0.902 0.98,RGB : 0.745 0.745 0.98

(2.2.1)

ColorTurquoise, LightenTurquoise,2;

RGB : 0.251 0.878 0.816,RGB : 0.286 1 0.929

(2.2.2)

GradientPink..Orange;

RGB : 1 0.753 0.796,RGB : 1 0.743 0.724,RGB : 1 0.734 0.651,RGB : 1 0.724 0.579,RGB : 1 0.714 0.507,RGB : 1 0.705 0.434,RGB : 1 0.695 0.362,RGB : 1 0.686 0.289,RGB : 1 0.676 0.217,RGB : 1 0.666 0.145,RGB : 1 0.657 0.0724,RGB : 1 0.647 0

(2.2.3)

NeutralSpreadViolet, 8;

RGB : 0.722 0.51 0.933,RGB : 0.792 0.51 0.933,RGB : 0.863 0.51 0.933,RGB : 0.933 0.51 0.933,RGB : 0.933 0.51 0.863,RGB : 0.933 0.51 0.792,RGB : 0.933 0.51 0.722,RGB : 0.933 0.51 0.651

(2.2.4)

 

 

See Also

ColorTools

plots:-setcolors