NetLogo 7.0.0-beta2:

palette:scale-scheme

palette:scale-scheme scheme-type scheme-color number-of-classes number range1 range2

Reports an RGB color from the ColorBrewer scheme of type scheme-type with name scheme-color containing number-of-classes colors. The color is chosen using the proportionality of number in the range specified by range1 and range2.

When range1 is less than or equal to range2, the colors are ordered as in the ColorBrewer scheme. When range2 is less than range1, the color order is reversed.

Let min-range be the minimum of range1 and range2. If number is less or equal to than min-range, then the result is the same as if number was equal to min-range. This will be the first color in the color list if range1 is less than range2.

Let max-range be the maximum of range1 and range2. If number is greater than max-range, then the result is the same as if number was equal to max-range. This will be the last color in the color list if range1 is less than range2.

Example:

ask patches
[
  set pcolor palette:scale-scheme "Divergent" "Spectral" 8 pxcor min-pxcor max-pxcor
]

;; colors each patch with a color from the Color Brewer Schemes

Take me to the full Palette Extension Dictionary