Skip to content

Latest commit

 

History

History
932 lines (896 loc) · 41.3 KB

presets.org

File metadata and controls

932 lines (896 loc) · 41.3 KB

Contents

Named preset colors

thi.ng.color.presets

This namespace defines a hashmap of 100+ preset colors as packed RGB ints and some convenience getters to return presets in different formats. The color names and values refer to the standard SVG1.0 colors defined at: http://www.w3.org/TR/SVG/types.html#ColorKeywords

Note: All names have been keywordized and many hyphenated to reflect Clojure naming conventions.

Many more (900+) additional color presets can be sourced from DBpedia.org. The following URL executes the SPARQL query below and downloads results as CSV file:

http://dbpedia.org/sparql?default-graph-uri%3Dhttp://dbpedia.org&query%3Dselect%20distinct%20?color%20?title%20?hex%20where%20{%20?color%20a%20<http://dbpedia.org/ontology/Colour>%20%3B%20<http://dbpedia.org/property/title>%20?title%20%3B%20<http://dbpedia.org/ontology/colourHexCode>%20?hex%20.%20}%0D%0A&format%3Dtext/csv
select distinct ?color ?title ?hex where {
  ?color a dbpedia-owl:Colour ;
         dbpprop:title ?title ;
         dbpedia-owl:colourHexCode ?hex .
}
(ns thi.ng.color.presets
  (:require
   [thi.ng.color.core :as col]
   [thi.ng.strf.core :as f]))

(def colors
  {:alice-blue            0xf0f8ff
   :antique-white         0xfaebd7
   :aqua                  0x00ffff
   :aquamarine            0x7fffd4
   :azure                 0xf0ffff
   :beige                 0xf5f5dc
   :bisque                0xffe4c4
   :black                 0x000000
   :blanched-almond       0xffebcd
   :blue                  0x0000ff
   :blue-violet           0x8a2be2
   :brown                 0xa52a2a
   :burly-wood            0xdeb887
   :cadet-blue            0x5f9ea0
   :chartreuse            0x7fff00
   :chocolate             0xd2691e
   :coral                 0xff7f50
   :cornflower-blue       0x6495ed
   :cornsilk              0xfff8dc
   :crimson               0xdc143c
   :cyan                  0x00ffff
   :dark-blue             0x00008b
   :dark-cyan             0x008b8b
   :dark-goldenrod        0xb8860b
   :dark-gray             0xa9a9a9
   :dark-green            0x006400
   :dark-khaki            0xbdb76b
   :dark-magenta          0x8b008b
   :dark-olivegreen       0x556b2f
   :dark-orange           0xff8c00
   :dark-orchid           0x9932cc
   :dark-red              0x8b0000
   :dark-salmon           0xe9967a
   :dark-seagreen         0x8fbc8f
   :dark-slateblue        0x483d8b
   :dark-slategray        0x2f4f4f
   :dark-turquoise        0x00ced1
   :dark-violet           0x9400d3
   :deep-pink             0xff1493
   :deep-skyblue          0x00bfff
   :dim-gray              0x696969
   :dodger-blue           0x1e90ff
   :fire-brick            0xb22222
   :floral-white          0xfffaf0
   :forest-green          0x228b22
   :fuchsia               0xff00ff
   :gainsboro             0xdcdcdc
   :ghost-white           0xf8f8ff
   :gold                  0xffd700
   :goldenrod             0xdaa520
   :gray                  0x808080
   :green                 0x008000
   :green-yellow          0xadff2f
   :honeydew              0xf0fff0
   :hot-pink              0xff69b4
   :indian-red            0xcd5c5c
   :indigo                0x4b0082
   :ivory                 0xfffff0
   :khaki                 0xf0e68c
   :lavender              0xe6e6fa
   :lavender-blush        0xfff0f5
   :lawn-green            0x7cfc00
   :lemon-chiffon         0xfffacd
   :light-blue            0xadd8e6
   :light-coral           0xf08080
   :light-cyan            0xe0ffff
   :light-goldenrodyellow 0xfafad2
   :light-green           0x90ee90
   :light-grey            0xd3d3d3
   :light-pink            0xffb6c1
   :light-salmon          0xffa07a
   :light-seagreen        0x20b2aa
   :light-skyblue         0x87cefa
   :light-slategray       0x778899
   :light-steelblue       0xb0c4de
   :light-yellow          0xffffe0
   :lime                  0x00ff00
   :limegreen             0x32cd32
   :linen                 0xfaf0e6
   :magenta               0xff00ff
   :maroon                0x800000
   :medium-aquamarine     0x66cdaa
   :medium-blue           0x0000cd
   :medium-orchid         0xba55d3
   :medium-purple         0x9370db
   :medium-seagreen       0x3cb371
   :medium-slateblue      0x7b68ee
   :medium-springgreen    0x00fa9a
   :medium-turquoise      0x48d1cc
   :medium-violetred      0xc71585
   :midnight-blue         0x191970
   :mint-cream            0xf5fffa
   :misty-rose            0xffe4e1
   :moccasin              0xffe4b5
   :navajo-white          0xffdead
   :navy                  0x000080
   :old-lace              0xfdf5e6
   :olive                 0x808000
   :olive-drab            0x6b8e23
   :orange                0xffa500
   :orange-red            0xff4500
   :orchid                0xda70d6
   :pale-goldenrod        0xeee8aa
   :pale-green            0x98fb98
   :pale-violetred        0xdb7093
   :papaya-whip           0xffefd5
   :peach-puff            0xffdab9
   :peru                  0xcd853f
   :pink                  0xffc0cb
   :plum                  0xdda0dd
   :powder-blue           0xb0e0e6
   :purple                0x800080
   :red                   0xff0000
   :rosy-brown            0xbc8f8f
   :royal-blue            0x4169e1
   :saddle-brown          0x8b4513
   :salmon                0xfa8072
   :sandy-brown           0xfaa460
   :sea-green             0x2e8b57
   :seashell              0xfff5ee
   :sienna                0xa0522d
   :silver                0xc0c0c0
   :skyblue               0x87ceeb
   :slate-blue            0x6a5acd
   :slate-gray            0x708090
   :snow                  0xfffafa
   :spring-green          0x00ff7f
   :steel-blue            0x4682b4
   :tan                   0xd2b48c
   :teal                  0x008080
   :thistle               0xd8bfd8
   :tomato                0xff6347
   :turquoise             0x40e0d0
   :violet                0xee82ee
   :wheat                 0xf5deb3
   :white                 0xffffff
   :white-smoke           0xf5f5f5
   :yellow                0xffff00
   :yellow-green          0x9acd32
   })

(defn preset-rgb [id] (->> id colors col/int24 col/as-rgba))

(defn preset-hsv [id] (->> id preset-rgb col/as-hsva))

(defn preset-cmyk [id] (->> id preset-rgb col/as-cmyka))

(defn preset-css [id] (->> id colors col/int24 col/as-css))

thi.ng.color.categories

D3 categorical color schemes https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors

(ns thi.ng.color.presets.categories
  (:require
   [thi.ng.color.core :as col]))

(def cat10
  [0x1f77b4 0xff7f0e 0x2ca02c 0xd62728 0x9467bd
   0x8c564b 0xe377c2 0x7f7f7f 0xbcbd22 0x17becf])

