Repository: python-visualization/branca

Issue:
Question about color support.
For Qualitative schemes, restrict number of colors to 6?

Is the any solution to support more color? as the Paired has 12 kinds of colors.

Discussion:
nanodan: Okay this is good to go - review and let me know!
ocefpaf: @nanodan note that @BibMartin is quite busy with the day job, so if he cannot review this in the next few days please ping me again and I'll merge this.
nanodan: @ocefpaf I'll check in on the weekend and ping you if still outstanding.
nanodan: @ocefpaf did you want to merge this?

Patch:
diff --git a/branca/_cnames.json b/branca/_cnames.json
new file mode 100644
index 0000000..6baa3da
--- /dev/null
+++ b/branca/_cnames.json
@@ -0,0 +1,1 @@
+{"indigo": "#4B0082", "gold": "#FFD700", "hotpink": "#FF69B4", "firebrick": "#B22222", "indianred": "#CD5C5C", "sage": "#87AE73", "yellow": "#FFFF00", "mistyrose": "#FFE4E1", "darkolivegreen": "#556B2F", "olive": "#808000", "darkseagreen": "#8FBC8F", "pink": "#FFC0CB", "tomato": "#FF6347", "lightcoral": "#F08080", "orangered": "#FF4500", "navajowhite": "#FFDEAD", "lime": "#00FF00", "palegreen": "#98FB98", "greenyellow": "#ADFF2F", "burlywood": "#DEB887", "seashell": "#FFF5EE", "mediumspringgreen": "#00FA9A", "fuchsia": "#FF00FF", "papayawhip": "#FFEFD5", "blanchedalmond": "#FFEBCD", "chartreuse": "#7FFF00", "dimgray": "#696969", "black": "#000000", "peachpuff": "#FFDAB9", "springgreen": "#00FF7F", "aquamarine": "#7FFFD4", "white": "#FFFFFF", "b": "#0000FF", "orange": "#FFA500", "lightsalmon": "#FFA07A", "darkslategray": "#2F4F4F", "brown": "#A52A2A", "ivory": "#FFFFF0", "dodgerblue": "#1E90FF", "peru": "#CD853F", "lawngreen": "#7CFC00", "chocolate": "#D2691E", "crimson": "#DC143C", "forestgreen": "#228B22", "slateblue": "#6A5ACD", "lightseagreen": "#20B2AA", "cyan": "#00FFFF", "mintcream": "#F5FFFA", "silver": "#C0C0C0", "antiquewhite": "#FAEBD7", "mediumorchid": "#BA55D3", "skyblue": "#87CEEB", "gray": "#808080", "darkturquoise": "#00CED1", "goldenrod": "#DAA520", "darkgreen": "#006400", "floralwhite": "#FFFAF0", "darkviolet": "#9400D3", "darkgray": "#A9A9A9", "moccasin": "#FFE4B5", "saddlebrown": "#8B4513", "darkslateblue": "#483D8B", "lightskyblue": "#87CEFA", "lightpink": "#FFB6C1", "mediumvioletred": "#C71585", "r": "#FF0000", "red": "#FF0000", "deeppink": "#FF1493", "limegreen": "#32CD32", "k": "#000000", "darkmagenta": "#8B008B", "palegoldenrod": "#EEE8AA", "plum": "#DDA0DD", "turquoise": "#40E0D0", "m": "#FF00FF", "lightgoldenrodyellow": "#FAFAD2", "darkgoldenrod": "#B8860B", "lavender": "#E6E6FA", "maroon": "#800000", "yellowgreen": "#9ACD32", "sandybrown": "#FAA460", "thistle": "#D8BFD8", "violet": "#EE82EE", "navy": "#000080", "magenta": "#FF00FF", "tan": "#D2B48C", "rosybrown": "#BC8F8F", "olivedrab": "#6B8E23", "blue": "#0000FF", "lightblue": "#ADD8E6", "ghostwhite": "#F8F8FF", "honeydew": "#F0FFF0", "cornflowerblue": "#6495ED", "linen": "#FAF0E6", "darkblue": "#00008B", "powderblue": "#B0E0E6", "seagreen": "#2E8B57", "darkkhaki": "#BDB76B", "snow": "#FFFAFA", "sienna": "#A0522D", "mediumblue": "#0000CD", "royalblue": "#4169E1", "lightcyan": "#E0FFFF", "green": "#008000", "mediumpurple": "#9370DB", "midnightblue": "#191970", "cornsilk": "#FFF8DC", "paleturquoise": "#AFEEEE", "bisque": "#FFE4C4", "slategray": "#708090", "darkcyan": "#008B8B", "khaki": "#F0E68C", "wheat": "#F5DEB3", "teal": "#008080", "darkorchid": "#9932CC", "deepskyblue": "#00BFFF", "salmon": "#FA8072", "y": "#FFFF00", "darkred": "#8B0000", "steelblue": "#4682B4", "g": "#008000", "palevioletred": "#DB7093", "lightslategray": "#778899", "aliceblue": "#F0F8FF", "lightgreen": "#90EE90", "orchid": "#DA70D6", "gainsboro": "#DCDCDC", "mediumseagreen": "#3CB371", "lightgray": "#D3D3D3", "c": "#00FFFF", "mediumturquoise": "#48D1CC", "darksage": "#598556", "lemonchiffon": "#FFFACD", "cadetblue": "#5F9EA0", "lightyellow": "#FFFFE0", "lavenderblush": "#FFF0F5", "coral": "#FF7F50", "purple": "#800080", "aqua": "#00FFFF", "lightsage": "#BCECAC", "whitesmoke": "#F5F5F5", "mediumslateblue": "#7B68EE", "darkorange": "#FF8C00", "mediumaquamarine": "#66CDAA", "darksalmon": "#E9967A", "beige": "#F5F5DC", "w": "#FFFFFF", "blueviolet": "#8A2BE2", "azure": "#F0FFFF", "lightsteelblue": "#B0C4DE", "oldlace": "#FDF5E6"}
\ No newline at end of file
diff --git a/branca/_schemes.json b/branca/_schemes.json
new file mode 100644
index 0000000..b8bf5ee
--- /dev/null
+++ b/branca/_schemes.json
@@ -0,0 +1,1 @@
+{"Pastel1_03": ["#fbb4ae", "#b3cde3", "#ccebc5"], "Pastel1_05": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"], "Pastel1_04": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"], "Pastel1_07": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"], "YlOrRd_04": ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"], "Pastel1_09": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"], "Pastel1_08": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"], "Spectral_07": ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"], "RdYlBu_05": ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"], "PuBuGn_03": ["#ece2f0", "#a6bddb", "#1c9099"], "Set1_08": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"], "PuBuGn_05": ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"], "PuBuGn_04": ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"], "PuBuGn_07": ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], "PuBuGn_06": ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"], "PuBuGn_09": ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"], "PuBuGn_08": ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], "YlOrBr_04": ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"], "YlOrBr_05": ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"], "Set1_07": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"], "YlOrBr_03": ["#fff7bc", "#fec44f", "#d95f0e"], "Set1_05": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"], "YlOrRd_03": ["#ffeda0", "#feb24c", "#f03b20"], "PuOr_06": ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"], "PuOr_07": ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"], "PuOr_04": ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"], "PuOr_05": ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"], "PuOr_03": ["#f1a340", "#f7f7f7", "#998ec3"], "Purples_09": ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"], "Set2_06": ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"], "RdYlBu_11": ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"], "PuOr_08": ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], "PuOr_09": ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], "Paired_03": ["#a6cee3", "#1f78b4", "#b2df8a"], "RdBu_03": ["#ef8a62", "#f7f7f7", "#67a9cf"], "RdYlBu_10": ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"], "Paired_07": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"], "Paired_06": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"], "Paired_05": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"], "Paired_04": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"], "Paired_09": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"], "Paired_08": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"], "RdGy_03": ["#ef8a62", "#ffffff", "#999999"], "PiYG_04": ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"], "Accent_03": ["#7fc97f", "#beaed4", "#fdc086"], "BuGn_08": ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], "BuGn_09": ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"], "BuGn_04": ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"], "BuGn_05": ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"], "BuGn_06": ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"], "BuGn_07": ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], "BuGn_03": ["#e5f5f9", "#99d8c9", "#2ca25f"], "YlGnBu_07": ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], "YlGnBu_06": ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"], "YlGnBu_05": ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"], "YlGnBu_04": ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"], "YlGnBu_03": ["#edf8b1", "#7fcdbb", "#2c7fb8"], "RdBu_06": ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"], "RdBu_05": ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"], "RdBu_04": ["#ca0020", "#f4a582", "#92c5de", "#0571b0"], "Accent_08": ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"], "RdBu_09": ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], "RdBu_08": ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], "Set2_04": ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"], "YlGnBu_09": ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"], "YlGnBu_08": ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], "Blues_08": ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], "Blues_09": ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"], "RdPu_09": ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"], "RdPu_08": ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], "Set3_07": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"], "Set3_06": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"], "RdPu_05": ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"], "RdPu_04": ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"], "RdPu_07": ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], "RdPu_06": ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"], "Blues_06": ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"], "Blues_07": ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], "RdPu_03": ["#fde0dd", "#fa9fb5", "#c51b8a"], "Blues_05": ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"], "Paired_10": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"], "Paired_11": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"], "Paired_12": ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"], "PuBu_06": ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"], "PuBu_07": ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], "PuBu_04": ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"], "PuBu_05": ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"], "PuRd_05": ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"], "PuBu_03": ["#ece7f2", "#a6bddb", "#2b8cbe"], "PuRd_07": ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], "PuRd_06": ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"], "PuRd_09": ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"], "PuRd_08": ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], "Set2_07": ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"], "PuBu_08": ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], "PuBu_09": ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"], "RdBu_10": ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"], "RdBu_11": ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"], "Accent_06": ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"], "Set3_03": ["#8dd3c7", "#ffffb3", "#bebada"], "Set3_05": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"], "Set3_12": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"], "Set3_10": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"], "Set3_04": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"], "RdGy_11": ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"], "RdGy_10": ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"], "Set1_03": ["#e41a1c", "#377eb8", "#4daf4a"], "Set1_09": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"], "Set3_09": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"], "BuPu_08": ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], "BuPu_09": ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"], "RdYlGn_11": ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"], "Blues_03": ["#deebf7", "#9ecae1", "#3182bd"], "Set2_05": ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"], "BuPu_03": ["#e0ecf4", "#9ebcda", "#8856a7"], "BuPu_06": ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"], "BuPu_07": ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], "BuPu_04": ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"], "BuPu_05": ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"], "Accent_04": ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"], "YlOrRd_05": ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"], "YlOrBr_08": ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], "Oranges_08": ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], "Oranges_09": ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"], "Oranges_06": ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"], "Oranges_07": ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], "Oranges_04": ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"], "YlOrBr_09": ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"], "Oranges_03": ["#fee6ce", "#fdae6b", "#e6550d"], "YlOrBr_06": ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"], "Dark2_06": ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"], "Blues_04": ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"], "YlOrBr_07": ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], "RdYlGn_05": ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"], "Set3_08": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"], "YlOrRd_06": ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"], "Dark2_03": ["#1b9e77", "#d95f02", "#7570b3"], "Accent_05": ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"], "RdYlGn_08": ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], "RdYlGn_09": ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], "PuOr_11": ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"], "YlOrRd_07": ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], "Spectral_11": ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"], "RdGy_08": ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], "RdGy_09": ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], "RdGy_06": ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"], "RdGy_07": ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"], "RdGy_04": ["#ca0020", "#f4a582", "#bababa", "#404040"], "RdGy_05": ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"], "RdYlGn_04": ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"], "PiYG_09": ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], "RdYlGn_06": ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"], "RdYlGn_07": ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"], "Spectral_04": ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"], "Spectral_05": ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"], "Spectral_06": ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"], "PiYG_08": ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], "Set2_03": ["#66c2a5", "#fc8d62", "#8da0cb"], "Spectral_03": ["#fc8d59", "#ffffbf", "#99d594"], "Reds_08": ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], "Set1_04": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"], "Spectral_08": ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], "Spectral_09": ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], "Set2_08": ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"], "Reds_09": ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"], "Greys_07": ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], "Greys_06": ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"], "Greys_05": ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"], "Greys_04": ["#f7f7f7", "#cccccc", "#969696", "#525252"], "Greys_03": ["#f0f0f0", "#bdbdbd", "#636363"], "PuOr_10": ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"], "Accent_07": ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"], "Reds_06": ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"], "Greys_09": ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"], "Greys_08": ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], "Reds_07": ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], "RdYlBu_08": ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], "RdYlBu_09": ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], "BrBG_09": ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], "BrBG_08": ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], "BrBG_07": ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"], "BrBG_06": ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"], "BrBG_05": ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"], "BrBG_04": ["#a6611a", "#dfc27d", "#80cdc1", "#018571"], "BrBG_03": ["#d8b365", "#f5f5f5", "#5ab4ac"], "PiYG_06": ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"], "Reds_03": ["#fee0d2", "#fc9272", "#de2d26"], "Set3_11": ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"], "Set1_06": ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"], "PuRd_03": ["#e7e1ef", "#c994c7", "#dd1c77"], "PiYG_07": ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"], "RdBu_07": ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"], "Pastel1_06": ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"], "Spectral_10": ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"], "PuRd_04": ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"], "OrRd_03": ["#fee8c8", "#fdbb84", "#e34a33"], "PiYG_03": ["#e9a3c9", "#f7f7f7", "#a1d76a"], "Oranges_05": ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"], "OrRd_07": ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], "OrRd_06": ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"], "OrRd_05": ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"], "OrRd_04": ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"], "Reds_04": ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"], "Reds_05": ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"], "OrRd_09": ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"], "OrRd_08": ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], "BrBG_10": ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"], "BrBG_11": ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"], "PiYG_05": ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"], "YlOrRd_08": ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], "GnBu_04": ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"], "GnBu_05": ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"], "GnBu_06": ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"], "GnBu_07": ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], "Purples_08": ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], "GnBu_03": ["#e0f3db", "#a8ddb5", "#43a2ca"], "Purples_06": ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"], "Purples_07": ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], "Purples_04": ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"], "Purples_05": ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"], "GnBu_08": ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], "GnBu_09": ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"], "YlOrRd_09": ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"], "Purples_03": ["#efedf5", "#bcbddc", "#756bb1"], "RdYlBu_04": ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"], "PRGn_09": ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], "PRGn_08": ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], "PRGn_07": ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"], "PRGn_06": ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"], "PRGn_05": ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"], "PRGn_04": ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"], "PRGn_03": ["#af8dc3", "#f7f7f7", "#7fbf7b"], "RdYlBu_06": ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"], "RdYlGn_10": ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"], "YlGn_08": ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], "YlGn_09": ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"], "RdYlBu_07": ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"], "PiYG_10": ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"], "PiYG_11": ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"], "YlGn_03": ["#f7fcb9", "#addd8e", "#31a354"], "YlGn_04": ["#ffffcc", "#c2e699", "#78c679", "#238443"], "YlGn_05": ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"], "YlGn_06": ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"], "YlGn_07": ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], "Dark2_05": ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"], "Dark2_04": ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"], "Dark2_07": ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"], "Pastel2_03": ["#b3e2cd", "#fdcdac", "#cbd5e8"], "Pastel2_04": ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"], "Pastel2_05": ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"], "Pastel2_06": ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"], "Pastel2_07": ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"], "Pastel2_08": ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"], "RdYlBu_03": ["#fc8d59", "#ffffbf", "#91bfdb"], "Dark2_08": ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"], "RdYlGn_03": ["#fc8d59", "#ffffbf", "#91cf60"], "PRGn_11": ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"], "Greens_08": ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], "Greens_09": ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"], "Greens_06": ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"], "Greens_07": ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], "Greens_04": ["#edf8e9", "#bae4b3", "#74c476", "#238b45"], "Greens_05": ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"], "PRGn_10": ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"], "Greens_03": ["#e5f5e0", "#a1d99b", "#31a354"]}
\ No newline at end of file
diff --git a/branca/colormap.py b/branca/colormap.py
index bfa60a7..b669596 100644
--- a/branca/colormap.py
+++ b/branca/colormap.py
@@ -9,223 +9,25 @@ Utility module for dealing with colormaps.
 from __future__ import absolute_import
 
 import math
