palette:scheme-colors
palette:scheme-colors scheme-type scheme-color number-of-classes
Reports a list of RGB colors using ColorBrewer scheme of type scheme-type with name scheme-color containing number-of-classes colors. Scheme types are “Sequential,” “Divergent” and “Qualitative.” The choice of scheme names depends on the scheme type and includes “Reds”, “Spectral” and “Set1”. The minimum number of colors is 3 and a maximum is between 8 and 12 depending on the color scheme. For more information go to http://www.colorbrewer.org.
Example:
show palette:scheme-colors "Divergent" "Spectral" 3
=> [[252 141 89] [255 255 191] [153 213 148]]
; The scheme-colors primitive can be used with the scale-gradient primitive.
ask patches
[set pcolor palette:scale-gradient palette:scheme-colors "Divergent" "Spectral" 9 pxcor min-pxcor max-pxcor]
Take me to the full Palette Extension Dictionary