(def cat20
  [0x1f77b4 0xaec7e8 0xff7f0e 0xffbb78 0x2ca02c
   0x98df8a 0xd62728 0xff9896 0x9467bd 0xc5b0d5
   0x8c564b 0xc49c94 0xe377c2 0xf7b6d2 0x7f7f7f
   0xc7c7c7 0xbcbd22 0xdbdb8d 0x17becf 0x9edae5])

(def cat20b
  [0x393b79 0x5254a3 0x6b6ecf 0x9c9ede 0x637939
   0x8ca252 0xb5cf6b 0xcedb9c 0x8c6d31 0xbd9e39
   0xe7ba52 0xe7cb94 0x843c39 0xad494a 0xd6616b
   0xe7969c 0x7b4173 0xa55194 0xce6dbd 0xde9ed6])

(def cat20c
  [0x3182bd 0x6baed6 0x9ecae1 0xc6dbef 0xe6550d
   0xfd8d3c 0xfdae6b 0xfdd0a2 0x31a354 0x74c476
   0xa1d99b 0xc7e9c0 0x756bb1 0x9e9ac8 0xbcbddc
   0xdadaeb 0x636363 0x969696 0xbdbdbd 0xd9d9d9])

thi.ng.color.presets.brewer

These color specifications and designs were developed by Cynthia Brewer. Unlike in their original JS distribution, here the schemes are defined in a more compressed version and can be retrieved in different formats via the brewer-scheme-* functions defined below.

(ns thi.ng.color.presets.brewer
  (:require
   [thi.ng.color.core :as col]))

(def ^:private uniques
  [0x9e0142 0xd53e4f 0xf46d43 0xfdae61 0xfee08b 0xffffbf 0xe6f598 0xabdda4
   0x66c2a5 0x3288bd 0x5e4fa2 0xd7191c 0x2b83ba 0xfc8d59 0x99d594 0x7f3b08
   0xb35806 0xe08214 0xfdb863 0xfee0b6 0xf7f7f7 0xd8daeb 0xb2abd2 0x8073ac
   0x542788 0x2d004b 0xe66101 0x5e3c99 0xf1a340 0x998ec3 0xdeebf7 0x9ecae1
   0x3182bd 0xeff3ff 0xbdd7e7 0x6baed6 0x2171b5 0x08519c 0xc6dbef 0x4292c6
   0x084594 0xf7fbff 0x08306b 0xf7fcb9 0xaddd8e 0x31a354 0xffffcc 0xc2e699
   0x78c679 0x238443 0x006837 0xd9f0a3 0x41ab5d 0x005a32 0xffffe5 0x004529
   0xfee8c8 0xfdbb84 0xe34a33 0xfef0d9 0xfdcc8a 0xd7301f 0xb30000 0xfdd49e
   0xef6548 0x990000 0xfff7ec 0x7f0000 0xe7e1ef 0xc994c7 0xdd1c77 0xf1eef6
   0xd7b5d8 0xdf65b0 0xce1256 0x980043 0xd4b9da 0xe7298a 0x91003f 0xf7f4f9
   0x67001f 0xedf8b1 0x7fcdbb 0x2c7fb8 0xa1dab4 0x41b6c4 0x225ea8 0x253494
   0xc7e9b4 0x1d91c0 0xc2c84 0xffffd9 0x81d58 0xfee6ce 0xfdae6b 0xe6550d
   0xfeedde 0xfdbe85 0xfd8d3c 0xd94701 0xa63603 0xfdd0a2 0xf16913 0xd94801
   0x8c2d04 0xfff5eb 0x7f2704 0xe0f3db 0xa8ddb5 0x43a2ca 0xf0f9e8 0xbae4bc
   0x7bccc4 0x2b8cbe 0x868ac 0xccebc5 0x4eb3d3 0x8589e 0xf7fcf0 0x84081
   0xe5f5e0 0xa1d99b 0xedf8e9 0xbae4b3 0x74c476 0x238b45 0x6d2c 0xc7e9c0
   0xf7fcf5 0x441b 0xf0f0f0 0xbdbdbd 0x636363 0xcccccc 0x969696 0x525252
   0x252525 0xd9d9d9 0x737373 0xffffff 0x0 0xa50026 0xd73027 0xfee090
   0xe0f3f8 0xabd9e9 0x74add1 0x4575b4 0x313695 0x2c7bb6 0x91bfdb 0xe5f5f9
   0x99d8c9 0x2ca25f 0xedf8fb 0xb2e2e2 0x66c2a4 0xccece6 0x41ae76 0x5824
   0xf7fcfd 0xfc8d62 0x8da0cb 0xe78ac3 0xa6d854 0xffd92f 0xe5c494 0xb3b3b3
   0xd9ef8b 0xa6d96a 0x66bd63 0x1a9850 0x1a9641 0x91cf60 0xece2f0 0xa6bddb
   0x1c9099 0xf6eff7 0xbdc9e1 0x67a9cf 0x2818a 0x16c59 0xd0d1e6 0x3690c0
   0x16450 0xfff7fb 0x14636 0xfff7bc 0xfec44f 0xd95f0e 0xffffd4 0xfed98e
   0xfe9929 0xcc4c02 0x993404 0xfee391 0xec7014 0x662506 0x40004b 0x762a83
   0x9970ab 0xc2a5cf 0xe7d4e8 0xd9f0d3 0xa6dba0 0x5aae61 0x1b7837 0x7b3294
   0x8837 0xaf8dc3 0x7fbf7b 0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00
   0xffff33 0xa65628 0xf781bf 0x999999 0xffeda0 0xfeb24c 0xf03b20 0xffffb2
   0xfecc5c 0xe31a1c 0xbd0026 0xfed976 0xfc4e2a 0xb10026 0x800026 0xece7f2
   0x74a9cf 0x570b0 0x45a8d 0x34e7b 0x23858 0xb2182b 0xd6604d 0xf4a582
   0xfddbc7 0xe0e0e0 0xbababa 0x878787 0x4d4d4d 0x1a1a1a 0xca0020 0x404040
   0xef8a62 0x543005 0x8c510a 0xbf812d 0xdfc27d 0xf6e8c3 0xf5f5f5 0xc7eae5
   0x80cdc1 0x35978f 0x1665e 0x3c30 0xa6611a 0x18571 0xd8b365 0x5ab4ac
   0xfee0d2 0xfc9272 0xde2d26 0xfee5d9 0xfcae91 0xfb6a4a 0xcb181d 0xa50f15
   0xfcbba1 0xef3b2c 0x99000d 0xfff5f0 0x67000d 0xd1e5f0 0x92c5de 0x4393c3
   0x2166ac 0x53061 0x571b0 0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99
   0xfdbf6f 0xcab2d6 0x6a3d9a 0xffff99 0xb15928 0x1b9e77 0xd95f02 0x7570b3
   0x66a61e 0xe6ab02 0xa6761d 0x666666 0xe0ecf4 0x9ebcda 0x8856a7 0xb3cde3
   0x8c96c6 0x88419d 0x810f7c 0xbfd3e6 0x8c6bb1 0x6e016b 0x4d004b 0x8e0152
   0xc51b7d 0xde77ae 0xf1b6da 0xfde0ef 0xe6f5d0 0xb8e186 0x7fbc41 0x4d9221
   0x276419 0xd01c8b 0x4dac26 0xe9a3c9 0xa1d76a 0x7fc97f 0xbeaed4 0xfdc086
   0x386cb0 0xf0027f 0xbf5b17 0xfbb4ae 0xdecbe4 0xfed9a6 0xe5d8bd 0xfddaec
   0xf2f2f2 0xefedf5 0xbcbddc 0x756bb1 0xf2f0f7 0xcbc9e2 0x9e9ac8 0x6a51a3
   0x54278f 0xdadaeb 0x807dba 0x4a1486 0xfcfbfd 0x3f007d 0xfde0dd 0xfa9fb5
   0xc51b8a 0xfeebe2 0xfbb4b9 0xf768a1 0xae017e 0x7a0177 0xfcc5c0 0xdd3497
   0xfff7f3 0x49006a 0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4 0xe6f5c9 0xfff2ae
   0xf1e2cc 0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69
   0xfccde5 0xbc80bd 0xffed6f])

