CTAN Comprehensive TeX Archive Network

Directory graphics/metapost/contrib/macros/metapost-colorbrewer



An implementation of the colour palettes from http://colorbrewer2.org for

The Colorbrewer palettes are copyright (c) Cynthia Brewer, Mark Harrower and The Pennsylvania State University.

This implementation that makes them available for is copyright (c) 2018 Toby Thurston.

Toby Thurston – 18 Sept 2018


  • A Python script that reads "cb.csv" from https://github.com/axismaps/colorbrewer/ and creates a include-file that includes all the Colorbrewer definitions as colors (cmyk or rgb, as you please)
  • colorbrewer-cmyk.mp
  • colorbrewer-rgb.mp
  • colorbrewer-sampler.mp
Colorbrewer Sampler


(Assumes you are on osx, adapt as needed for windows, or linux).

and then look at metapost-colorbrewer/colorbrewer-sampler.mp for an example of how to use them. Once they are in your local texmf tree you just need to include them with "include colorbrewer-rgb" or "include colorbrewer-cmyk"


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Download the contents of this package in one zip archive (237.6k).

metapost-colorbrewer – An implementation of the colorbrewer2.org colours for

This package provides two include files that define all the colorbrewer2.org colours:

  • colorbrewer-cmyk.mp
  • colorbrewer-rgb.mp

The first defines all the colours as CMYK, the second as RGB. Use whichever one you prefer.

For an example of what you can do, and a list of all the names, have a look at colorbrewer-sampler.mp.

You can also see the names on http://colorbrewer2.org.

The package also includes the Python script used to generate the MP source from the colorbrewer project.

Version 2018-09-18
LicensesGNU General Public License, version 3 or newer
Copyright2018 Toby Thurston
MaintainerToby Thurston
Contained inTeX Live as metapost-colorbrewer
MiKTeX as metapost-colorbrewer
Topics use
Guest Book Sitemap Contact Contact Author