Patchwork Color Palette
Description
Examples
The Patchwork plot palette is a collection of bright colors, originally designed to yield attractive maps. See for example the WorldMap object. It is designed for coloring collections of filled areas. There are ten colors in the palette.
ColorTools:-DisplayPalette("Patchwork",noextend);
1. Blue
2. RedOrange
3. BluePurple
4. Red
5. DarkBlue
6. Yellow
7. DarkGreen
8. DarkRed
9. Green
10. PaleBlue
You can reference colors in the palette by name or number in most commands that understand color names.
plot⁡x,x3,x=−1..1,color=Patchwork 2,Patchwork Blue
C ≔ ColorTools:-Color⁡Patchwork 10
ColorTools:-Color⁡RGB,0.41960784,0.72549020,0.94117647
You can make Patchwork the default palette in plots using setcolors
plots:-setcolors⁡Patchwork:
You can programatically access the colors using ColorTools commands
P ≔ ColorTools:-GetPalette⁡Patchwork
ColorTools:-Palette⁡moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,moduleColorTools:-Coloroptionobject;localcolorspace,coordinates,color_caption;end module,Blue,RedOrange,BluePurple,Red,DarkBlue,Yellow,DarkGreen,DarkRed,Green,PaleBlue,,palettename=Patchwork,palettetype=fill
P1
ColorTools:-Color⁡RGB,0.26666667,0.42352941,0.70196078,caption=Blue
n ≔ numcolors⁡P
n≔10
plot⁡seq⁡sin⁡x+i⁢Pin,i=1..n,x=0..2⁢Pi,axes=boxed,color=:-GetColors⁡P1..n,legend=:-GetColorNames⁡P1..n,numpoints=25,style=point,symbol=solidcircle
ColorTools algorithms will automatically generate new colors beyond the main 10 colors:
P20
ColorTools:-Color⁡RGB,0.9872334000817741,0.5649920999115376,0.3443216999204473
The Patchwork palette is designed for filled areas, but the Lookup command can provide slightly altered shades of its colors for use in coloring points or lines.
Lookup⁡P,1,shade=line
ColorTools:-Color⁡RGB,0.1478437,0.3118784,0.5959756
Lookup⁡P,1,shade=point
ColorTools:-Color⁡RGB,0.07536600,0.2501563,0.5402721
See Also
ColorTools
ColorTools[DisplayPalette]
ColorTools[Palette]
ColorTools[Palettes][Lookup]
plots[setcolors]
Download Help Document
What kind of issue would you like to report? (Optional)