+import json
+import pkg_resources
 from jinja2 import Template
 from branca.six import text_type, binary_type
 from branca.element import MacroElement, Figure, JavascriptLink
 from branca.utilities import legend_scaler
 
-_cnames = {
-    'aliceblue':            '#F0F8FF',
-    'antiquewhite':         '#FAEBD7',
-    'aqua':                 '#00FFFF',
-    'aquamarine':           '#7FFFD4',
-    'azure':                '#F0FFFF',
-    'beige':                '#F5F5DC',
-    'bisque':               '#FFE4C4',
-    'black':                '#000000',
-    'blanchedalmond':       '#FFEBCD',
-    'blue':                 '#0000FF',
-    'blueviolet':           '#8A2BE2',
-    'brown':                '#A52A2A',
-    'burlywood':            '#DEB887',
-    'cadetblue':            '#5F9EA0',
-    'chartreuse':           '#7FFF00',
-    'chocolate':            '#D2691E',
-    'coral':                '#FF7F50',
-    'cornflowerblue':       '#6495ED',
-    'cornsilk':             '#FFF8DC',
-    'crimson':              '#DC143C',
-    'cyan':                 '#00FFFF',
-    'darkblue':             '#00008B',
-    'darkcyan':             '#008B8B',
-    'darkgoldenrod':        '#B8860B',
-    'darkgray':             '#A9A9A9',
-    'darkgreen':            '#006400',
-    'darkkhaki':            '#BDB76B',
-    'darkmagenta':          '#8B008B',
-    'darkolivegreen':       '#556B2F',
-    'darkorange':           '#FF8C00',
-    'darkorchid':           '#9932CC',
-    'darkred':              '#8B0000',
-    'darksage':             '#598556',
-    'darksalmon':           '#E9967A',
-    'darkseagreen':         '#8FBC8F',
-    'darkslateblue':        '#483D8B',
-    'darkslategray':        '#2F4F4F',
-    'darkturquoise':        '#00CED1',
-    'darkviolet':           '#9400D3',
-    'deeppink':             '#FF1493',
-    'deepskyblue':          '#00BFFF',
-    'dimgray':              '#696969',
-    'dodgerblue':           '#1E90FF',
-    'firebrick':            '#B22222',
-    'floralwhite':          '#FFFAF0',
-    'forestgreen':          '#228B22',
-    'fuchsia':              '#FF00FF',
-    'gainsboro':            '#DCDCDC',
-    'ghostwhite':           '#F8F8FF',
-    'gold':                 '#FFD700',
-    'goldenrod':            '#DAA520',
-    'gray':                 '#808080',
-    'green':                '#008000',
-    'greenyellow':          '#ADFF2F',
-    'honeydew':             '#F0FFF0',
-    'hotpink':              '#FF69B4',
-    'indianred':            '#CD5C5C',
-    'indigo':               '#4B0082',
-    'ivory':                '#FFFFF0',
-    'khaki':                '#F0E68C',
-    'lavender':             '#E6E6FA',
-    'lavenderblush':        '#FFF0F5',
-    'lawngreen':            '#7CFC00',
-    'lemonchiffon':         '#FFFACD',
-    'lightblue':            '#ADD8E6',
-    'lightcoral':           '#F08080',
-    'lightcyan':            '#E0FFFF',
-    'lightgoldenrodyellow': '#FAFAD2',
-    'lightgreen':           '#90EE90',
-    'lightgray':            '#D3D3D3',
-    'lightpink':            '#FFB6C1',
-    'lightsage':            '#BCECAC',
-    'lightsalmon':          '#FFA07A',
-    'lightseagreen':        '#20B2AA',
-    'lightskyblue':         '#87CEFA',
-    'lightslategray':       '#778899',
-    'lightsteelblue':       '#B0C4DE',
-    'lightyellow':          '#FFFFE0',
-    'lime':                 '#00FF00',
-    'limegreen':            '#32CD32',
-    'linen':                '#FAF0E6',
-    'magenta':              '#FF00FF',
-    'maroon':               '#800000',
-    'mediumaquamarine':     '#66CDAA',
-    'mediumblue':           '#0000CD',
-    'mediumorchid':         '#BA55D3',
-    'mediumpurple':         '#9370DB',
-    'mediumseagreen':       '#3CB371',
-    'mediumslateblue':      '#7B68EE',
-    'mediumspringgreen':    '#00FA9A',
-    'mediumturquoise':      '#48D1CC',
-    'mediumvioletred':      '#C71585',
-    'midnightblue':         '#191970',
-    'mintcream':            '#F5FFFA',
-    'mistyrose':            '#FFE4E1',
-    'moccasin':             '#FFE4B5',
-    'navajowhite':          '#FFDEAD',
-    'navy':                 '#000080',
-    'oldlace':              '#FDF5E6',
-    'olive':                '#808000',
-    'olivedrab':            '#6B8E23',
-    'orange':               '#FFA500',
-    'orangered':            '#FF4500',
-    'orchid':               '#DA70D6',
-    'palegoldenrod':        '#EEE8AA',
-    'palegreen':            '#98FB98',
-    'paleturquoise':        '#AFEEEE',
-    'palevioletred':        '#DB7093',
-    'papayawhip':           '#FFEFD5',
-    'peachpuff':            '#FFDAB9',
-    'peru':                 '#CD853F',
-    'pink':                 '#FFC0CB',
-    'plum':                 '#DDA0DD',
-    'powderblue':           '#B0E0E6',
-    'purple':               '#800080',
-    'red':                  '#FF0000',
-    'rosybrown':            '#BC8F8F',
-    'royalblue':            '#4169E1',
-    'saddlebrown':          '#8B4513',
-    'salmon':               '#FA8072',
-    'sage':                 '#87AE73',
-    'sandybrown':           '#FAA460',
-    'seagreen':             '#2E8B57',
-    'seashell':             '#FFF5EE',
-    'sienna':               '#A0522D',
-    'silver':               '#C0C0C0',
-    'skyblue':              '#87CEEB',
-    'slateblue':            '#6A5ACD',
-    'slategray':            '#708090',
-    'snow':                 '#FFFAFA',
-    'springgreen':          '#00FF7F',
-    'steelblue':            '#4682B4',
-    'tan':                  '#D2B48C',
-    'teal':                 '#008080',
-    'thistle':              '#D8BFD8',
-    'tomato':               '#FF6347',
-    'turquoise':            '#40E0D0',
-    'violet':               '#EE82EE',
-    'wheat':                '#F5DEB3',
-    'white':                '#FFFFFF',
-    'whitesmoke':           '#F5F5F5',
-    'yellow':               '#FFFF00',
-    'yellowgreen':          '#9ACD32',
-    'r':                    '#FF0000',
-    'g':                    '#008000',
-    'b':                    '#0000FF',
-    'c':                    '#00FFFF',
-    'm':                    '#FF00FF',
-    'y':                    '#FFFF00',
-    'w':                    '#FFFFFF',
-    'k':                    '#000000',
-    }
-
-_schemes = {'BuGn': ['#EDF8FB', '#CCECE6', '#CCECE6',
-                     '#66C2A4', '#41AE76', '#238B45', '#005824'],
-            'BuPu': ['#EDF8FB', '#BFD3E6', '#9EBCDA',
-                     '#8C96C6', '#8C6BB1', '#88419D', '#6E016B'],
-            'GnBu': ['#F0F9E8', '#CCEBC5', '#A8DDB5',
-                     '#7BCCC4', '#4EB3D3', '#2B8CBE', '#08589E'],
-            'OrRd': ['#FEF0D9', '#FDD49E', '#FDBB84',
-                     '#FC8D59', '#EF6548', '#D7301F', '#990000'],
-            'PuBu': ['#F1EEF6', '#D0D1E6', '#A6BDDB',
-                     '#74A9CF', '#3690C0', '#0570B0', '#034E7B'],
-            'PuBuGn': ['#F6EFF7', '#D0D1E6', '#A6BDDB',
-                       '#67A9CF', '#3690C0', '#02818A', '#016450'],
-            'PuRd': ['#F1EEF6', '#D4B9DA', '#C994C7',
-                     '#DF65B0', '#E7298A', '#CE1256', '#91003F'],
-            'RdPu': ['#FEEBE2', '#FCC5C0', '#FA9FB5',
-                     '#F768A1', '#DD3497', '#AE017E', '#7A0177'],
-            'YlGn': ['#FFFFCC', '#D9F0A3', '#ADDD8E',
-                     '#78C679', '#41AB5D', '#238443', '#005A32'],
-            'YlGnBu': ['#FFFFCC', '#C7E9B4', '#7FCDBB',
-                       '#41B6C4', '#1D91C0', '#225EA8', '#0C2C84'],
-            'YlOrBr': ['#FFFFD4', '#FEE391', '#FEC44F',
-                       '#FE9929', '#EC7014', '#CC4C02', '#8C2D04'],
-            'YlOrRd': ['#FFFFB2', '#FED976', '#FEB24C',
-                       '#FD8D3C', '#FC4E2A', '#E31A1C', '#B10026'],
-            'BrBg': ['#8c510a', '#d8b365', '#f6e8c3',
-                     '#c7eae5', '#5ab4ac', '#01665e'],
-            'PiYG': ['#c51b7d', '#e9a3c9', '#fde0ef',
-                     '#e6f5d0', '#a1d76a', '#4d9221'],
-            'PRGn': ['#762a83', '#af8dc3', '#e7d4e8',
-                     '#d9f0d3', '#7fbf7b', '#1b7837'],
-            'PuOr': ['#b35806', '#f1a340', '#fee0b6',
-                     '#d8daeb', '#998ec3', '#542788'],
-            'RdBu': ['#b2182b', '#ef8a62', '#fddbc7',
-                     '#d1e5f0', '#67a9cf', '#2166ac'],
-            'RdGy': ['#b2182b', '#ef8a62', '#fddbc7',
-                     '#e0e0e0', '#999999', '#4d4d4d'],
-            'RdYlBu': ['#d73027', '#fc8d59', '#fee090',
-                       '#e0f3f8', '#91bfdb', '#4575b4'],
-            'RdYlGn': ['#d73027', '#fc8d59', '#fee08b',
-                       '#d9ef8b', '#91cf60', '#1a9850'],
-            'Spectral': ['#d53e4f', '#fc8d59', '#fee08b',
-                         '#e6f598', '#99d594', '#3288bd'],
-            'Accent': ['#7fc97f', '#beaed4', '#fdc086',
-                       '#ffff99', '#386cb0', '#f0027f'],
-            'Dark2': ['#1b9e77', '#d95f02', '#7570b3',
-                      '#e7298a', '#66a61e', '#e6ab02'],
-            'Paired': ['#a6cee3', '#1f78b4', '#b2df8a',
-                       '#33a02c', '#fb9a99', '#e31a1c'],
-            'Pastel1': ['#fbb4ae', '#b3cde3', '#ccebc5',
-                        '#decbe4', '#fed9a6', '#ffffcc'],
-            'Pastel2': ['#b3e2cd', '#fdcdac', '#cbd5e8',
-                        '#f4cae4', '#e6f5c9', '#fff2ae'],
-            'Set1': ['#e41a1c', '#377eb8', '#4daf4a',
-                     '#984ea3', '#ff7f00', '#ffff33'],
-            'Set2': ['#66c2a5', '#fc8d62', '#8da0cb',
-                     '#e78ac3', '#a6d854', '#ffd92f'],
-            'Set3': ['#8dd3c7', '#ffffb3', '#bebada',
-                     '#fb8072', '#80b1d3', '#fdb462']}
+
+resource_package = __name__
+resource_path_schemes = '/_schemes.json'
+resource_path_cnames = '/_cnames.json'
+
+cnames_string = pkg_resources.resource_stream(
+    resource_package, resource_path_cnames).read().decode()
+_cnames = json.loads(cnames_string)
+
+schemes_string = pkg_resources.resource_stream(
+    resource_package, resource_path_schemes).read().decode()
+_schemes = json.loads(schemes_string)
 
 
 def _parse_color(x):