(def ^:private schemes
  {:accent
   {:3 [325 326 327]
    :4 [325 326 327 291]
    :5 [325 326 327 291 328]
    :6 [325 326 327 291 328 329]
    :7 [325 326 327 291 328 329 330]
    :8 [325 326 327 291 328 329 330 299]}
   :blue-green
   {:3 [151 152 153]
    :4 [154 155 156 125]
    :5 [154 155 156 153 126]
    :6 [154 157 152 156 153 126]
    :7 [154 157 152 156 158 125 159]
    :8 [160 151 157 152 156 158 125 159]
    :9 [160 151 157 152 156 158 125 126 129]}
   :blue-purple
   {:3 [300 301 302]
    :4 [154 303 304 305]
    :5 [154 303 304 302 306]
    :6 [154 307 301 304 302 306]
    :7 [154 307 301 304 308 305 309]
    :8 [160 300 307 301 304 308 305 309]
    :9 [160 300 307 301 304 308 305 306 310]}
   :blues
   {:3 [30 31 32]
    :4 [33 34 35 36]
    :5 [33 34 35 32 37]
    :6 [33 38 31 35 32 37]
    :7 [33 38 31 35 39 36 40]
    :8 [41 30 38 31 35 39 36 40]
    :9 [41 30 38 31 35 39 36 37 42]}
   :brown-blue-green
   {:3 [262 254 263]
    :4 [260 252 256 261]
    :5 [260 252 254 256 261]
    :6 [250 262 253 255 263 258]
    :7 [250 262 253 254 255 263 258]
    :8 [250 251 252 253 255 256 257 258]
    :9 [250 251 252 253 254 255 256 257 258]
    :10 [249 250 251 252 253 255 256 257 258 259]
    :11 [249 250 251 252 253 254 255 256 257 258 259]}
   :dark2
   {:3 [293 294 295]
    :4 [293 294 295 77]
    :5 [293 294 295 77 296]
    :6 [293 294 295 77 296 297]
    :7 [293 294 295 77 296 297 298]
    :8 [293 294 295 77 296 297 298 299]}
   :green-blue
   {:3 [107 108 109]
    :4 [110 111 112 113]
    :5 [110 111 112 109 114]
    :6 [110 115 108 112 109 114]
    :7 [110 115 108 112 116 113 117]
    :8 [118 107 115 108 112 116 113 117]
    :9 [118 107 115 108 112 116 113 114 119]}
   :greens
   {:3 [120 121 45]
    :4 [122 123 124 125]
    :5 [122 123 124 45 126]
    :6 [122 127 121 124 45 126]
    :7 [122 127 121 124 52 125 53]
    :8 [128 120 127 121 124 52 125 53]
    :9 [128 120 127 121 124 52 125 126 129]}
   :greys
   {:3 [130 131 132]
    :4 [20 133 134 135]
    :5 [20 133 134 132 136]
    :6 [20 137 131 134 132 136]
    :7 [20 137 131 134 138 135 136]
    :8 [139 130 137 131 134 138 135 136]
    :9 [139 130 137 131 134 138 135 136 140]}
   :orange-red
   {:3 [56 57 58]
    :4 [59 60 13 61]
    :5 [59 60 13 58 62]
    :6 [59 63 57 13 58 62]
    :7 [59 63 57 13 64 61 65]
    :8 [66 56 63 57 13 64 61 65]
    :9 [66 56 63 57 13 64 61 62 67]}
   :oranges
   {:3 [93 94 95]
    :4 [96 97 98 99]
    :5 [96 97 98 95 100]
    :6 [96 101 94 98 95 100]
    :7 [96 101 94 98 102 103 104]
    :8 [105 93 101 94 98 102 103 104]
    :9 [105 93 101 94 98 102 103 100 106]}
   :paired
   {:10 [283 284 285 286 287 225 288 215 289 290]
    :11 [283 284 285 286 287 225 288 215 289 290 291]
    :12 [283 284 285 286 287 225 288 215 289 290 291 292]
    :3 [283 284 285]
    :4 [283 284 285 286]
    :5 [283 284 285 286 287]
    :6 [283 284 285 286 287 225]
    :7 [283 284 285 286 287 225 288]
    :8 [283 284 285 286 287 225 288 215]
    :9 [283 284 285 286 287 225 288 215 289]}
   :pastel1
   {:3 [331 303 115]
    :4 [331 303 115 332]
    :5 [331 303 115 332 333]
    :6 [331 303 115 332 333 46]
    :7 [331 303 115 332 333 46 334]
    :8 [331 303 115 332 333 46 334 335]
    :9 [331 303 115 332 333 46 334 335 336]}
   :pastel2
   {:3 [362 363 364]
    :4 [362 363 364 365]
    :5 [362 363 364 365 366]
    :6 [362 363 364 365 366 367]
    :7 [362 363 364 365 366 367 368]
    :8 [362 363 364 365 366 367 368 133]}
   :pink-yellow-green
   {:3 [323 20 324]
    :4 [321 314 317 322]
    :5 [321 314 20 317 322]
    :6 [312 323 315 316 324 319]
    :7 [312 323 315 20 316 324 319]
    :8 [312 313 314 315 316 317 318 319]
    :9 [312 313 314 315 20 316 317 318 319]
    :10 [311 312 313 314 315 316 317 318 319 320]
    :11 [311 312 313 314 315 20 316 317 318 319 320]}
   :purple-blue
   {:3 [231 175 113]
    :4 [71 178 232 233]
    :5 [71 178 232 113 234]
    :6 [71 182 175 232 113 234]
    :7 [71 182 175 232 183 233 235]
    :8 [185 231 182 175 232 183 233 235]
    :9 [185 231 182 175 232 183 233 234 236]}
   :purple-blue-green
   {:3 [174 175 176]
    :4 [177 178 179 180]
    :5 [177 178 179 176 181]
    :6 [177 182 175 179 176 181]
    :7 [177 182 175 179 183 180 184]
    :8 [185 174 182 175 179 183 180 184]
    :9 [185 174 182 175 179 183 180 181 186]}
   :purple-green
   {:3 [209 20 210]
    :4 [207 201 204 208]
    :5 [207 201 20 204 208]
    :6 [199 209 202 203 210 206]
    :7 [199 209 202 20 203 210 206]
    :8 [199 200 201 202 203 204 205 206]
    :9 [199 200 201 202 20 203 204 205 206]
    :10 [198 199 200 201 202 203 204 205 206 129]
    :11 [198 199 200 201 202 20 203 204 205 206 129]}
   :purple-orange
   {:3 [28 20 29]
    :4 [26 18 22 27]
    :5 [26 18 20 22 27]
    :6 [16 28 19 21 29 24]
    :7 [16 28 19 20 21 29 24]
    :8 [16 17 18 19 21 22 23 24]
    :9 [16 17 18 19 20 21 22 23 24]
    :10 [15 16 17 18 19 21 22 23 24 25]
    :11 [15 16 17 18 19 20 21 22 23 24 25]}
   :purple-red
   {:3 [68 69 70]
    :4 [71 72 73 74]
    :5 [71 72 73 70 75]
    :6 [71 76 69 73 70 75]
    :7 [71 76 69 73 77 74 78]
    :8 [79 68 76 69 73 77 74 78]
    :9 [79 68 76 69 73 77 74 75 80]}
   :purples
   {:3 [337 338 339]
    :4 [340 341 342 343]
    :5 [340 341 342 339 344]
    :6 [340 345 338 342 339 344]
    :7 [340 345 338 342 346 343 347]
    :8 [348 337 345 338 342 346 343 347]
    :9 [348 337 345 338 342 346 343 344 349]}
   :red-blue
   {:3 [248 20 179]
    :4 [246 239 278 282]
    :5 [246 239 20 278 282]
    :6 [237 248 240 277 179 280]
    :7 [237 248 240 20 277 179 280]
    :8 [237 238 239 240 277 278 279 280]
    :9 [237 238 239 240 20 277 278 279 280]
    :10 [80 237 238 239 240 277 278 279 280 281]
    :11 [80 237 238 239 240 20 277 278 279 280 281]}
   :red-grey
   {:3 [248 139 219]
    :4 [246 239 242 247]
    :5 [246 239 139 242 247]
    :6 [237 248 240 241 219 244]
    :7 [237 248 240 139 241 219 244]
    :8 [237 238 239 240 241 242 243 244]
    :9 [237 238 239 240 139 241 242 243 244]
    :10 [80 237 238 239 240 241 242 243 244 245]
    :11 [80 237 238 239 240 139 241 242 243 244 245]}
   :red-purple
   {:3 [350 351 352]
    :4 [353 354 355 356]
    :5 [353 354 355 352 357]
    :6 [353 358 351 355 352 357]
    :7 [353 358 351 355 359 356 357]
    :8 [360 350 358 351 355 359 356 357]
    :9 [360 350 358 351 355 359 356 357 361]}
   :red-yellow-blue
   {:3 [13 5 150]
    :4 [11 3 145 149]
    :5 [11 3 5 145 149]
    :6 [142 13 143 144 150 147]
    :7 [142 13 143 5 144 150 147]
    :8 [142 2 3 143 144 145 146 147]
    :9 [142 2 3 143 5 144 145 146 147]
    :10 [141 142 2 3 143 144 145 146 147 148]
    :11 [141 142 2 3 143 5 144 145 146 147 148]}
   :red-yellow-green
   {:3 [13 5 173]
    :4 [11 3 169 172]
    :5 [11 3 5 169 172]
    :6 [142 13 4 168 173 171]
    :7 [142 13 4 5 168 173 171]
    :8 [142 2 3 4 168 169 170 171]
    :9 [142 2 3 4 5 168 169 170 171]
    :10 [141 142 2 3 4 168 169 170 171 50]
    :11 [141 142 2 3 4 5 168 169 170 171 50]}
   :reds
   {:3 [264 265 266]
    :4 [267 268 269 270]
    :5 [267 268 269 266 271]
    :6 [267 272 265 269 266 271]
    :7 [267 272 265 269 273 270 274]
    :8 [275 264 272 265 269 273 270 274]
    :9 [275 264 272 265 269 273 270 271 276]}
   :set1
   {:3 [211 212 213]
    :4 [211 212 213 214]
    :5 [211 212 213 214 215]
    :6 [211 212 213 214 215 216]
    :7 [211 212 213 214 215 216 217]
    :8 [211 212 213 214 215 216 217 218]
    :9 [211 212 213 214 215 216 217 218 219]}
   :set2
   {:3 [8 161 162]
    :4 [8 161 162 163]
    :5 [8 161 162 163 164]
    :6 [8 161 162 163 164 165]
    :7 [8 161 162 163 164 165 166]
    :8 [8 161 162 163 164 165 166 167]}
   :set3
   {:3 [369 370 371]
    :4 [369 370 371 372]
    :5 [369 370 371 372 373]
    :6 [369 370 371 372 373 374]
    :7 [369 370 371 372 373 374 375]
    :8 [369 370 371 372 373 374 375 376]
    :9 [369 370 371 372 373 374 375 376 137]
    :10 [369 370 371 372 373 374 375 376 137 377]
    :11 [369 370 371 372 373 374 375 376 137 377 115]
    :12 [369 370 371 372 373 374 375 376 137 377 115 378]}
   :spectral
   {:10 [0 1 2 3 4 6 7 8 9 10]
    :11 [0 1 2 3 4 5 6 7 8 9 10]
    :3 [13 5 14]
    :4 [11 3 7 12]
    :5 [11 3 5 7 12]
    :6 [1 13 4 6 14 9]
    :7 [1 13 4 5 6 14 9]
    :8 [1 2 3 4 6 7 8 9]
    :9 [1 2 3 4 5 6 7 8 9]}
   :yellow-green
   {:3 [43 44 45]
    :4 [46 47 48 49]
    :5 [46 47 48 45 50]
    :6 [46 51 44 48 45 50]
    :7 [46 51 44 48 52 49 53]
    :8 [54 43 51 44 48 52 49 53]
    :9 [54 43 51 44 48 52 49 50 55]}
   :yellow-green-blue
   {:3 [81 82 83]
    :4 [46 84 85 86]
    :5 [46 84 85 83 87]
    :6 [46 88 82 85 83 87]
    :7 [46 88 82 85 89 86 90]
    :8 [91 81 88 82 85 89 86 90]
    :9 [91 81 88 82 85 89 86 87 92]}
   :yellow-orange-brown
   {:3 [187 188 189]
    :4 [190 191 192 193]
    :5 [190 191 192 189 194]
    :6 [190 195 188 192 189 194]
    :7 [190 195 188 192 196 193 104]
    :8 [54 187 195 188 192 196 193 104]
    :9 [54 187 195 188 192 196 193 194 197]}
   :yellow-orange-red
   {:3 [220 221 222]
    :4 [223 224 98 225]
    :5 [223 224 98 222 226]
    :6 [223 227 221 98 222 226]
    :7 [223 227 221 98 228 225 229]
    :8 [46 220 227 221 98 228 225 229]
    :9 [46 220 227 221 98 228 225 226 230]}})

