image thumbnail

cbrewer : colorbrewer schemes for Matlab

version (85.6 KB) by Charles
This function loads colormaps based on the color brewer schemes (


Updated 18 Sep 2015

View License

This function produces a colorbrewer table (rgb data) for a given type, name and number of colors of the colorbrewer tables. For more information on 'colorbrewer', please visit:

The tables were generated from an MS-Excel file provided on the website
This function also allows to use a variable number of colors for each colortable by interpolating the RGB indices
Based on the original data, there is only a certain number of colors available for each color scheme. When 'ncol' is larger then the maximum number of colors originally given, an interpolation routine is called (interp1) to produce an "extended" colormap.

To see the various colormaps available according to their types and names, simply call: cbrewer()
This product includes color specifications and designs developed by Cynthia Brewer (

Cite As

Charles (2022). cbrewer : colorbrewer schemes for Matlab (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!