diff --git a/branca/scheme_base_codes.json b/branca/scheme_base_codes.json
new file mode 100644
index 0000000..4e02c71
--- /dev/null
+++ b/branca/scheme_base_codes.json
@@ -0,0 +1,1 @@
+{"codes": ["Spectral", "RdYlGn", "PuBu", "Accent", "OrRd", "Set1", "Set2", "Set3", "BuPu", "Dark2", "RdBu", "Oranges", "BuGn", "PiYG", "YlOrBr", "YlGn", "Pastel2", "RdPu", "Greens", "PRGn", "YlGnBu", "RdYlBu", "Paired", "BrBG", "Purples", "Reds", "Pastel1", "GnBu", "Greys", "RdGy", "YlOrRd", "PuOr", "PuRd", "Blues", "PuBuGn"]}
\ No newline at end of file
diff --git a/branca/scheme_info.json b/branca/scheme_info.json
new file mode 100644
index 0000000..4cd15b1
--- /dev/null
+++ b/branca/scheme_info.json
@@ -0,0 +1,1 @@
+{"Spectral": "Diverging", "RdYlGn": "Diverging", "Set2": "Qualitative", "Accent": "Qualitative", "OrRd": "Sequential", "Set1": "Qualitative", "PuBu": "Sequential", "Set3": "Qualitative", "BuPu": "Sequential", "Dark2": "Qualitative", "RdBu": "Diverging", "BuGn": "Sequential", "PiYG": "Diverging", "YlOrBr": "Sequential", "YlGn": "Sequential", "RdPu": "Sequential", "PRGn": "Diverging", "YlGnBu": "Sequential", "RdYlBu": "Diverging", "Paired": "Qualitative", "Pastel2": "Qualitative", "Pastel1": "Qualitative", "GnBu": "Sequential", "RdGy": "Diverging", "YlOrRd": "Sequential", "PuOr": "Diverging", "PuRd": "Sequential", "BrBg": "Diverging", "PuBuGn": "Sequential"}
\ No newline at end of file
diff --git a/branca/utilities.py b/branca/utilities.py
index 410c219..afb995a 100644
--- a/branca/utilities.py
+++ b/branca/utilities.py
@@ -15,6 +15,7 @@ import math
 import zlib
 import struct
 import json
+import pkg_resources
 import base64
 from jinja2 import Environment, PackageLoader
 
@@ -108,124 +109,71 @@ def color_brewer(color_code, n=6):
 
     """
     maximum_n = 253
+    minimum_n = 3
+
+    # Raise an error if the n requested is greater than the maximum.
+    if n > maximum_n:
+        raise ValueError("The maximum number of colors in a"
+                         " ColorBrewer sequential color series is 253")
+    if n < minimum_n:
+        raise ValueError("The minimum number of colors in a"
+                         " ColorBrewer sequential color series is 3")
+
     if color_code[-2:] == '_r':
-        core_color_code = color_code[:-2]
+        base_code = color_code[:-2]
+        core_color_code = base_code + '_' + str(n).zfill(2)
         color_reverse = True
     else:
-        core_color_code = color_code
+        base_code = color_code
+        core_color_code = base_code + '_' + str(n).zfill(2)
         color_reverse = False
 
-    scheme_info = {'BuGn': 'Sequential',
-                   'BuPu': 'Sequential',
-                   'GnBu': 'Sequential',
-                   'OrRd': 'Sequential',
-                   'PuBu': 'Sequential',
-                   'PuBuGn': 'Sequential',
-                   'PuRd': 'Sequential',
-                   'RdPu': 'Sequential',
-                   'YlGn': 'Sequential',
-                   'YlGnBu': 'Sequential',
-                   'YlOrBr': 'Sequential',
-                   'YlOrRd': 'Sequential',
-                   'BrBg': 'Diverging',
-                   'PiYG': 'Diverging',
-                   'PRGn': 'Diverging',
-                   'PuOr': 'Diverging',
-                   'RdBu': 'Diverging',
-                   'RdGy': 'Diverging',
-                   'RdYlBu': 'Diverging',
-                   'RdYlGn': 'Diverging',
-                   'Spectral': 'Diverging',
-                   'Accent': 'Qualitative',
-                   'Dark2': 'Qualitative',
-                   'Paired': 'Qualitative',
-                   'Pastel1': 'Qualitative',
-                   'Pastel2': 'Qualitative',
-                   'Set1': 'Qualitative',
-                   'Set2': 'Qualitative',
-                   'Set3': 'Qualitative',
-                   }
-
-    schemes = {'BuGn': ['#EDF8FB', '#CCECE6', '#CCECE6',
-                        '#66C2A4', '#41AE76', '#238B45', '#005824'],
-               'BuPu': ['#EDF8FB', '#BFD3E6', '#9EBCDA',
-                        '#8C96C6', '#8C6BB1', '#88419D', '#6E016B'],
-               'GnBu': ['#F0F9E8', '#CCEBC5', '#A8DDB5',
-                        '#7BCCC4', '#4EB3D3', '#2B8CBE', '#08589E'],
-               'OrRd': ['#FEF0D9', '#FDD49E', '#FDBB84',
-                        '#FC8D59', '#EF6548', '#D7301F', '#990000'],
-               'PuBu': ['#F1EEF6', '#D0D1E6', '#A6BDDB',
-                        '#74A9CF', '#3690C0', '#0570B0', '#034E7B'],
-               'PuBuGn': ['#F6EFF7', '#D0D1E6', '#A6BDDB',
-                          '#67A9CF', '#3690C0', '#02818A', '#016450'],
-               'PuRd': ['#F1EEF6', '#D4B9DA', '#C994C7',
-                        '#DF65B0', '#E7298A', '#CE1256', '#91003F'],
-               'RdPu': ['#FEEBE2', '#FCC5C0', '#FA9FB5',
-                        '#F768A1', '#DD3497', '#AE017E', '#7A0177'],
-               'YlGn': ['#FFFFCC', '#D9F0A3', '#ADDD8E',
-                        '#78C679', '#41AB5D', '#238443', '#005A32'],
-               'YlGnBu': ['#FFFFCC', '#C7E9B4', '#7FCDBB',
-                          '#41B6C4', '#1D91C0', '#225EA8', '#0C2C84'],
-               'YlOrBr': ['#FFFFD4', '#FEE391', '#FEC44F',
-                          '#FE9929', '#EC7014', '#CC4C02', '#8C2D04'],
-               'YlOrRd': ['#FFFFB2', '#FED976', '#FEB24C',
-                          '#FD8D3C', '#FC4E2A', '#E31A1C', '#B10026'],
-               'BrBg': ['#8c510a', '#d8b365', '#f6e8c3',
-                        '#c7eae5', '#5ab4ac', '#01665e'],
-               'PiYG': ['#c51b7d', '#e9a3c9', '#fde0ef',
-                        '#e6f5d0', '#a1d76a', '#4d9221'],
-               'PRGn': ['#762a83', '#af8dc3', '#e7d4e8',
-                        '#d9f0d3', '#7fbf7b', '#1b7837'],
-               'PuOr': ['#b35806', '#f1a340', '#fee0b6',
-                        '#d8daeb', '#998ec3', '#542788'],
-               'RdBu': ['#b2182b', '#ef8a62', '#fddbc7',
-                        '#d1e5f0', '#67a9cf', '#2166ac'],
-               'RdGy': ['#b2182b', '#ef8a62', '#fddbc7',
-                        '#e0e0e0', '#999999', '#4d4d4d'],
-               'RdYlBu': ['#d73027', '#fc8d59', '#fee090',
-                          '#e0f3f8', '#91bfdb', '#4575b4'],
-               'RdYlGn': ['#d73027', '#fc8d59', '#fee08b',
-                          '#d9ef8b', '#91cf60', '#1a9850'],
-               'Spectral': ['#d53e4f', '#fc8d59', '#fee08b',
-                            '#e6f598', '#99d594', '#3288bd'],
-               'Accent': ['#7fc97f', '#beaed4', '#fdc086',
-                          '#ffff99', '#386cb0', '#f0027f'],
-               'Dark2': ['#1b9e77', '#d95f02', '#7570b3',
-                         '#e7298a', '#66a61e', '#e6ab02'],
-               'Paired': ['#a6cee3', '#1f78b4', '#b2df8a',
-                          '#33a02c', '#fb9a99', '#e31a1c'],
-               'Pastel1': ['#fbb4ae', '#b3cde3', '#ccebc5',
-                           '#decbe4', '#fed9a6', '#ffffcc'],
-               'Pastel2': ['#b3e2cd', '#fdcdac', '#cbd5e8',
-                           '#f4cae4', '#e6f5c9', '#fff2ae'],
-               'Set1': ['#e41a1c', '#377eb8', '#4daf4a',
-                        '#984ea3', '#ff7f00', '#ffff33'],
-               'Set2': ['#66c2a5', '#fc8d62', '#8da0cb',
-                        '#e78ac3', '#a6d854', '#ffd92f'],
-               'Set3': ['#8dd3c7', '#ffffb3', '#bebada',
-                        '#fb8072', '#80b1d3', '#fdb462'],
-               }
+    resource_package = __name__
+    resource_path_schemes = '/_schemes.json'
+    resource_path_scheme_info = '/_cnames.json'
+    resource_path_scheme_base_codes = '/scheme_base_codes.json'
 
-    # Raise an error if the n requested is greater than the maximum.
-    if n > maximum_n:
-        raise ValueError("The maximum number of colors in a"
-                         " ColorBrewer sequential color series is 253")
+    schemes_string = pkg_resources.resource_stream(
+        resource_package, resource_path_schemes).read().decode()
+    schemes = json.loads(schemes_string)
+
+    scheme_info_string = pkg_resources.resource_stream(
+        resource_package, resource_path_scheme_info).read().decode()
+    scheme_info = json.loads(scheme_info_string)
 
-    # Only if n is greater than six do we interpolate values.
-    if n > 6:
-        if core_color_code not in schemes:
-            color_scheme = None
+    core_schemes_string = pkg_resources.resource_stream(
+        resource_package, resource_path_scheme_base_codes).read().decode()
+    core_schemes = json.loads(core_schemes_string)['codes']
+
+    if base_code not in core_schemes:
+        raise ValueError(base_code + " is not a valid ColorBrewer code")
+
+    try:
+        schemes[core_color_code]
+        explicit_scheme = True
+    except KeyError:
+        explicit_scheme = False
+
+    # Only if n is greater than the scheme length do we interpolate values.
+    if not explicit_scheme:
+        # Check to make sure that it is not a qualitative scheme.
+        if scheme_info[base_code] == 'Qualitative':
+            matching_quals = []
+            for key in schemes:
+                if base_code + '_' in key:
+                    matching_quals.append(int(key.split('_')[1]))
+
+            raise ValueError("Expanded color support is not available"
+                             " for Qualitative schemes; restrict the"
+                             " number of colors for the " + base_code +
+                             " code to between " + str(min(matching_quals)) +
+                             " and " + str(max(matching_quals))
+                             )
         else:
-            # Check to make sure that it is not a qualitative scheme.
-            if scheme_info[core_color_code] == 'Qualitative':
-                raise ValueError("Expanded color support is not available"
-                                 " for Qualitative schemes, restrict"
-                                 " number of colors to 6")
+            if not color_reverse:
+                color_scheme = linear_gradient(schemes.get(core_color_code), n)
             else:
-                if not color_reverse:
-                    color_scheme = linear_gradient(schemes.get(core_color_code), n)
-                else:
-                    color_scheme = linear_gradient(schemes.get(core_color_code)[::-1], n)
+                color_scheme = linear_gradient(schemes.get(core_color_code)[::-1], n)
     else:
         if not color_reverse:
             color_scheme = schemes.get(core_color_code, None)


Test patch:
diff --git a/tests/test_colormap.py b/tests/test_colormap.py
index 73f3baa..51cfbb3 100644
--- a/tests/test_colormap.py
+++ b/tests/test_colormap.py
@@ -23,7 +23,7 @@ def test_simple_linear():
 
 def test_linear_to_step():
     some_list = [30.6, 50, 51, 52, 53, 54, 55, 60, 70, 100]
-    lc = cm.linear.YlOrRd
+    lc = cm.linear.YlOrRd_06
     lc.to_step(n=12)
     lc.to_step(index=[0, 2, 4, 6, 8, 10])
     lc.to_step(data=some_list, n=12)
@@ -44,14 +44,14 @@ def test_step_to_linear():
 
 
 def test_linear_object():
-    cm.linear.OrRd._repr_html_()
-    cm.linear.PuBu.to_step(12)
-    cm.linear.YlGn.scale(3, 12)
+    cm.linear.OrRd_06._repr_html_()
+    cm.linear.PuBu_06.to_step(12)
+    cm.linear.YlGn_06.scale(3, 12)
     cm.linear._repr_html_()
 
 
 def test_step_object():
-    cm.step.OrRd._repr_html_()
-    cm.step.PuBu.to_linear()
-    cm.step.YlGn.scale(3, 12)
+    cm.step.OrRd_06._repr_html_()
+    cm.step.PuBu_06.to_linear()
+    cm.step.YlGn_06.scale(3, 12)
     cm.step._repr_html_()
diff --git a/tests/test_utilities.py b/tests/test_utilities.py
index 5d96edb..d19932d 100644
--- a/tests/test_utilities.py
+++ b/tests/test_utilities.py
@@ -4,9 +4,9 @@ import branca.utilities as ut
 def test_color_brewer_base():
     scheme = ut.color_brewer('YlGnBu', 9)
     assert scheme == [
-        '#ffffcc', '#d5eeba', '#a3dbb7',
-        '#6fc7bd', '#41b6c4', '#269ac1',
-        '#1f77b4', '#1c519f', '#0c2c84'
+        '#ffffd9', '#edf8b1', '#c7e9b4',
+        '#7fcdbb', '#41b6c4', '#1d91c0',
+        '#225ea8', '#253494', '#081d58'
     ]