| 1 |
# metapost-colorbrewer |
| 2 |
|
| 3 |
An implementation of the colour palettes from http://colorbrewer2.org for Metapost |
| 4 |
|
| 5 |
The Colorbrewer palettes are copyright (c) Cynthia Brewer, Mark Harrower and The Pennsylvania State University. |
| 6 |
|
| 7 |
This implementation that makes them available for Metapost is copyright (c) 2018 Toby Thurston. |
| 8 |
|
| 9 |
Toby Thurston -- 18 Sept 2018 |
| 10 |
|
| 11 |
## Provides |
| 12 |
|
| 13 |
- A Python script that reads "cb.csv" from https://github.com/axismaps/colorbrewer/ |
| 14 |
and creates a Metapost include-file that includes all the Colorbrewer definitions as |
| 15 |
Metapost colors (cmyk or rgb, as you please) |
| 16 |
|
| 17 |
- colorbrewer-cmyk.mp |
| 18 |
- colorbrewer-rgb.mp |
| 19 |
- colorbrewer-sampler.mp |
| 20 |
|
| 21 |
 |
| 22 |
|
| 23 |
## Usage |
| 24 |
|
| 25 |
(Assumes you are on osx, adapt as needed for windows, or linux). |
| 26 |
|
| 27 |
- git clone http://github.com/thruston/metapost-colorbrewer |
| 28 |
- mkdir -p ~/Library/texmf/metapost |
| 29 |
- cp metapost-colorbrewer/colorbrewer-cmyk.mp ~/Library/texmf/metapost |
| 30 |
- cp metapost-colorbrewer/colorbrewer-rgb.mp ~/Library/texmf/metapost |
| 31 |
|
| 32 |
and then look at metapost-colorbrewer/colorbrewer-sampler.mp for an example of |
| 33 |
how to use them. Once they are in your local texmf tree you just need to include |
| 34 |
them with "include colorbrewer-rgb" or "include colorbrewer-cmyk" |
| 35 |
|
| 36 |
## Licence |
| 37 |
|
| 38 |
This program is free software: you can redistribute it and/or modify |
| 39 |
it under the terms of the GNU General Public License as published by |
| 40 |
the Free Software Foundation, either version 3 of the License, or |
| 41 |
(at your option) any later version. |
| 42 |
|
| 43 |
This program is distributed in the hope that it will be useful, |
| 44 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 45 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 46 |
GNU General Public License for more details. |
| 47 |
|
| 48 |
You should have received a copy of the GNU General Public License |
| 49 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |