I have updated the Brewer color tables that I posted last fall. The download includes MG_LOADCT
and MG_XLOADCT
, which are wrappers around LOADCT
and XLOADCT
that use the Brewer color tables instead of the default color tables.
The update fixes the qualitative color tables. These color tables are for labeling, so they contain 3 to 12 colors instead of a full set of 256 colors. The qualitative color tables each have multiple versions included, depending on how many colors are needed. For example, “Pastel1” has versions with 3, 4, 5, 6, 7, 8, or 9 colors.
In total, there are 18 sequential, 9 diverging, and 58 qualitative color tables (of 8 different styles). The order of the tables (sequential first, then the diverging, and then ending with all the variations of the qualitative) was also changed to match the Brewer order instead of the previous alphabetical listing. Here’s a list of all the tables:
- YlGn (Sequential)
- YlGnBu (Sequential)
- GnBu (Sequential)
- BuGn (Sequential)
- PuBuGn (Sequential)
- PuBu (Sequential)
- BuPu (Sequential)
- RdPu (Sequential)
- PuRd (Sequential)
- OrRd (Sequential)
- YlOrRd (Sequential)
- YlOrBr (Sequential)
- Purples (Sequential)
- Blues (Sequential)
- Greens (Sequential)
- Oranges (Sequential)
- Reds (Sequential)
- Greys (Sequential)
- PuOr(Diverging)
- BrBG(Diverging)
- PRGn(Diverging)
- PiYG(Diverging)
- RdBu(Diverging)
- RdGy(Diverging)
- RdYlBu(Diverging)
- Spectral(Diverging)
- RdYlGn(Diverging)
- Set3 (Qualitative) – 3 colors
- Set3 (Qualitative) – 4 colors
- Set3 (Qualitative) – 5 colors
- Set3 (Qualitative) – 6 colors
- Set3 (Qualitative) – 7 colors
- Set3 (Qualitative) – 8 colors
- Set3 (Qualitative) – 9 colors
- Set3 (Qualitative) – 10 colors
- Set3 (Qualitative) – 11 colors
- Set3 (Qualitative) – 12 colors
- Pastel1 (Qualitative) – 3 colors
- Pastel1 (Qualitative) – 4 colors
- Pastel1 (Qualitative) – 5 colors
- Pastel1 (Qualitative) – 6 colors
- Pastel1 (Qualitative) – 7 colors
- Pastel1 (Qualitative) – 8 colors
- Pastel1 (Qualitative) – 9 colors
- Set1 (Qualitative) – 3 colors
- Set1 (Qualitative) – 4 colors
- Set1 (Qualitative) – 5 colors
- Set1 (Qualitative) – 6 colors
- Set1 (Qualitative) – 7 colors
- Set1 (Qualitative) – 8 colors
- Set1 (Qualitative) – 9 colors
- Pastel2 (Qualitative) – 3 colors
- Pastel2 (Qualitative) – 4 colors
- Pastel2 (Qualitative) – 5 colors
- Pastel2 (Qualitative) – 6 colors
- Pastel2 (Qualitative) – 7 colors
- Pastel2 (Qualitative) – 8 colors
- Set2 (Qualitative) – 3 colors
- Set2 (Qualitative) – 4 colors
- Set2 (Qualitative) – 5 colors
- Set2 (Qualitative) – 6 colors
- Set2 (Qualitative) – 7 colors
- Set2 (Qualitative) – 8 colors
- Dark2 (Qualitative) – 3 colors
- Dark2 (Qualitative) – 4 colors
- Dark2 (Qualitative) – 5 colors
- Dark2 (Qualitative) – 6 colors
- Dark2 (Qualitative) – 7 colors
- Dark2 (Qualitative) – 8 colors
- Paired (Qualitative) – 3 colors
- Paired (Qualitative) – 4 colors
- Paired (Qualitative) – 5 colors
- Paired (Qualitative) – 6 colors
- Paired (Qualitative) – 7 colors
- Paired (Qualitative) – 8 colors
- Paired (Qualitative) – 9 colors
- Paired (Qualitative) – 10 colors
- Paired (Qualitative) – 11 colors
- Paired (Qualitative) – 12 colors
- Accent (Qualitative) – 3 colors
- Accent (Qualitative) – 4 colors
- Accent (Qualitative) – 5 colors
- Accent (Qualitative) – 6 colors
- Accent (Qualitative) – 7 colors
- Accent (Qualitative) – 8 colors
February 21st, 2008 at 11:22 am
[…] I updated the color tables to fix problems with the qualitative color tables and added new routines to access […]
April 19th, 2008 at 7:47 am
Thanks a lot for those. I have thought using those color tables since I saw the Brewer article in EOS, but never implemented more than one in my IDL codes.
I have a little concern about the interpolation to 256 colors you used to produce the tbl file. The diverging color tables seem a little bit off-center:
you expect to have a clear neutral middle color (even though not in the table itself), but in the RdBu for example the 121-127 indices seem to be on the “blue side”.
No too much of an issue when loading very few or a lot of colors, but may bother some users loading 20-40 colors?
IDL> loadct, 22, file=file_which(‘brewer.tbl’)
% LOADCT: Loading table RdBu(Diverging)
IDL> cindex
IDL> loadct, 22, file=file_which(‘brewer.tbl’), ncolo=16
% LOADCT: Loading table RdBu(Diverging)
IDL> cindex
IDL> loadct, 22, file=file_which(‘brewer.tbl’), ncolo=64
% LOADCT: Loading table RdBu(Diverging)
IDL> cindex
April 19th, 2008 at 10:19 pm
I’ll take a look at that.
My most recent version has different values for the qualitative color tables since it seemed silly to have a separate color table for each number of colors (since the 7 color version is exactly the same first 6 colors in the color table). It also didn’t seem worthwhile to interpolate them to take up all 256 indices, now they just use the actual needed indices.
April 23rd, 2008 at 2:57 pm
By plotting R,G and B vectors, I found that the diverging tables are centered on 117. First half is index 0-116 and second half is 117-233. They basically saturate after index 233.
So I just load the 256 colors and use only the first 233 colors.
May 22nd, 2008 at 4:05 pm
[…] made some fixes to the Brewer color tables addressing the issues reported in the comments of the last update by Philippe Le Sage. The update includes the […]