(defn brewer-scheme-int
  [pallette cls]
  (if-let [cols (get-in schemes [pallette (keyword (str cls))])]
    (mapv uniques cols)))

(defn brewer-scheme-rgb
  [pallette cls]
  (if-let [cols (brewer-scheme-int pallette cls)]
    (mapv #(-> % col/int24 col/as-rgba) cols)))

(defn brewer-scheme-css
  [pallette cls]
  (if-let [cols (brewer-scheme-int pallette cls)]
    (mapv #(-> % col/int24 col/as-css) cols)))

Original (uncompressed) version

The following code block is not part of the library distribution and only used to produce the compressed version of these schemes above.

(def pallettes
  {:yellow-green
   {:3 [0xf7fcb9 0xaddd8e 0x31a354]
    :4 [0xffffcc 0xc2e699 0x78c679 0x238443]
    :5 [0xffffcc 0xc2e699 0x78c679 0x31a354 0x006837]
    :6 [0xffffcc 0xd9f0a3 0xaddd8e 0x78c679 0x31a354 0x006837]
    :7 [0xffffcc 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x005a32]
    :8 [0xffffe5 0xf7fcb9 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x005a32]
    :9 [0xffffe5 0xf7fcb9 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x006837 0x004529]}
   :yellow-green-blue
   {:3 [0xedf8b1 0x7fcdbb 0x2c7fb8]
    :4 [0xffffcc 0xa1dab4 0x41b6c4 0x225ea8]
    :5 [0xffffcc 0xa1dab4 0x41b6c4 0x2c7fb8 0x253494]
    :6 [0xffffcc 0xc7e9b4 0x7fcdbb 0x41b6c4 0x2c7fb8 0x253494]
    :7 [0xffffcc 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x0c2c84]
    :8 [0xffffd9 0xedf8b1 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x0c2c84]
    :9 [0xffffd9 0xedf8b1 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x253494 0x081d58]}
   :green-blue
   {:3 [0xe0f3db 0xa8ddb5 0x43a2ca]
    :4 [0xf0f9e8 0xbae4bc 0x7bccc4 0x2b8cbe]
    :5 [0xf0f9e8 0xbae4bc 0x7bccc4 0x43a2ca 0x0868ac]
    :6 [0xf0f9e8 0xccebc5 0xa8ddb5 0x7bccc4 0x43a2ca 0x0868ac]
    :7 [0xf0f9e8 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x08589e]
    :8 [0xf7fcf0 0xe0f3db 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x08589e]
    :9 [0xf7fcf0 0xe0f3db 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x0868ac 0x084081]}
   :blue-green
   {:3 [0xe5f5f9 0x99d8c9 0x2ca25f]
    :4 [0xedf8fb 0xb2e2e2 0x66c2a4 0x238b45]
    :5 [0xedf8fb 0xb2e2e2 0x66c2a4 0x2ca25f 0x006d2c]
    :6 [0xedf8fb 0xccece6 0x99d8c9 0x66c2a4 0x2ca25f 0x006d2c]
    :7 [0xedf8fb 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x005824]
    :8 [0xf7fcfd 0xe5f5f9 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x005824]
    :9 [0xf7fcfd 0xe5f5f9 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x006d2c 0x00441b]}
   :purple-blue-green
   {:3 [0xece2f0 0xa6bddb 0x1c9099]
    :4 [0xf6eff7 0xbdc9e1 0x67a9cf 0x02818a]
    :5 [0xf6eff7 0xbdc9e1 0x67a9cf 0x1c9099 0x016c59]
    :6 [0xf6eff7 0xd0d1e6 0xa6bddb 0x67a9cf 0x1c9099 0x016c59]
    :7 [0xf6eff7 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016450]
    :8 [0xfff7fb 0xece2f0 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016450]
    :9 [0xfff7fb 0xece2f0 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016c59 0x014636]}
   :purple-blue
   {:3 [0xece7f2 0xa6bddb 0x2b8cbe]
    :4 [0xf1eef6 0xbdc9e1 0x74a9cf 0x0570b0]
    :5 [0xf1eef6 0xbdc9e1 0x74a9cf 0x2b8cbe 0x045a8d]
    :6 [0xf1eef6 0xd0d1e6 0xa6bddb 0x74a9cf 0x2b8cbe 0x045a8d]
    :7 [0xf1eef6 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x034e7b]
    :8 [0xfff7fb 0xece7f2 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x034e7b]
    :9 [0xfff7fb 0xece7f2 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x045a8d 0x023858]}
   :blue-purple
   {:3 [0xe0ecf4 0x9ebcda 0x8856a7]
    :4 [0xedf8fb 0xb3cde3 0x8c96c6 0x88419d]
    :5 [0xedf8fb 0xb3cde3 0x8c96c6 0x8856a7 0x810f7c]
    :6 [0xedf8fb 0xbfd3e6 0x9ebcda 0x8c96c6 0x8856a7 0x810f7c]
    :7 [0xedf8fb 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x6e016b]
    :8 [0xf7fcfd 0xe0ecf4 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x6e016b]
    :9 [0xf7fcfd 0xe0ecf4 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x810f7c 0x4d004b]}
   :red-purple
   {:3 [0xfde0dd 0xfa9fb5 0xc51b8a]
    :4 [0xfeebe2 0xfbb4b9 0xf768a1 0xae017e]
    :5 [0xfeebe2 0xfbb4b9 0xf768a1 0xc51b8a 0x7a0177]
    :6 [0xfeebe2 0xfcc5c0 0xfa9fb5 0xf768a1 0xc51b8a 0x7a0177]
    :7 [0xfeebe2 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177]
    :8 [0xfff7f3 0xfde0dd 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177]
    :9 [0xfff7f3 0xfde0dd 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177 0x49006a]}
   :purple-red
   {:3 [0xe7e1ef 0xc994c7 0xdd1c77]
    :4 [0xf1eef6 0xd7b5d8 0xdf65b0 0xce1256]
    :5 [0xf1eef6 0xd7b5d8 0xdf65b0 0xdd1c77 0x980043]
    :6 [0xf1eef6 0xd4b9da 0xc994c7 0xdf65b0 0xdd1c77 0x980043]
    :7 [0xf1eef6 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x91003f]
    :8 [0xf7f4f9 0xe7e1ef 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x91003f]
    :9 [0xf7f4f9 0xe7e1ef 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x980043 0x67001f]}
   :orange-red
   {:3 [0xfee8c8 0xfdbb84 0xe34a33]
    :4 [0xfef0d9 0xfdcc8a 0xfc8d59 0xd7301f]
    :5 [0xfef0d9 0xfdcc8a 0xfc8d59 0xe34a33 0xb30000]
    :6 [0xfef0d9 0xfdd49e 0xfdbb84 0xfc8d59 0xe34a33 0xb30000]
    :7 [0xfef0d9 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0x990000]
    :8 [0xfff7ec 0xfee8c8 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0x990000]
    :9 [0xfff7ec 0xfee8c8 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0xb30000 0x7f0000]}
   :yellow-orange-red
   {:3 [0xffeda0 0xfeb24c 0xf03b20]
    :4 [0xffffb2 0xfecc5c 0xfd8d3c 0xe31a1c]
    :5 [0xffffb2 0xfecc5c 0xfd8d3c 0xf03b20 0xbd0026]
    :6 [0xffffb2 0xfed976 0xfeb24c 0xfd8d3c 0xf03b20 0xbd0026]
    :7 [0xffffb2 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xb10026]
    :8 [0xffffcc 0xffeda0 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xb10026]
    :9 [0xffffcc 0xffeda0 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xbd0026 0x800026]}
   :yellow-orange-brown
   {:3 [0xfff7bc 0xfec44f 0xd95f0e]
    :4 [0xffffd4 0xfed98e 0xfe9929 0xcc4c02]
    :5 [0xffffd4 0xfed98e 0xfe9929 0xd95f0e 0x993404]
    :6 [0xffffd4 0xfee391 0xfec44f 0xfe9929 0xd95f0e 0x993404]
    :7 [0xffffd4 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x8c2d04]
    :8 [0xffffe5 0xfff7bc 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x8c2d04]
    :9 [0xffffe5 0xfff7bc 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x993404 0x662506]}
   :purples
   {:3 [0xefedf5 0xbcbddc 0x756bb1]
    :4 [0xf2f0f7 0xcbc9e2 0x9e9ac8 0x6a51a3]
    :5 [0xf2f0f7 0xcbc9e2 0x9e9ac8 0x756bb1 0x54278f]
    :6 [0xf2f0f7 0xdadaeb 0xbcbddc 0x9e9ac8 0x756bb1 0x54278f]
    :7 [0xf2f0f7 0xdadaeb 0xbcbddc 0x9e9ac8 0x807dba 0x6a51a3 0x4a1486]
    :8 [0xfcfbfd 0xefedf5 0xdadaeb 0xbcbddc 0x9e9ac8 0x807dba 0x6a51a3 0x4a1486]
    :9 [0xfcfbfd 0xefedf5 0xdadaeb 0xbcbddc 0x9e9ac8 0x807dba 0x6a51a3 0x54278f 0x3f007d]}
   :blues
   {:3 [0xdeebf7 0x9ecae1 0x3182bd]
    :4 [0xeff3ff 0xbdd7e7 0x6baed6 0x2171b5]
    :5 [0xeff3ff 0xbdd7e7 0x6baed6 0x3182bd 0x08519c]
    :6 [0xeff3ff 0xc6dbef 0x9ecae1 0x6baed6 0x3182bd 0x08519c]
    :7 [0xeff3ff 0xc6dbef 0x9ecae1 0x6baed6 0x4292c6 0x2171b5 0x084594]
    :8 [0xf7fbff 0xdeebf7 0xc6dbef 0x9ecae1 0x6baed6 0x4292c6 0x2171b5 0x084594]
    :9 [0xf7fbff 0xdeebf7 0xc6dbef 0x9ecae1 0x6baed6 0x4292c6 0x2171b5 0x08519c 0x08306b]}
   :greens
   {:3 [0xe5f5e0 0xa1d99b 0x31a354]
    :4 [0xedf8e9 0xbae4b3 0x74c476 0x238b45]
    :5 [0xedf8e9 0xbae4b3 0x74c476 0x31a354 0x006d2c]
    :6 [0xedf8e9 0xc7e9c0 0xa1d99b 0x74c476 0x31a354 0x006d2c]
    :7 [0xedf8e9 0xc7e9c0 0xa1d99b 0x74c476 0x41ab5d 0x238b45 0x005a32]
    :8 [0xf7fcf5 0xe5f5e0 0xc7e9c0 0xa1d99b 0x74c476 0x41ab5d 0x238b45 0x005a32]
    :9 [0xf7fcf5 0xe5f5e0 0xc7e9c0 0xa1d99b 0x74c476 0x41ab5d 0x238b45 0x006d2c 0x00441b]}
   :oranges
   {:3 [0xfee6ce 0xfdae6b 0xe6550d]
    :4 [0xfeedde 0xfdbe85 0xfd8d3c 0xd94701]
    :5 [0xfeedde 0xfdbe85 0xfd8d3c 0xe6550d 0xa63603]
    :6 [0xfeedde 0xfdd0a2 0xfdae6b 0xfd8d3c 0xe6550d 0xa63603]
    :7 [0xfeedde 0xfdd0a2 0xfdae6b 0xfd8d3c 0xf16913 0xd94801 0x8c2d04]
    :8 [0xfff5eb 0xfee6ce 0xfdd0a2 0xfdae6b 0xfd8d3c 0xf16913 0xd94801 0x8c2d04]
    :9 [0xfff5eb 0xfee6ce 0xfdd0a2 0xfdae6b 0xfd8d3c 0xf16913 0xd94801 0xa63603 0x7f2704]}
   :reds
   {:3 [0xfee0d2 0xfc9272 0xde2d26]
    :4 [0xfee5d9 0xfcae91 0xfb6a4a 0xcb181d]
    :5 [0xfee5d9 0xfcae91 0xfb6a4a 0xde2d26 0xa50f15]
    :6 [0xfee5d9 0xfcbba1 0xfc9272 0xfb6a4a 0xde2d26 0xa50f15]
    :7 [0xfee5d9 0xfcbba1 0xfc9272 0xfb6a4a 0xef3b2c 0xcb181d 0x99000d]
    :8 [0xfff5f0 0xfee0d2 0xfcbba1 0xfc9272 0xfb6a4a 0xef3b2c 0xcb181d 0x99000d]
    :9 [0xfff5f0 0xfee0d2 0xfcbba1 0xfc9272 0xfb6a4a 0xef3b2c 0xcb181d 0xa50f15 0x67000d]}
   :greys
   {:3 [0xf0f0f0 0xbdbdbd 0x636363]
    :4 [0xf7f7f7 0xcccccc 0x969696 0x525252]
    :5 [0xf7f7f7 0xcccccc 0x969696 0x636363 0x252525]
    :6 [0xf7f7f7 0xd9d9d9 0xbdbdbd 0x969696 0x636363 0x252525]
    :7 [0xf7f7f7 0xd9d9d9 0xbdbdbd 0x969696 0x737373 0x525252 0x252525]
    :8 [0xffffff 0xf0f0f0 0xd9d9d9 0xbdbdbd 0x969696 0x737373 0x525252 0x252525]
    :9 [0xffffff 0xf0f0f0 0xd9d9d9 0xbdbdbd 0x969696 0x737373 0x525252 0x252525 0x000000]}
   :purple-orange
   {:3 [0xf1a340 0xf7f7f7 0x998ec3]
    :4 [0xe66101 0xfdb863 0xb2abd2 0x5e3c99]
    :5 [0xe66101 0xfdb863 0xf7f7f7 0xb2abd2 0x5e3c99]
    :6 [0xb35806 0xf1a340 0xfee0b6 0xd8daeb 0x998ec3 0x542788]
    :7 [0xb35806 0xf1a340 0xfee0b6 0xf7f7f7 0xd8daeb 0x998ec3 0x542788]
    :8 [0xb35806 0xe08214 0xfdb863 0xfee0b6 0xd8daeb 0xb2abd2 0x8073ac 0x542788]
    :9 [0xb35806 0xe08214 0xfdb863 0xfee0b6 0xf7f7f7 0xd8daeb 0xb2abd2 0x8073ac 0x542788]
    :10 [0x7f3b08 0xb35806 0xe08214 0xfdb863 0xfee0b6 0xd8daeb 0xb2abd2 0x8073ac 0x542788 0x2d004b]
    :11 [0x7f3b08 0xb35806 0xe08214 0xfdb863 0xfee0b6 0xf7f7f7 0xd8daeb 0xb2abd2 0x8073ac 0x542788 0x2d004b]}
   :brown-blue-green
   {:3 [0xd8b365 0xf5f5f5 0x5ab4ac]
    :4 [0xa6611a 0xdfc27d 0x80cdc1 0x018571]
    :5 [0xa6611a 0xdfc27d 0xf5f5f5 0x80cdc1 0x018571]
    :6 [0x8c510a 0xd8b365 0xf6e8c3 0xc7eae5 0x5ab4ac 0x01665e]
    :7 [0x8c510a 0xd8b365 0xf6e8c3 0xf5f5f5 0xc7eae5 0x5ab4ac 0x01665e]
    :8 [0x8c510a 0xbf812d 0xdfc27d 0xf6e8c3 0xc7eae5 0x80cdc1 0x35978f 0x01665e]
    :9 [0x8c510a 0xbf812d 0xdfc27d 0xf6e8c3 0xf5f5f5 0xc7eae5 0x80cdc1 0x35978f 0x01665e]
    :10 [0x543005 0x8c510a 0xbf812d 0xdfc27d 0xf6e8c3 0xc7eae5 0x80cdc1 0x35978f 0x01665e 0x003c30]
    :11 [0x543005 0x8c510a 0xbf812d 0xdfc27d 0xf6e8c3 0xf5f5f5 0xc7eae5 0x80cdc1 0x35978f 0x01665e 0x003c30]}
   :purple-green
   {:3 [0xaf8dc3 0xf7f7f7 0x7fbf7b]
    :4 [0x7b3294 0xc2a5cf 0xa6dba0 0x008837]
    :5 [0x7b3294 0xc2a5cf 0xf7f7f7 0xa6dba0 0x008837]
    :6 [0x762a83 0xaf8dc3 0xe7d4e8 0xd9f0d3 0x7fbf7b 0x1b7837]
    :7 [0x762a83 0xaf8dc3 0xe7d4e8 0xf7f7f7 0xd9f0d3 0x7fbf7b 0x1b7837]
    :8 [0x762a83 0x9970ab 0xc2a5cf 0xe7d4e8 0xd9f0d3 0xa6dba0 0x5aae61 0x1b7837]
    :9 [0x762a83 0x9970ab 0xc2a5cf 0xe7d4e8 0xf7f7f7 0xd9f0d3 0xa6dba0 0x5aae61 0x1b7837]
    :10 [0x40004b 0x762a83 0x9970ab 0xc2a5cf 0xe7d4e8 0xd9f0d3 0xa6dba0 0x5aae61 0x1b7837 0x00441b]
    :11 [0x40004b 0x762a83 0x9970ab 0xc2a5cf 0xe7d4e8 0xf7f7f7 0xd9f0d3 0xa6dba0 0x5aae61 0x1b7837 0x00441b]}
   :pink-yellow-green
   {:3 [0xe9a3c9 0xf7f7f7 0xa1d76a]
    :4 [0xd01c8b 0xf1b6da 0xb8e186 0x4dac26]
    :5 [0xd01c8b 0xf1b6da 0xf7f7f7 0xb8e186 0x4dac26]
    :6 [0xc51b7d 0xe9a3c9 0xfde0ef 0xe6f5d0 0xa1d76a 0x4d9221]
    :7 [0xc51b7d 0xe9a3c9 0xfde0ef 0xf7f7f7 0xe6f5d0 0xa1d76a 0x4d9221]
    :8 [0xc51b7d 0xde77ae 0xf1b6da 0xfde0ef 0xe6f5d0 0xb8e186 0x7fbc41 0x4d9221]
    :9 [0xc51b7d 0xde77ae 0xf1b6da 0xfde0ef 0xf7f7f7 0xe6f5d0 0xb8e186 0x7fbc41 0x4d9221]
    :10 [0x8e0152 0xc51b7d 0xde77ae 0xf1b6da 0xfde0ef 0xe6f5d0 0xb8e186 0x7fbc41 0x4d9221 0x276419]
    :11 [0x8e0152 0xc51b7d 0xde77ae 0xf1b6da 0xfde0ef 0xf7f7f7 0xe6f5d0 0xb8e186 0x7fbc41 0x4d9221 0x276419]}
   :red-blue
   {:3 [0xef8a62 0xf7f7f7 0x67a9cf]
    :4 [0xca0020 0xf4a582 0x92c5de 0x0571b0]
    :5 [0xca0020 0xf4a582 0xf7f7f7 0x92c5de 0x0571b0]
    :6 [0xb2182b 0xef8a62 0xfddbc7 0xd1e5f0 0x67a9cf 0x2166ac]
    :7 [0xb2182b 0xef8a62 0xfddbc7 0xf7f7f7 0xd1e5f0 0x67a9cf 0x2166ac]
    :8 [0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xd1e5f0 0x92c5de 0x4393c3 0x2166ac]
    :9 [0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xf7f7f7 0xd1e5f0 0x92c5de 0x4393c3 0x2166ac]
    :10 [0x67001f 0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xd1e5f0 0x92c5de 0x4393c3 0x2166ac 0x053061]
    :11 [0x67001f 0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xf7f7f7 0xd1e5f0 0x92c5de 0x4393c3 0x2166ac 0x053061]}
   :red-grey
   {:3 [0xef8a62 0xffffff 0x999999]
    :4 [0xca0020 0xf4a582 0xbababa 0x404040]
    :5 [0xca0020 0xf4a582 0xffffff 0xbababa 0x404040]
    :6 [0xb2182b 0xef8a62 0xfddbc7 0xe0e0e0 0x999999 0x4d4d4d]
    :7 [0xb2182b 0xef8a62 0xfddbc7 0xffffff 0xe0e0e0 0x999999 0x4d4d4d]
    :8 [0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xe0e0e0 0xbababa 0x878787 0x4d4d4d]
    :9 [0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xffffff 0xe0e0e0 0xbababa 0x878787 0x4d4d4d]
    :10 [0x67001f 0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xe0e0e0 0xbababa 0x878787 0x4d4d4d 0x1a1a1a]
    :11 [0x67001f 0xb2182b 0xd6604d 0xf4a582 0xfddbc7 0xffffff 0xe0e0e0 0xbababa 0x878787 0x4d4d4d 0x1a1a1a]}
   :red-yellow-blue
   {:3 [0xfc8d59 0xffffbf 0x91bfdb]
    :4 [0xd7191c 0xfdae61 0xabd9e9 0x2c7bb6]
    :5 [0xd7191c 0xfdae61 0xffffbf 0xabd9e9 0x2c7bb6]
    :6 [0xd73027 0xfc8d59 0xfee090 0xe0f3f8 0x91bfdb 0x4575b4]
    :7 [0xd73027 0xfc8d59 0xfee090 0xffffbf 0xe0f3f8 0x91bfdb 0x4575b4]
    :8 [0xd73027 0xf46d43 0xfdae61 0xfee090 0xe0f3f8 0xabd9e9 0x74add1 0x4575b4]
    :9 [0xd73027 0xf46d43 0xfdae61 0xfee090 0xffffbf 0xe0f3f8 0xabd9e9 0x74add1 0x4575b4]
    :10 [0xa50026 0xd73027 0xf46d43 0xfdae61 0xfee090 0xe0f3f8 0xabd9e9 0x74add1 0x4575b4 0x313695]
    :11 [0xa50026 0xd73027 0xf46d43 0xfdae61 0xfee090 0xffffbf 0xe0f3f8 0xabd9e9 0x74add1 0x4575b4 0x313695]}
   :spectral
   {:3 [0xfc8d59 0xffffbf 0x99d594]
    :4 [0xd7191c 0xfdae61 0xabdda4 0x2b83ba]
    :5 [0xd7191c 0xfdae61 0xffffbf 0xabdda4 0x2b83ba]
    :6 [0xd53e4f 0xfc8d59 0xfee08b 0xe6f598 0x99d594 0x3288bd]
    :7 [0xd53e4f 0xfc8d59 0xfee08b 0xffffbf 0xe6f598 0x99d594 0x3288bd]
    :8 [0xd53e4f 0xf46d43 0xfdae61 0xfee08b 0xe6f598 0xabdda4 0x66c2a5 0x3288bd]
    :9 [0xd53e4f 0xf46d43 0xfdae61 0xfee08b 0xffffbf 0xe6f598 0xabdda4 0x66c2a5 0x3288bd]
    :10 [0x9e0142 0xd53e4f 0xf46d43 0xfdae61 0xfee08b 0xe6f598 0xabdda4 0x66c2a5 0x3288bd 0x5e4fa2]
    :11 [0x9e0142 0xd53e4f 0xf46d43 0xfdae61 0xfee08b 0xffffbf 0xe6f598 0xabdda4 0x66c2a5 0x3288bd 0x5e4fa2]}
   :red-yellow-green
   {:3 [0xfc8d59 0xffffbf 0x91cf60]
    :4 [0xd7191c 0xfdae61 0xa6d96a 0x1a9641]
    :5 [0xd7191c 0xfdae61 0xffffbf 0xa6d96a 0x1a9641]
    :6 [0xd73027 0xfc8d59 0xfee08b 0xd9ef8b 0x91cf60 0x1a9850]
    :7 [0xd73027 0xfc8d59 0xfee08b 0xffffbf 0xd9ef8b 0x91cf60 0x1a9850]
    :8 [0xd73027 0xf46d43 0xfdae61 0xfee08b 0xd9ef8b 0xa6d96a 0x66bd63 0x1a9850]
    :9 [0xd73027 0xf46d43 0xfdae61 0xfee08b 0xffffbf 0xd9ef8b 0xa6d96a 0x66bd63 0x1a9850]
    :10 [0xa50026 0xd73027 0xf46d43 0xfdae61 0xfee08b 0xd9ef8b 0xa6d96a 0x66bd63 0x1a9850 0x006837]
    :11 [0xa50026 0xd73027 0xf46d43 0xfdae61 0xfee08b 0xffffbf 0xd9ef8b 0xa6d96a 0x66bd63 0x1a9850 0x006837]}
   :accent
   {:3 [0x7fc97f 0xbeaed4 0xfdc086]
    :4 [0x7fc97f 0xbeaed4 0xfdc086 0xffff99]
    :5 [0x7fc97f 0xbeaed4 0xfdc086 0xffff99 0x386cb0]
    :6 [0x7fc97f 0xbeaed4 0xfdc086 0xffff99 0x386cb0 0xf0027f]
    :7 [0x7fc97f 0xbeaed4 0xfdc086 0xffff99 0x386cb0 0xf0027f 0xbf5b17]
    :8 [0x7fc97f 0xbeaed4 0xfdc086 0xffff99 0x386cb0 0xf0027f 0xbf5b17 0x666666]}
   :dark2
   {:3 [0x1b9e77 0xd95f02 0x7570b3]
    :4 [0x1b9e77 0xd95f02 0x7570b3 0xe7298a]
    :5 [0x1b9e77 0xd95f02 0x7570b3 0xe7298a 0x66a61e]
    :6 [0x1b9e77 0xd95f02 0x7570b3 0xe7298a 0x66a61e 0xe6ab02]
    :7 [0x1b9e77 0xd95f02 0x7570b3 0xe7298a 0x66a61e 0xe6ab02 0xa6761d]
    :8 [0x1b9e77 0xd95f02 0x7570b3 0xe7298a 0x66a61e 0xe6ab02 0xa6761d 0x666666]}
   :paired
   {:3 [0xa6cee3 0x1f78b4 0xb2df8a]
    :4 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c]
    :5 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99]
    :6 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c]
    :7 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f]
    :8 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f 0xff7f00]
    :9 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f 0xff7f00 0xcab2d6]
    :10 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f 0xff7f00 0xcab2d6 0x6a3d9a]
    :11 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f 0xff7f00 0xcab2d6 0x6a3d9a 0xffff99]
    :12 [0xa6cee3 0x1f78b4 0xb2df8a 0x33a02c 0xfb9a99 0xe31a1c 0xfdbf6f 0xff7f00 0xcab2d6 0x6a3d9a 0xffff99 0xb15928]}
   :pastel1
   {:3 [0xfbb4ae 0xb3cde3 0xccebc5]
    :4 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4]
    :5 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4 0xfed9a6]
    :6 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4 0xfed9a6 0xffffcc]
    :7 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4 0xfed9a6 0xffffcc 0xe5d8bd]
    :8 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4 0xfed9a6 0xffffcc 0xe5d8bd 0xfddaec]
    :9 [0xfbb4ae 0xb3cde3 0xccebc5 0xdecbe4 0xfed9a6 0xffffcc 0xe5d8bd 0xfddaec 0xf2f2f2]}
   :pastel2
   {:3 [0xb3e2cd 0xfdcdac 0xcbd5e8]
    :4 [0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4]
    :5 [0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4 0xe6f5c9]
    :6 [0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4 0xe6f5c9 0xfff2ae]
    :7 [0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4 0xe6f5c9 0xfff2ae 0xf1e2cc]
    :8 [0xb3e2cd 0xfdcdac 0xcbd5e8 0xf4cae4 0xe6f5c9 0xfff2ae 0xf1e2cc 0xcccccc]}
   :set1
   {:3 [0xe41a1c 0x377eb8 0x4daf4a]
    :4 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3]
    :5 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00]
    :6 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00 0xffff33]
    :7 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00 0xffff33 0xa65628]
    :8 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00 0xffff33 0xa65628 0xf781bf]
    :9 [0xe41a1c 0x377eb8 0x4daf4a 0x984ea3 0xff7f00 0xffff33 0xa65628 0xf781bf 0x999999]}
   :set2
   {:3 [0x66c2a5 0xfc8d62 0x8da0cb]
    :4 [0x66c2a5 0xfc8d62 0x8da0cb 0xe78ac3]
    :5 [0x66c2a5 0xfc8d62 0x8da0cb 0xe78ac3 0xa6d854]
    :6 [0x66c2a5 0xfc8d62 0x8da0cb 0xe78ac3 0xa6d854 0xffd92f]
    :7 [0x66c2a5 0xfc8d62 0x8da0cb 0xe78ac3 0xa6d854 0xffd92f 0xe5c494]
    :8 [0x66c2a5 0xfc8d62 0x8da0cb 0xe78ac3 0xa6d854 0xffd92f 0xe5c494 0xb3b3b3]}
   :set3
   {:3 [0x8dd3c7 0xffffb3 0xbebada]
    :4 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072]
    :5 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3]
    :6 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462]
    :7 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69]
    :8 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69 0xfccde5]
    :9 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69 0xfccde5 0xd9d9d9]
    :10 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69 0xfccde5 0xd9d9d9 0xbc80bd]
    :11 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69 0xfccde5 0xd9d9d9 0xbc80bd 0xccebc5]
    :12 [0x8dd3c7 0xffffb3 0xbebada 0xfb8072 0x80b1d3 0xfdb462 0xb3de69 0xfccde5 0xd9d9d9 0xbc80bd 0xccebc5 0xffed6f]}})

(def uniques (vec (distinct (flatten (map #(mapcat identity (vals (val %))) pallettes)))))

(defn match-col
  [rgb] (loop [i 0, cols uniques] (if cols (if (== rgb (first cols)) i (recur (inc i) (next cols))))))

(def schemes
  (reduce-kv
   (fn [acc pid cls]
     (assoc acc pid
            (reduce-kv
             (fn [acc cid v]
               (assoc acc cid (mapv match-col v)))
             (sorted-map) cls)))
   (sorted-map) pal))

(clojure.pprint/pprint uniques)
(clojure.pprint/pprint schemes)