├── .github
└── FUNDING.yml
├── .gitignore
├── Procfile
├── app.js
├── gruntfile.js
├── lib
├── colored.js
├── cutils.js
├── gadget.js
└── schemer.js
├── newrelic.js
├── package.json
├── public
├── images
│ ├── circ.svg
│ └── favicon.png
├── javascripts
│ └── script.js
└── stylesheets
│ ├── pure-min.css
│ └── style.css
├── readme.md
├── routes
├── api.js
└── frontEnd.js
├── static
├── _bootstrap-layout.jade
├── _bootstrap-mixins.jade
├── blueprint.md
├── colorNames.json
├── colorbrewer.js
├── colorbrewer.json
├── colorbrewer2.json
├── colorbrewerIndex.json
├── config.json
├── crayola.json
├── crayola2.json
└── flatly.jade
└── views
├── 400.jade
├── 404.jade
├── about.jade
├── colorSVG.jade
├── error.jade
├── formId.jade
├── formResults.jade
├── index.jade
├── layout.jade
├── schemeId.jade
├── schemeResults.jade
└── schemeSVG.jade
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [joshbeckman]
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.csv
5 | *.dat
6 | *.out
7 | *.pid
8 | *.gz
9 | *.DS_Store
10 |
11 | pids
12 | logs
13 | results
14 |
15 | npm-debug.log
16 | node_modules
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: node app.js
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | require('newrelic');
2 | var express = require('express')
3 | , http = require('http')
4 | , path = require('path')
5 | , fs = require('fs')
6 | , cors = require('cors')
7 | , config = JSON.parse(fs.readFileSync('./static/config.json'))
8 | , app = express();
9 |
10 | // all environments
11 | app.set('port', process.env.PORT || 3000);
12 | app.set('views', __dirname + '/views');
13 | app.set('view engine', 'jade');
14 | app.use(cors());
15 | app.use(express.favicon());
16 | app.use(express.logger('dev'));
17 | app.use(express.bodyParser());
18 | app.use(express.methodOverride());
19 | app.use(app.router);
20 | app.use(express.static(path.join(__dirname, 'public')));
21 | app.use(logErrors);
22 | app.use(clientErrorHandler);
23 | app.use(errorHandler);
24 | app.use(function(req, res, next){
25 | res.status(404);
26 | if (req.accepts('html')) {
27 | res.render('404', { url: req.url, title: '404 - '+config.name });
28 | return;
29 | }
30 | if (req.accepts('json')) {
31 | res.send(404, config.status['404']);
32 | return;
33 | }
34 | res.type('txt').send('404: Not found');
35 | });
36 | function logErrors(err, req, res, next) {
37 | console.error(err.stack);
38 | next(err);
39 | }
40 | function clientErrorHandler(err, req, res, next) {
41 | if (req.xhr) {
42 | res.send(500, config.status['500']);
43 | } else {
44 | next(err);
45 | }
46 | }
47 | function errorHandler(err, req, res, next) {
48 | res.status(500);
49 | res.render('error', { error: err });
50 | }
51 |
52 | // development only
53 | app.configure('development', function(){
54 | app.use(express.errorHandler({ showStack: true }));
55 | var repl = require('repl').start('liverepl> ');
56 | // repl.context.io = io;
57 | // repl.context.Post = Post;
58 | });
59 |
60 | // Set up routes
61 | require('./routes/frontEnd')(app, ensureAuth);
62 | require('./routes/api')(app, ensureAuth);
63 | function ensureAuth(req, res, next) {
64 | if(req.query.key && req.query.key == process.env.API_KEY) {return next();}
65 | res.send(403, config.status['403']);
66 | }
67 |
68 | http.createServer(app).listen(app.get('port'), function(){
69 | console.log(config.name + " server listening on port %d in %s mode", app.get('port'), app.settings.env);
70 | });
71 |
--------------------------------------------------------------------------------
/gruntfile.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joshbeckman/thecolorapi/da182da895998e9890047338e5fdadd665004404/gruntfile.js
--------------------------------------------------------------------------------
/lib/colored.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs')
2 | , named = JSON.parse(fs.readFileSync('./static/colorNames.json')).colors
3 | , colorMe
4 | , hexCheck
5 | , hexToHSL
6 | , hexToRGB
7 | , RGBToHSL
8 | , HSLToRGB
9 | , RGBToHex
10 | , nearestNamedHex
11 | , schemer = require('../lib/schemer');
12 |
13 | exports.colorMe = colorMe = function (arg){
14 | var c = {
15 | hex: {},
16 | rgb: {fraction:{}},
17 | hsl: {},
18 | hsv: {},
19 | name: {},
20 | cmyk: {},
21 | XYZ: {},
22 | image: {},
23 | contrast: {},
24 | _links:{},
25 | _embedded: {}
26 | }, a;
27 | if(arg.rgb.r || 0==arg.rgb.r){
28 | return fromRGB(arg.rgb);
29 | }
30 | if(arg.hex){
31 | return fromHex(arg.hex);
32 | }
33 | if(arg.hsl.h != null){
34 | if(arg.hsl.is_fraction){
35 | a = schemer.methods.base['hsl-to-rgb'](arg.hsl);
36 | } else {
37 | a = schemer.methods.base['hsl-to-rgb']({
38 | h: arg.hsl.h/360,
39 | s: arg.hsl.s/100,
40 | l: arg.hsl.l/100
41 | });
42 | }
43 | a.is_fraction = true;
44 | return fromRGB(a);
45 | }
46 | if(arg.hsv.h != null){
47 | if(arg.hsv.is_fraction){
48 | a = schemer.methods.base['hsv-to-rgb'](arg.hsv);
49 | } else {
50 | a = schemer.methods.base['hsv-to-rgb']({
51 | h: arg.hsv.h/360,
52 | s: arg.hsv.s/100,
53 | v: arg.hsv.v/100
54 | });
55 | }
56 | a.is_fraction = true;
57 | return fromRGB(a);
58 | }
59 | if(arg.cmyk.c != null){
60 | if(arg.cmyk.is_fraction){
61 | a = schemer.methods.base['cmyk-to-rgb'](arg.cmyk);
62 | } else {
63 | a = schemer.methods.base['cmyk-to-rgb']({
64 | c: arg.cmyk.c/100,
65 | m: arg.cmyk.m/100,
66 | y: arg.cmyk.y/100,
67 | k: arg.cmyk.k/100
68 | });
69 | }
70 | a.is_fraction = true;
71 | return fromRGB(a);
72 | }
73 | function fromRGB(rgb){
74 | if(!rgb.is_fraction){
75 | return fromHex(RGBToHex([rgb.r,rgb.g,rgb.b]));
76 | } else {
77 | return fromHex(schemer.methods.stringlify.hex(rgb));
78 | }
79 | }
80 | function luminanceRGB(rgb) {
81 | var lum = [];
82 | for (var i = 0; i < rgb.length; i++) {
83 | var chan = rgb[i] / 255;
84 | lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);
85 | }
86 | return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
87 | }
88 | function contrastRatioRGB(foreGround, backGround) {
89 | var lum1 = luminanceRGB(foreGround);
90 | var lum2 = luminanceRGB(backGround);
91 | if (lum1 > lum2) {
92 | return (lum1 + 0.05) / (lum2 + 0.05);
93 | }
94 | return (lum2 + 0.05) / (lum1 + 0.05);
95 | }
96 | function getHightestContrastColor (firstForeGround, secondForeGround, backGround) {
97 | let firstForeGroundContrast = contrastRatioRGB(firstForeGround, backGround)
98 | let secondForeGroundContrast = contrastRatioRGB(secondForeGround, backGround)
99 | return Math.max(firstForeGroundContrast, secondForeGroundContrast) == firstForeGroundContrast ? firstForeGround : secondForeGround
100 | }
101 | function fromHex(hex){
102 | c.hex.value = hexCheck(hex);
103 | var r = hexToRGB(c.hex.value, false),
104 | n = nearestNamedHex(c.hex.value);
105 | c.rgb.r = r[0];
106 | c.rgb.g = r[1];
107 | c.rgb.b = r[2];
108 | c.rgb.fraction.r = r[0]/255;
109 | c.rgb.fraction.g = r[1]/255;
110 | c.rgb.fraction.b = r[2]/255;
111 | c.rgb.value = schemer.methods.stringlify.rgb(c.rgb.fraction, null);
112 | r = schemer.methods.base["rgb-to-hsl"](c.rgb.fraction);
113 | c.hsl.fraction = r;
114 | c.hsl.h = Math.round(r.h*360);
115 | c.hsl.s = Math.round(r.s*100);
116 | c.hsl.l = Math.round(r.l*100);
117 | c.hsl.value = schemer.methods.stringlify.hsl(c.hsl.fraction, null);
118 | r = schemer.methods.base["rgb-to-hsv"](c.rgb.fraction);
119 | c.hsv.fraction = r;
120 | c.hsv.value = schemer.methods.stringlify.hsv(c.hsv.fraction, null);
121 | c.hsv.h = Math.round(r.h*360);
122 | c.hsv.s = Math.round(r.s*100);
123 | c.hsv.v = Math.round(r.v*100);
124 | r = schemer.methods.base["rgb-to-XYZ"](c.rgb.fraction);
125 | c.XYZ.fraction = r;
126 | c.XYZ.value = schemer.methods.stringlify.XYZ(c.XYZ.fraction, null);
127 | c.XYZ.X = Math.round(r.X*100);
128 | c.XYZ.Y = Math.round(r.Y*100);
129 | c.XYZ.Z = Math.round(r.Z*100);
130 | r = schemer.methods.base["rgb-to-cmyk"](c.rgb.fraction);
131 | c.cmyk.fraction = r;
132 | c.cmyk.value = schemer.methods.stringlify.cmyk(c.cmyk.fraction, null);
133 | c.cmyk.c = Math.round(r.c*100);
134 | c.cmyk.m = Math.round(r.m*100);
135 | c.cmyk.y = Math.round(r.y*100);
136 | c.cmyk.k = Math.round(r.k*100);
137 | c.name.value = n[1];
138 | c.name.closest_named_hex = n[0];
139 | c.name.exact_match_name = n[2];
140 | c.name.distance = n[3];
141 | c.hex.clean = c.hex.value.substring(1);
142 | var textColor = getHightestContrastColor([0,0,0], [255,255,255], [c.rgb.r, c.rgb.g, c.rgb.b]);
143 | c.contrast.value = RGBToHex(textColor);
144 | c.image.bare = "https://www.thecolorapi.com/id?format=svg&named=false&hex=" + c.hex.clean;
145 | c.image.named = "https://www.thecolorapi.com/id?format=svg&hex=" + c.hex.clean;
146 | c._links.self = {
147 | href: '/id?hex=' + c.hex.clean
148 | };
149 | return c;
150 | }
151 | };
152 |
153 | exports.hexCheck = hexCheck = function (color) {
154 | color = color.toUpperCase();
155 | if(color.length < 3 || color.length > 7)
156 | return "#000000";
157 | if(color.length % 3 == 0)
158 | color = "#" + color;
159 | if(color.length == 4)
160 | color = "#" + color.substr(1, 1) + color.substr(1, 1) + color.substr(2, 1) + color.substr(2, 1) + color.substr(3, 1) + color.substr(3, 1);
161 | return color;
162 | };
163 |
164 | exports.RGBToHex = RGBToHex = function(arr) {
165 | return "#" + componentToHex(arr[0]) + componentToHex(arr[1]) + componentToHex(arr[2]);
166 | }
167 | // adopted from: Farbtastic 1.2
168 | // http://acko.net/dev/farbtastic
169 | exports.hexToRGB = hexToRGB = function (color, frac) {
170 | if(frac){
171 | return [parseInt('0x' + color.substring(1, 3))/255, parseInt('0x' + color.substring(3, 5))/255, parseInt('0x' + color.substring(5, 7))/255];
172 | } else{
173 | return [parseInt('0x' + color.substring(1, 3)), parseInt('0x' + color.substring(3, 5)), parseInt('0x' + color.substring(5, 7))];
174 | }
175 | };
176 |
177 | exports.hexToHSL = hexToHSL= function (color) {
178 | var rgb = [parseInt('0x' + color.substring(1, 3)) / 255, parseInt('0x' + color.substring(3, 5)) / 255, parseInt('0x' + color.substring(5, 7)) / 255];
179 | var min, max, delta, h, s, l;
180 | var r = rgb[0], g = rgb[1], b = rgb[2];
181 |
182 | min = Math.min(r, Math.min(g, b));
183 | max = Math.max(r, Math.max(g, b));
184 | delta = max - min;
185 | l = (min + max) / 2;
186 |
187 | s = 0;
188 | if(l > 0 && l < 1)
189 | s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
190 |
191 | h = 0;
192 | if(delta > 0)
193 | {
194 | if (max == r && max != g) h += (g - b) / delta;
195 | if (max == g && max != b) h += (2 + (b - r) / delta);
196 | if (max == b && max != r) h += (4 + (r - g) / delta);
197 | h /= 6;
198 | }
199 | return [parseInt(h * 255), parseInt(s * 255), parseInt(l * 255)];
200 | };
201 |
202 | exports.RGBToHSL = RGBToHSL = function (rgb) {
203 | var min, max, delta, h, s, l;
204 | var r = rgb[0], g = rgb[1], b = rgb[2];
205 | min = Math.min(r, Math.min(g, b));
206 | max = Math.max(r, Math.max(g, b));
207 | delta = max - min;
208 | l = (min + max) / 2;
209 | s = 0;
210 | if (l > 0 && l < 1) {
211 | s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
212 | }
213 | h = 0;
214 | if (delta > 0) {
215 | if (max == r && max != g) h += (g - b) / delta;
216 | if (max == g && max != b) h += (2 + (b - r) / delta);
217 | if (max == b && max != r) h += (4 + (r - g) / delta);
218 | h /= 6;
219 | }
220 | return [h, s, l];
221 | };
222 |
223 | exports.HSLToRGB = HSLToRGB= function (hsl) {
224 | var m1, m2, r, g, b;
225 | var h = hsl[0], s = hsl[1], l = hsl[2];
226 | m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;
227 | m1 = l * 2 - m2;
228 | return [hueToRGB(m1, m2, h+0.33333),
229 | hueToRGB(m1, m2, h),
230 | hueToRGB(m1, m2, h-0.33333)];
231 | function hueToRGB(m1, m2, h) {
232 | h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
233 | if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
234 | if (h * 2 < 1) return m2;
235 | if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
236 | return m1;
237 | }
238 | };
239 |
240 | // Adopted from http://chir.ag/projects/ntc
241 | // accepts [hexColor]
242 | // returns [closestHexValue, name, boolIndicatingExactMatch]
243 | exports.nearestNamedHex = nearestNamedHex = function (color) {
244 | color = hexCheck(color);
245 | var rgb = hexToRGB(color);
246 | var r = rgb[0], g = rgb[1], b = rgb[2];
247 | var hsl = hexToHSL(color);
248 | var h = hsl[0], s = hsl[1], l = hsl[2];
249 | var ndf1 = 0; ndf2 = 0; ndf = 0;
250 | var cl = -1, df = -1;
251 | for(var i = 0; i < named.length; i++)
252 | {
253 | if(color == "#" + named[i].hex)
254 | return ["#" + named[i].hex, named[i].name, true, 0];
255 | ndf1 = Math.pow(r - named[i].r, 2) + Math.pow(g - named[i].g, 2) + Math.pow(b - named[i].b, 2);
256 | ndf2 = Math.pow(h - named[i].h, 2) + Math.pow(s - named[i].s, 2) + Math.pow(l - named[i].l, 2);
257 | ndf = ndf1 + ndf2 * 2;
258 | if(df < 0 || df > ndf)
259 | {
260 | df = ndf;
261 | cl = i;
262 | }
263 | }
264 | return (cl < 0 ? ["#000000", "Invalid Color: " + color, false, 0] : ["#" + named[cl].hex, named[cl].name, false, df]);
265 | };
266 |
267 | function componentToHex(c) {
268 | var hex = c.toString(16);
269 | return hex.length == 1 ? "0" + hex : hex;
270 | }
271 |
--------------------------------------------------------------------------------
/lib/cutils.js:
--------------------------------------------------------------------------------
1 |
2 | var parseQueryColors = function (q){
3 | var hsl = {h:null,s:null,l:null},
4 | rgb = {r:null,g:null,b:null},
5 | cmyk = {c:null,m:null,y:null,k:null},
6 | hsv = {h:null,s:null,v:null},
7 | hex = q.hex ? q.hex : null;
8 | return {
9 | hsl: maybeSplitParen(q.hsl, hsl),
10 | rgb: maybeSplitParen(q.rgb, rgb),
11 | cmyk: maybeSplitParen(q.cmyk, cmyk),
12 | hsv: maybeSplitParen(q.hsv, hsv),
13 | hex: hex
14 | };
15 | function maybeSplitParen(str, obj){
16 | if(str){
17 | var s = str.split('('),
18 | k = Object.keys(obj);
19 | if(s.length > 1){
20 | s = s[1].split(')')[0].split(',');
21 | } else {
22 | s = s[0].split(',');
23 | }
24 | for (var i = 0; i < s.length; i++) {
25 | if(s[i].split('.').length > 1){
26 | obj[k[i]] = parseFloat(s[i]);
27 | obj.is_fraction = true;
28 | } else{
29 | obj[k[i]] = parseInt(s[i], 10);
30 | }
31 | }
32 | }
33 | return obj;
34 | }
35 | }
36 |
37 | var getRandomHex = function () {
38 | var letters = '0123456789ABCDEF'.split('');
39 | var color = '#';
40 | for (var i = 0; i < 6; i++ ) {
41 | color += letters[Math.floor(Math.random() * 16)];
42 | }
43 | return color;
44 | };
45 |
46 | var parseUnknownType = function (input){
47 | var hex = (input.substring(0,1) == '#' || input.length == 3 || input.length == 6) ? input : null,
48 | cmyk = input.substring(0,4).toLowerCase() == 'cmyk' ? input : null,
49 | hsl = input.substring(0,3).toLowerCase() == 'hsl' ? input : null,
50 | hsv = input.substring(0,3).toLowerCase() == 'hsv' ? input : null,
51 | rgb = input.substring(0,3).toLowerCase() == 'rgb' ? input : null;
52 | return parseQueryColors({
53 | hex: hex,
54 | cmyk: cmyk,
55 | hsl: hsl,
56 | rgb: rgb,
57 | hsv: hsv
58 | });
59 | };
60 |
61 | exports.parseUnknownType = parseUnknownType;
62 | exports.getRandomHex = getRandomHex;
63 | exports.parseQueryColors = parseQueryColors;
--------------------------------------------------------------------------------
/lib/gadget.js:
--------------------------------------------------------------------------------
1 | var request = require('request');
2 |
3 | function Gadget(id, host){
4 | this.id = id;
5 | this.host = host;
6 | }
7 |
8 | Gadget.prototype.collectPageview = function(req, cb) {
9 | var url = ['http://www.google-analytics.com/collect?v=1&tid=', this.id, '&cid=', req.ip, '&uip=', req.ip, '&t=pageview&dp=', encodeURIComponent(req.path), '&dh=', this.host, '&dt=ID&dl=', encodeURIComponent((req.host || this.host) + req.originalUrl)].join('');
10 | request(url, function (err, resp, body){
11 | if (err){
12 | console.log(err);
13 | }
14 | if (cb){
15 | cb(err, resp);
16 | }
17 | });
18 | };
19 |
20 | module.exports = Gadget;
--------------------------------------------------------------------------------
/newrelic.js:
--------------------------------------------------------------------------------
1 | /**
2 | * New Relic agent configuration.
3 | *
4 | * See lib/config.defaults.js in the agent distribution for a more complete
5 | * description of configuration variables and their potential values.
6 | */
7 | exports.config = {
8 | /**
9 | * Array of application names.
10 | */
11 | app_name : ['thecolorapi'],
12 | /**
13 | * Your New Relic license key.
14 | */
15 | license_key : process.env.NEW_RELIC_LICENSE_KEY,
16 | logging : {
17 | /**
18 | * Level at which to log. 'trace' is most useful to New Relic when diagnosing
19 | * issues with the agent, 'info' and higher will impose the least overhead on
20 | * production applications.
21 | */
22 | level : 'warn'
23 | },
24 | rules : {
25 | ignore : [
26 | '^/socket.io/*/xhr-polling'
27 | ]
28 | }
29 | };
30 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "thecolorapi",
3 | "version": "1.1.0",
4 | "private": true,
5 | "author": "Joshua Beckman <@jbckmn>",
6 | "main": "./app.js",
7 | "repository": {
8 | "type": "git",
9 | "url": "git@github.com:jbckmn/thecolorapi.git"
10 | },
11 | "engines": {
12 | "node": "8.9.x"
13 | },
14 | "scripts": {
15 | "start": "node app.js"
16 | },
17 | "dependencies": {
18 | "aglio": "2.2.0",
19 | "cors": "^2.7.1",
20 | "express": "3.1.1",
21 | "jade": "*",
22 | "newrelic": "~1.0.0",
23 | "protagonist": "^1.3.1",
24 | "redis": "^0.11.0",
25 | "request": "~2.16.6"
26 | },
27 | "devDependencies": {}
28 | }
29 |
--------------------------------------------------------------------------------
/public/images/circ.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/public/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joshbeckman/thecolorapi/da182da895998e9890047338e5fdadd665004404/public/images/favicon.png
--------------------------------------------------------------------------------
/public/javascripts/script.js:
--------------------------------------------------------------------------------
1 | // Init scrollers
2 | (function(window, document){
3 | var scrollers = document.getElementsByClassName('scroller'),
4 | length = scrollers.length,
5 | i = 0;
6 | function makeScroller(scrollToPath) {
7 | return function(){
8 | var path = scrollToPath;
9 | scrollTo(window, document.getElementById(path).offsetTop, 1000);
10 | window.history.pushState({foo:'bar'}, ('Aislin ' + path), '/#' + path);
11 | };
12 | }
13 | for (; i < length; i++) {
14 | scrollers[i].onclick = makeScroller(scrollers[i].dataset.scrollTo);
15 | }
16 | function getRandomHex() {
17 | var letters = '0123456789ABCDEF'.split('');
18 | var color = '#';
19 | for (var i = 0; i < 6; i++ ) {
20 | color += letters[Math.floor(Math.random() * 16)];
21 | }
22 | return color;
23 | }
24 |
25 | if (document.getElementById('loading')){
26 | setTimeout(loadingBack, 2000);
27 | }
28 | function loadingBack(){
29 | var load = document.getElementById('loading'),
30 | bullets = load.getElementsByClassName('bullet'),
31 | color;
32 | color = getRandomHex();
33 | if(load.className == 'loading'){
34 | load.className = 'loading back';
35 | } else {
36 | load.className = 'loading';
37 | }
38 | load.style.display='none';
39 | load.offsetHeight; // no need to store this anywhere, the reference is enough to fool Chrome
40 | load.style.display='block';
41 | for (i = bullets.length - 1; i >= 0; i--) {
42 | bullets[i].style.background = color;
43 | bullets[i].style.zIndex = 1;
44 | }
45 | document.getElementById('sunset').style.background = color;
46 | document.getElementById('try-it').style.color = document.getElementById('try-it').style.borderColor = color;
47 | document.getElementsByClassName('title')[0].getElementsByTagName('span')[0].style.color = color;
48 | setTimeout(loadingBack, 2000);
49 | }
50 | document.getElementById('try-it').addEventListener('click', function(evt){
51 | evt.preventDefault;
52 | var color = getRandomHex();
53 | document.getElementById('try-show').src = '/id?format=svg&hex=' + color.substring(1);
54 | evt.target.className = document.getElementById('try-show').className = 'active';
55 | }, false);
56 | document.getElementById('try-show').addEventListener('click', function(evt){
57 | var s = evt.target.src.split('format=svg');
58 | window.location = s[0] + 'format=html' + s[1];
59 | }, false);
60 | })(this, this.document);
61 |
62 | // Custom ScrollTo
63 | window.scrollTo = function(element, to, duration) {
64 | var start = element.scrollY,
65 | change = to - start,
66 | currentTime = 0,
67 | increment = 20;
68 |
69 | var animateScroll = function(){
70 | currentTime += increment;
71 | var val = Math.easeInOutQuad(currentTime, start, change, duration);
72 | element.scroll(0, val);
73 | if(currentTime < duration) {
74 | setTimeout(animateScroll, increment);
75 | }
76 | };
77 | animateScroll();
78 | };
79 | Math.easeInOutQuad = function (t, b, c, d) {
80 | t /= d/2;
81 | if (t < 1) return c/2*t*t + b;
82 | t--;
83 | return -c/2 * (t*(t-2) - 1) + b;
84 | };
85 | // Custom Request
86 | var request = function(url,cb,method,post,contenttype){
87 | var requestTimeout,xhr;
88 | try{ xhr = new XMLHttpRequest(); }catch(e){
89 | try{ xhr = new ActiveXObject("Msxml2.XMLHTTP"); }catch (error){
90 | if(console)console.log("tinyxhr: XMLHttpRequest not supported");
91 | return null;
92 | }
93 | }
94 | requestTimeout = setTimeout(function() {xhr.abort(); cb(new Error("tinyxhr: aborted by a timeout"), "",xhr); }, 10000);
95 | xhr.onreadystatechange = function(){
96 | if (xhr.readyState != 4) return;
97 | clearTimeout(requestTimeout);
98 | cb(xhr.status != 200?new Error("tinyxhr: server respnse status is "+xhr.status):false, xhr.responseText,xhr);
99 | };
100 | xhr.open(method?method.toUpperCase():"GET", url, true);
101 | if(!post){
102 | xhr.send();
103 | }else{
104 | xhr.setRequestHeader('Content-type', contenttype?contenttype:'application/x-www-form-urlencoded');
105 | xhr.send(post);
106 | }
107 | }
--------------------------------------------------------------------------------
/public/stylesheets/pure-min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | Pure v0.2.1
3 | Copyright 2013 Yahoo! Inc. All rights reserved.
4 | Licensed under the BSD License.
5 | https://github.com/yui/pure/blob/master/LICENSE.md
6 | */
7 | /*!
8 | normalize.css v1.1.2 | MIT License | git.io/normalize
9 | Copyright (c) Nicolas Gallagher and Jonathan Neal
10 | */
11 | /*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}
12 | .pure-button{display:inline-block;*display:inline;zoom:1;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-size:100%;*font-size:90%;*overflow:visible;padding:.5em 1.5em;color:#444;color:rgba(0,0,0,.8);*color:#444;border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px;-webkit-font-smoothing:antialiased;-webkit-transition:.1s linear -webkit-box-shadow;-moz-transition:.1s linear -moz-box-shadow;-ms-transition:.1s linear box-shadow;-o-transition:.1s linear box-shadow;transition:.1s linear box-shadow}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-ms-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}
13 | .pure-form{margin:0}.pure-form fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.pure-form legend{border:0;padding:0;white-space:normal;*margin-left:-7px}.pure-form button,.pure-form input,.pure-form select,.pure-form textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.pure-form button,.pure-form input{line-height:normal}.pure-form button,.pure-form input[type=button],.pure-form input[type=reset],.pure-form input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible}.pure-form button[disabled],.pure-form input[disabled]{cursor:default}.pure-form input[type=checkbox],.pure-form input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px}.pure-form input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.pure-form input[type=search]::-webkit-search-cancel-button,.pure-form input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.pure-form button::-moz-focus-inner,.pure-form input::-moz-focus-inner{border:0;padding:0}.pure-form textarea{overflow:auto;vertical-align:top}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;font-size:.8em;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-transition:.3s linear border;-moz-transition:.3s linear border;-ms-transition:.3s linear border;-o-transition:.3s linear border;transition:.3s linear border;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased}.pure-form input[type=text]:focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;outline:thin dotted \9;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus,.pure-form input[type=checkbox]:focus{outline:thin dotted #333;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=text][disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly],.pure-form input[readonly]:focus,.pure-form select[readonly]:focus,.pure-form textarea[readonly]:focus{background:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border:1px solid #ee5f5b}.pure-form input:focus:invalid:focus,.pure-form textarea:focus:invalid:focus,.pure-form select:focus:invalid:focus{border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em;font-size:90%}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;font-size:125%;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=text],.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-aligned .pure-help-inline,.pure-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 10em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input{display:block;padding:10px;margin:0;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus{z-index:2}.pure-form .pure-group input:first-child{top:1px;border-radius:4px 4px 0 0}.pure-form .pure-group input:last-child{top:-2px;border-radius:0 0 4px 4px}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:90%}.pure-form-message{display:block;color:#666;font-size:90%}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form label{margin-bottom:.3em;display:block}.pure-group input[type=text],.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=color]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message-inline,.pure-form-message{display:block;font-size:80%;padding:.2em 0 .8em}}
14 | .pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-5-24,.pure-u-7-24,.pure-u-11-24,.pure-u-13-24,.pure-u-17-24,.pure-u-19-24,.pure-u-23-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1{width:100%}.pure-u-1-2{width:50%}.pure-u-1-3{width:33.33333%}.pure-u-2-3{width:66.66666%}.pure-u-1-4{width:25%}.pure-u-3-4{width:75%}.pure-u-1-5{width:20%}.pure-u-2-5{width:40%}.pure-u-3-5{width:60%}.pure-u-4-5{width:80%}.pure-u-1-6{width:16.666%}.pure-u-5-6{width:83.33%}.pure-u-1-8{width:12.5%}.pure-u-3-8{width:37.5%}.pure-u-5-8{width:62.5%}.pure-u-7-8{width:87.5%}.pure-u-1-12{width:8.3333%}.pure-u-5-12{width:41.6666%}.pure-u-7-12{width:58.3333%}.pure-u-11-12{width:91.6666%}.pure-u-1-24{width:4.1666%}.pure-u-5-24{width:20.8333%}.pure-u-7-24{width:29.1666%}.pure-u-11-24{width:45.8333%}.pure-u-13-24{width:54.1666%}.pure-u-17-24{width:70.8333%}.pure-u-19-24{width:79.1666%}.pure-u-23-24{width:95.8333%}.pure-g-r{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em}.opera-only :-o-prefocus,.pure-g-r{word-spacing:-.43em}.pure-g-r img{max-width:100%}@media (min-width:980px){.pure-visible-phone{display:none}.pure-visible-tablet{display:none}.pure-hidden-desktop{display:none}}@media (max-width:480px){.pure-g-r>.pure-u,.pure-g-r>[class *="pure-u-"]{width:100%}}@media (max-width:767px){.pure-g-r>.pure-u,.pure-g-r>[class *="pure-u-"]{width:100%}.pure-hidden-phone{display:none}.pure-visible-desktop{display:none}}@media (min-width:768px) and (max-width:979px){.pure-hidden-tablet{display:none}.pure-visible-desktop{display:none}}
15 | .pure-menu ul{position:absolute;visibility:hidden}.pure-menu.pure-menu-open{visibility:visible;z-index:2;width:100%}.pure-menu ul{left:-10000px;list-style:none;margin:0;padding:0;top:-10000px;z-index:1}.pure-menu>ul{position:relative}.pure-menu-open>ul{left:0;top:0;visibility:visible}.pure-menu-open>ul:focus{outline:0}.pure-menu li{position:relative}.pure-menu a,.pure-menu .pure-menu-heading{display:block;color:inherit;line-height:1.5em;padding:5px 20px;text-decoration:none;white-space:nowrap}.pure-menu.pure-menu-horizontal>.pure-menu-heading{display:inline-block;*display:inline;zoom:1;margin:0;vertical-align:middle}.pure-menu.pure-menu-horizontal>ul{display:inline-block;*display:inline;zoom:1;vertical-align:middle;height:2.4em}.pure-menu li a{padding:5px 20px}.pure-menu-can-have-children>.pure-menu-label:after{content:'\25B8';float:right;font-family:'Lucida Grande','Lucida Sans Unicode','DejaVu Sans',sans-serif;margin-right:-20px;margin-top:-1px}.pure-menu-can-have-children>.pure-menu-label{padding-right:30px}.pure-menu-separator{background-color:#dfdfdf;display:block;height:1px;font-size:0;margin:7px 2px;overflow:hidden}.pure-menu-hidden{display:none}.pure-menu-fixed{position:fixed;top:0;left:0;width:100%}.pure-menu-horizontal li{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-horizontal li li{display:block}.pure-menu-horizontal>.pure-menu-children>.pure-menu-can-have-children>.pure-menu-label:after{content:"\25BE"}.pure-menu-horizontal>.pure-menu-children>.pure-menu-can-have-children>.pure-menu-label{padding-right:30px}.pure-menu-horizontal li.pure-menu-separator{height:50%;width:1px;margin:0 7px}.pure-menu-horizontal li li.pure-menu-separator{height:1px;width:auto;margin:7px 2px}.pure-menu.pure-menu-open,.pure-menu.pure-menu-horizontal li .pure-menu-children{background:#fff;border:1px solid #b7b7b7}.pure-menu.pure-menu-horizontal,.pure-menu.pure-menu-horizontal .pure-menu-heading{border:0}.pure-menu a{border:1px solid transparent;border-left:0;border-right:0}.pure-menu a,.pure-menu .pure-menu-can-have-children>li:after{color:#777}.pure-menu .pure-menu-can-have-children>li:hover:after{color:#fff}.pure-menu .pure-menu-open{background:#dedede}.pure-menu li a:hover,.pure-menu li a:focus{background:#eee}.pure-menu li.pure-menu-disabled a:hover,.pure-menu li.pure-menu-disabled a:focus{background:#fff;color:#bfbfbf}.pure-menu .pure-menu-disabled>a{background-image:none;border-color:transparent;cursor:default}.pure-menu .pure-menu-disabled>a,.pure-menu .pure-menu-can-have-children.pure-menu-disabled>a:after{color:#bfbfbf}.pure-menu .pure-menu-heading{color:#565d64;text-transform:uppercase;font-size:90%;margin-top:.5em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#dfdfdf}.pure-menu .pure-menu-selected a{color:#000}.pure-menu.pure-menu-open.pure-menu-fixed{border:0;border-bottom:1px solid #b7b7b7}.pure-paginator{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;list-style:none;margin:0;padding:0}.opera-only :-o-prefocus,.pure-paginator{word-spacing:-.43em}.pure-paginator li{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-paginator .pure-button{border-radius:0;padding:.8em 1.4em;vertical-align:top;height:1.1em}.pure-paginator .pure-button:focus,.pure-paginator .pure-button:active{outline-style:none}.pure-paginator .prev,.pure-paginator .next{color:#C0C1C3;text-shadow:0 -1px 0 rgba(0,0,0,.45)}.pure-paginator .prev{border-radius:2px 0 0 2px}.pure-paginator .next{border-radius:0 2px 2px 0}@media (max-width:480px){.pure-menu-horizontal{width:100%}.pure-menu-children li{display:block;border-bottom:1px solid #000}}
16 | .pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child td,.pure-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child td{border-bottom-width:0}
--------------------------------------------------------------------------------
/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | @import url("pure-min.css");
2 | body {
3 | font-size: 15px ;
4 | line-height: 1.4em;
5 | font-family: 'Futura', "Century Gothic", Helvetica, sans-serif;
6 | font-weight: 400;
7 | background: #ffffff;
8 | color: #3b3b3b;
9 | }
10 | h1, h2, h3, h4, h5{
11 | font-weight: 400;
12 | }
13 | a{
14 | text-decoration: none;
15 | }
16 | .text-center{
17 | text-align: center;
18 | }
19 | .margin-center{
20 | display: block;
21 | margin:0 auto;
22 | text-align: center;
23 | }
24 |
25 | #about{
26 | max-width: 500px;
27 | margin: 75px auto 100px;
28 | display: block;
29 | }
30 | #about .title{
31 | text-transform: uppercase;
32 | font-weight: 700;
33 | font-size: 35px;
34 | }
35 | #lede .title{
36 | position: absolute;
37 | top: 50px;
38 | left: 0;
39 | right: 0;
40 | text-align: center;
41 | text-transform: uppercase;
42 | font-weight: 700;
43 | font-size: 35px;
44 | }
45 | #lede .title a, #lede .title a span, h1{
46 | color: #3b3b3b;
47 | letter-spacing: 12px;
48 | transition: color 1s;-moz-transition: color 1s;-webkit-transition: color 1s;-o-transition: color 1s;
49 | }
50 | #lede .title a span{
51 | color: #24B1E0;
52 | }
53 | #lede .title a small{
54 | opacity: 0.4;
55 | font-size: 15px;
56 | letter-spacing: 0px;
57 | display: block;
58 | text-transform: lowercase;
59 | font-weight: 400;
60 | padding:15px 0 0;
61 | }
62 | #sunset{
63 | position: fixed;
64 | z-index: -100;
65 | top: 0;
66 | right: 0;
67 | height: 2px;
68 | left: 0;
69 | background: #24B1E0;
70 | transition: all 2s;-moz-transition: all 2s;-webkit-transition: all 2s;-o-transition: all 2s;
71 | }
72 | #lede .leader{
73 | position: absolute;
74 | top: 47%;
75 | left: 0;
76 | right: 0;
77 | text-align: center;
78 | text-transform: lowercase;
79 | }
80 | #lede .leader input{
81 | padding:3px 0 3px 5px;
82 | position: relative;
83 | top: 2px;
84 | box-shadow: none;
85 | border-radius: 3px;
86 | border:1px solid #bbb;
87 | font-family: 'Futura', "Century Gothic", Helvetica, sans-serif;
88 | display: block;
89 | margin: 0 auto 10px;
90 | }
91 | #lede .leader input:focus{
92 | outline: none;
93 | }
94 | #lede .leader button{
95 | background:blue;
96 | border:none;
97 | padding-right:8px;
98 | padding-left: 8px;
99 | border-radius: 3px;
100 | color: #fff;
101 | display: block;
102 | margin: 10px auto 0px;
103 | font-family: 'Futura', "Century Gothic", Helvetica, sans-serif;
104 | text-transform: uppercase;
105 | }
106 |
107 | #lede .links {
108 | position: fixed;
109 | bottom: 0px;
110 | left: 0;
111 | right: 0;
112 | text-align: center;
113 | text-transform: lowercase;
114 | background:#fefefe;
115 | margin:0;
116 | padding: 1em;
117 | box-shadow: 0 0 5px rgba(0,0,0,0.5);
118 | color: grey;
119 | }
120 |
121 | .content-div{
122 | margin: 300px 0;
123 | }
124 | .content-div div{
125 | margin: 0 auto;
126 | display: block;
127 | max-width: 600px;
128 | padding: 0 10px;
129 | }
130 | button#try-it{
131 | margin:0 auto 100px;
132 | display: block;
133 | position: relative;
134 | background: white;
135 | border: 2px solid #24B1E0;
136 | color: #24B1E0;
137 | text-transform: uppercase;
138 | letter-spacing: 3px;
139 | border-radius: 3px;
140 | padding: 5px 5px 5px 9px;
141 | transition: all 1s;-moz-transition: all 1s;-webkit-transition: all 1s;-o-transition: all 1s;
142 | }
143 | button#try-it.active{
144 | right: -20%;
145 | }
146 | #try-show{
147 | width: 100px;
148 | height: 100px;
149 | border-radius: 5px;
150 | position: relative;
151 | top:-180px;
152 | margin-bottom: -100px;
153 | left: 20%;
154 | visibility: hidden;
155 | cursor: pointer;
156 | }
157 | #try-show.active{
158 | visibility: visible;
159 | }
160 |
161 | .form-results{
162 | max-width: 600px;
163 | margin:20px auto 100px;
164 | }
165 | .form-results h1{
166 | margin-bottom: 40px;
167 | }
168 | .form-results h1 a{
169 | text-transform: uppercase;
170 | color: #3b3b3b;
171 | }
172 | .form-results .in-api-link{
173 | border:2px solid #3b3b3b;
174 | max-width: 250px;
175 | display: inline-block;
176 | padding:5px 10px;
177 | border-radius: 5px;
178 | transition: opacity 1s;-moz-transition: opacity 1s;-webkit-transition: opacity 1s;-o-transition: opacity 1s;
179 | }
180 | .form-results .in-api-link:hover{
181 | opacity: 0.75;
182 | }
183 | .form-results table{
184 | width: 100%;
185 | display: table;
186 | }
187 | .form-results img{
188 | border-radius: 5px;
189 | }
190 | table td{
191 | word-break: break-word;
192 | }
193 |
194 | .form-results .scheme-color-link{
195 | display: block;
196 | padding: 2em 1em;
197 | }
198 | .form-results .scheme-to-scheme-link{
199 | display: block;
200 | padding: 1em 1em;
201 | }
202 |
203 | .loading {
204 | position: absolute;
205 | top: 150px;
206 | left: 50%;
207 | }
208 | #about .loading {
209 | position: absolute;
210 | top: 0px;
211 | left: 50%;
212 | }
213 | .loading .bullet {
214 | position: absolute;
215 | padding: 5px;
216 | background: #00B4BF;
217 | opacity: 0;
218 | -webkit-animation: animIn 1s ease-in-out 0s;
219 | animation: animIn 1s ease-in-out 0s;
220 | animation-direction: normal;
221 | -webkit-animation-direction: normal;
222 | }
223 | .loading.back .bullet {
224 | border-radius: 50%;
225 | -webkit-animation: animIn 1s ease-in-out 0s;
226 | animation: animIn 1s ease-in-out 0s;
227 | animation-direction: reverse;
228 | -webkit-animation-direction: reverse;
229 | }
230 | .loading .bullet:nth-child(1) {
231 | -webkit-animation-delay: 0s;
232 | animation-delay: 0s;
233 | }
234 | .loading .bullet:nth-child(2) {
235 | -webkit-animation-delay: 0.15s;
236 | animation-delay: 0.15s;
237 | }
238 | .loading .bullet:nth-child(3) {
239 | -webkit-animation-delay: 0.3s;
240 | animation-delay: 0.3s;
241 | }
242 | .loading .bullet:nth-child(4) {
243 | -webkit-animation-delay: 0.45s;
244 | animation-delay: 0.45s;
245 | }
246 | .loading .door:nth-child(6){
247 | padding:15px;
248 | position: relative;
249 | top: -10px;
250 | left: 90px;
251 | background:white;
252 | z-index: 10000;
253 | -webkit-animation: lift 1s ease-in-out 0s;
254 | animation: lift 1s ease-in-out 0s;
255 | -webkit-animation-delay: 0.45s;
256 | animation-delay: 0.45s;
257 | }
258 | .loading.back .door:nth-child(6){
259 | padding:15px;
260 | position: relative;
261 | top: -10px;
262 | left: 90px;
263 | background:white;
264 | z-index: 10000;
265 | -webkit-animation: lift 1s ease-in-out 0s;
266 | animation: lift 1s ease-in-out 0s;
267 | -webkit-animation-delay: -0.1s;
268 | animation-delay: -0.1s;
269 | }
270 | .loading .door:nth-child(1){
271 | padding:15px;
272 | position: relative;
273 | top: 20px;
274 | z-index: 10000;
275 | right: 110px;
276 | background:white;
277 | -webkit-animation: liftLeft 1s ease-in-out 0s;
278 | animation: liftLeft 1s ease-in-out 0s;
279 | -webkit-animation-delay: -0.1s;
280 | animation-delay: -0.1s;
281 | }
282 | .loading.back .door:nth-child(1){
283 | padding:15px;
284 | position: relative;
285 | top: 20px;
286 | z-index: 10000;
287 | right: 110px;
288 | background:white;
289 | -webkit-animation: liftLeft 1s ease-in-out 0s;
290 | animation: liftLeft 1s ease-in-out 0s;
291 | -webkit-animation-delay: 0.35s;
292 | animation-delay: 0.35s;
293 | }
294 | @-webkit-keyframes liftLeft {
295 | 0% {
296 | box-shadow: none;
297 | -webkit-transform: rotateY(0deg);
298 | transform: rotateY(0deg);
299 | -webkit-perspective:1000px;
300 | perspective:1000px;
301 | right:110px;
302 | }
303 | 50% {
304 | box-shadow: 3px 0px 5px rgba(0,0,0,0.35);
305 | -webkit-transform: rotateY(-30deg);
306 | transform: rotateY(-30deg);
307 | -webkit-perspective:1000px;
308 | perspective:1000px;
309 | right:115px;
310 | }
311 | 100% {
312 | box-shadow: none;
313 | -webkit-transform: rotateY(0deg);
314 | transform: rotateY(0deg);
315 | -webkit-perspective:1000px;
316 | perspective:1000px;
317 | right:110px;
318 | }
319 | }
320 | @keyframes liftLeft {
321 | 0% {
322 | box-shadow: none;
323 | -webkit-transform: rotateY(0deg);
324 | transform: rotateY(0deg);
325 | -webkit-perspective:1000px;
326 | perspective:1000px;
327 | right:110px;
328 | }
329 | 50% {
330 | box-shadow: 3px 0px 5px rgba(0,0,0,0.35);
331 | -webkit-transform: rotateY(-30deg);
332 | transform: rotateY(-30deg);
333 | -webkit-perspective:1000px;
334 | perspective:1000px;
335 | right:115px;
336 | }
337 | 100% {
338 | box-shadow: none;
339 | -webkit-transform: rotateY(0deg);
340 | transform: rotateY(0deg);
341 | -webkit-perspective:1000px;
342 | perspective:1000px;
343 | right:110px;
344 | }
345 | }
346 | @-webkit-keyframes lift {
347 | 0% {
348 | box-shadow: none;
349 | -webkit-transform: rotateY(0deg);
350 | transform: rotateY(0deg);
351 | -webkit-perspective:1000px;
352 | perspective:1000px;
353 | left:90px;
354 | }
355 | 50% {
356 | box-shadow: -3px 0px 5px rgba(0,0,0,0.35);
357 | -webkit-transform: rotateY(30deg);
358 | transform: rotateY(30deg);
359 | -webkit-perspective:1000px;
360 | perspective:1000px;
361 | left:95px;
362 | }
363 | 100% {
364 | box-shadow: none;
365 | -webkit-transform: rotateY(0deg);
366 | transform: rotateY(0deg);
367 | -webkit-perspective:1000px;
368 | perspective:1000px;
369 | left:90px;
370 | }
371 | }
372 | @keyframes lift {
373 | 0% {
374 | box-shadow: none;
375 | -webkit-transform: rotateY(0deg);
376 | transform: rotateY(0deg);
377 | -webkit-perspective:1000px;
378 | perspective:1000px;
379 | left:90px;
380 | }
381 | 50% {
382 | box-shadow: -3px 0px 5px rgba(0,0,0,0.35);
383 | -webkit-transform: rotateY(30deg);
384 | transform: rotateY(30deg);
385 | -webkit-perspective:1000px;
386 | perspective:1000px;
387 | left:95px;
388 | }
389 | 100% {
390 | box-shadow: none;
391 | -webkit-transform: rotateY(0deg);
392 | transform: rotateY(0deg);
393 | -webkit-perspective:1000px;
394 | perspective:1000px;
395 | left:90px;
396 | }
397 | }
398 | @-webkit-keyframes animIn {
399 | 0% {
400 | -webkit-transform: translateX(-100px);
401 | transform: translateX(-100px);
402 | opacity: 0;
403 | }
404 | 50% {
405 | opacity: 1;
406 | }
407 | 100% {
408 | -webkit-transform: translateX(100px);
409 | transform: translateX(100px);
410 | opacity: 0;
411 | }
412 | }
413 |
414 | @keyframes animIn {
415 | 0% {
416 | -webkit-transform: translateX(-100px);
417 | transform: translateX(-100px);
418 | opacity: 0;
419 | }
420 | 50% {
421 | opacity: 1;
422 | }
423 | 100% {
424 | -webkit-transform: translateX(100px);
425 | transform: translateX(100px);
426 | opacity: 0;
427 | }
428 | }
429 | @media only screen and (max-width :767px){
430 | .title{
431 | font-size: 30px;
432 | }
433 | .leader{
434 | font-size: 1.2em;
435 | }
436 | }
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | The Color API
2 | ========
3 |
4 | Your fast, modern, swiss army knife API for color.
5 |
6 | Pass in any valid color and get conversion into any other format, the name of the color, placeholder images and a multitude of schemes.
7 |
8 | Documentation, examples, and details are on [the website](https://www.thecolorapi.com).
9 |
10 | If you find it useful, [sponsor continued maintenance](https://github.com/sponsors/joshbeckman)!
11 |
--------------------------------------------------------------------------------
/routes/api.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * API routing
4 | */
5 |
6 | var fs = require('fs')
7 | , request = require('request')
8 | , config = JSON.parse(fs.readFileSync('./static/config.json'))
9 | , colored = require('../lib/colored')
10 | , schemer = require('../lib/schemer')
11 | , cutils = require('../lib/cutils')
12 | , gadget = require('../lib/gadget')
13 | , ua = 'UA-37125372-13'
14 | , ga = new gadget(ua, 'www.thecolorapi.com')
15 | , newTime
16 | , response;
17 |
18 | module.exports = function (app, ensureAuth) {
19 |
20 | app.get('/colorbox', function(req, res) {
21 | var color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
22 | res.type('svg');
23 | res.render('colorSVG', { color: color.hex.value,
24 | width: req.query.w || 100,
25 | height: req.query.h || 100,
26 | text: color.name.value,
27 | contrast: color.contrast.value,
28 | named: req.query.named
29 | });
30 | });
31 |
32 | app.get('/schemebox', function(req, res) {
33 | var color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
34 | var scheme = schemer.getScheme((req.query.mode || 'monochrome'), (req.query.count || 5), color);
35 | res.type('svg');
36 | res.render('schemeSVG', { scheme: scheme,
37 | width: req.query.w || 100,
38 | height: req.query.h || 200,
39 | iter: 0,
40 | section: Math.round((req.query.h || 200)/scheme.colors.length),
41 | named: req.query.named
42 | });
43 | });
44 |
45 | app.get('/id', function(req,res){
46 | var err = null;
47 | if (!req.query.rgb && !req.query.hex && !req.query.hsl && !req.query.cmyk && !req.query.hsv) {
48 | err = config.status['400'];
49 | err.message = 'The Color API doesn\'t understand what you mean. Please supply a query parameter of `rgb`, `hsl`, `cmyk` or `hex`.'
50 | err.query = req.query;
51 | err.params = req.params;
52 | err.path = req.path;
53 | err.example = '/id?hex=a674D3';
54 | res.jsonp(err);
55 | } else if (req.query.format == 'html') {
56 | var err = null,
57 | color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]),
58 | topKeys = color ? Object.keys(color) : null,
59 | lowKeys = color ? (function(){
60 | var obj = {};
61 | for (var i = 0; i < topKeys.length; i++) {
62 | obj[topKeys[i]] = Object.keys(color[topKeys[i]]);
63 | }
64 | return obj;
65 | })() : null;
66 | if (color){
67 | res.render('formResults', { title: color.name.value + ' | The Color API',
68 | color: color,
69 | topKeys: topKeys,
70 | lowKeys: lowKeys
71 | });
72 | } else {
73 | res.render('400', { color: req.query.hex || req.query.rgb || req.query.hsl || req.query.cmyk });
74 | }
75 | } else if (req.query.format == 'svg'){
76 | var color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
77 | res.type('svg');
78 | res.render('colorSVG', { color: color.hex.value,
79 | width: req.query.w || 100,
80 | height: req.query.h || 100,
81 | text: color.name.value,
82 | contrast: color.contrast.value,
83 | named: req.query.named
84 | });
85 | } else {
86 | res.jsonp(colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]));
87 | }
88 | ga.collectPageview(req,null);
89 | });
90 |
91 | app.get('/scheme', function(req,res){
92 | var err = null,
93 | mode = req.query.mode || 'monochrome',
94 | count = req.query.count || 5,
95 | color,
96 | colors = [];
97 | if (!req.query.rgb && !req.query.hex && !req.query.hsl && !req.query.cmyk && count < 20 && count > 0) {
98 | err = config.status['400'];
99 | err.message = 'The Color API doesn\'t understand what you mean. Please supply a query parameter of `rgb`, `hsl`, `cmyk` or `hex`.'
100 | err.query = req.query;
101 | err.params = req.params;
102 | err.path = req.path;
103 | err.example = '/scheme?hex=FF0&mode=monochrome&count=5';
104 | res.jsonp(err);
105 | } else if (req.query.format == 'html') {
106 | color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
107 | var scheme = schemer.getScheme(mode, count, color);
108 | res.render('schemeResults', { title: color.name.value + ', ' + mode + ' | The Color API',
109 | scheme: scheme
110 | });
111 | } else if (req.query.format == 'svg') {
112 | var color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
113 | var scheme = schemer.getScheme((req.query.mode || 'monochrome'), (req.query.count || 5), color);
114 | res.type('svg');
115 | res.render('schemeSVG', { scheme: scheme,
116 | width: req.query.w || 100,
117 | height: req.query.h || 200,
118 | iter: 0,
119 | section: Math.round((req.query.h || 200)/scheme.colors.length),
120 | named: req.query.named
121 | });
122 | } else {
123 | color = colored.colorMe.apply(this,[cutils.parseQueryColors(req.query)]);
124 | res.jsonp(schemer.getScheme(mode, count, color));
125 | }
126 | ga.collectPageview(req,null);
127 | });
128 |
129 | app.get('/random', function(req,res){
130 | var err = null;
131 | res.redirect('/id?hex=' + cutils.getRandomHex().substring(1));
132 | });
133 | };
134 |
--------------------------------------------------------------------------------
/routes/frontEnd.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Browser routing, for clients
4 | */
5 | var fs = require('fs')
6 | , request = require('request')
7 | , config = JSON.parse(fs.readFileSync('./static/config.json'))
8 | , aglio = require('aglio')
9 | , blueprint = fs.readFileSync('./static/blueprint.md').toString()
10 | , colored = require('../lib/colored')
11 | , schemer = require('../lib/schemer')
12 | , cutils = require('../lib/cutils')
13 | , gadget = require('../lib/gadget')
14 | , ua = 'UA-37125372-13'
15 | , ga = new gadget(ua, 'www.thecolorapi.com')
16 | , newTime
17 | , response;
18 |
19 | module.exports = function (app, ensureAuth) {
20 | app.get('/', function(req, res) {
21 | res.render('index', { title: config.name,
22 | req: req
23 | });
24 | });
25 |
26 | app.get('/about', function(req, res) {
27 | res.render('about', { title: config.name,
28 | req: req
29 | });
30 | });
31 |
32 | app.get('/docs', function(req, res) {
33 | var template = './static/flatly.jade';
34 | aglio.render(blueprint, template, function (err, html, warnings) {
35 | if (err) return console.log(err);
36 | if (warnings) console.log(warnings);
37 | res.send(html);
38 | ga.collectPageview(req,null);
39 | });
40 | });
41 |
42 | app.get('/form-id', function(req, res) {
43 | res.render('formId', {
44 | title: config.name,
45 | req: req
46 | });
47 | });
48 |
49 | app.post('/form-id', function(req,res){
50 | var err = null,
51 | color = colored.colorMe.apply(this,[cutils.parseUnknownType(req.body.color)]),
52 | topKeys = color ? Object.keys(color) : null,
53 | lowKeys = color ? (function(){
54 | var obj = {};
55 | for (var i = 0; i < topKeys.length; i++) {
56 | obj[topKeys[i]] = Object.keys(color[topKeys[i]]);
57 | }
58 | return obj;
59 | })() : null;
60 | if (color){
61 | res.redirect('/id?format=html&hex=' + color.hex.clean);
62 | } else {
63 | res.render('400', { color: req.body.color });
64 | }
65 | });
66 |
67 | app.get('/form-scheme', function(req, res) {
68 | res.render('schemeId', {
69 | title: config.name,
70 | req: req
71 | });
72 | });
73 |
74 | app.post('/scheme-id', function(req,res){
75 | var err = null,
76 | color = colored.colorMe.apply(this,[cutils.parseUnknownType(req.body.color)]),
77 | topKeys = color ? Object.keys(color) : null,
78 | lowKeys = color ? (function(){
79 | var obj = {};
80 | for (var i = 0; i < topKeys.length; i++) {
81 | obj[topKeys[i]] = Object.keys(color[topKeys[i]]);
82 | }
83 | return obj;
84 | })() : null;
85 | if (color){
86 | res.redirect('/scheme?format=html&hex=' + color.hex.clean + '&mode=' + req.body.mode);
87 | } else {
88 | res.render('400', { color: req.body.color });
89 | }
90 | });
91 |
92 | };
--------------------------------------------------------------------------------
/static/_bootstrap-layout.jade:
--------------------------------------------------------------------------------
1 | doctype
2 |
3 | include _bootstrap-mixins.jade
4 |
5 | html
6 | head
7 | meta(charset="utf-8")
8 | title= api.name || 'API Documentation'
9 | block bootstrap-theme
10 | link(rel="stylesheet", href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css")
11 | link(rel="stylesheet", href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css")
12 | block styles
13 | link(rel="stylesheet", href="//fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200")
14 | style.
15 | /* Highlight.js Theme Tomorrow */
16 | .hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}
17 | style
18 | :stylus
19 | body, h4, h5
20 | font-family 'Roboto' sans-serif !important
21 |
22 | h1, h2, h3, .aglio
23 | font-family 'Raleway' sans-serif !important
24 |
25 | h1, h2, h3, h4, h5
26 | & a
27 | display none
28 |
29 | &:hover a
30 | display inline
31 |
32 | code
33 | color #444
34 | background-color #ddd
35 | font-family 'Inconsolata' monospace !important
36 |
37 | a[data-target]
38 | cursor pointer
39 |
40 | h4
41 | font-size 100%
42 | font-weight bold
43 | text-transform uppercase
44 |
45 | .back-to-top
46 | position fixed
47 | z-index 1
48 | bottom 0px
49 | right 24px
50 | padding 4px 8px
51 | background-color #eee
52 | text-decoration none !important
53 | border-top 1px solid rgba(0, 0, 0, 0.1)
54 | border-left 1px solid rgba(0, 0, 0, 0.1)
55 | border-right 1px solid rgba(0, 0, 0, 0.1)
56 | border-top-left-radius 3px
57 | border-top-right-radius 3px
58 |
59 | .panel
60 | overflow hidden
61 |
62 | .panel-heading
63 | code
64 | color #c7254e
65 | background-color transparent
66 | white-space pre-wrap
67 | white-space -moz-pre-wrap
68 | white-space -pre-wrap
69 | white-space -o-pre-wrap
70 | word-wrap break-word
71 | h3
72 | margin-top 10px
73 | margin-bottom 10px
74 |
75 | a.list-group-item
76 | white-space nowrap
77 | text-overflow ellipsis
78 | overflow hidden
79 |
80 | &.heading
81 | background-color #f5f5f5
82 |
83 | .list-group-item.collapse
84 | display none
85 |
86 | .list-group-item.collapse.in
87 | display block
88 |
89 | #nav
90 | margin-top 38px
91 | min-width 255px
92 | top 0
93 | bottom 0
94 | padding-right 12px
95 | padding-bottom 12px
96 | overflow-y auto
97 |
98 | @media(max-width: 1199px)
99 | #nav
100 | min-width 212px
101 |
102 | body
103 | a.text-muted.back-to-top(href='#top')
104 | i.fa.fa-toggle-up
105 | | Back to top
106 | .container
107 | .row
108 | block nav
109 | +Nav(false)
110 |
111 | .col-md-9
112 | block content
113 | +Content('primary', false)
114 |
115 | p.text-muted(style="text-align: center;")
116 | | Generated by
117 | a.aglio(href="http://andjosh.com") @jbckmn
118 | | on #{date().format('DD MMM YYYY')}
119 |
120 | #localFile(style="display: none; position: absolute; top: 0; left: 0; width: 100%; color: white; background: red; font-size: 150%; text-align: center; padding: 1em;").
121 | This page may not display correctly when opened as a local file. Instead, view it from a web server.
122 |
123 |
124 | script(src="//code.jquery.com/jquery-1.11.0.min.js")
125 | script(src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js")
126 | script
127 | :coffee
128 | # Show a warning when viewed as a local file, which will break the
129 | # links above that start with `//`.
130 | if location.protocol is 'file:'
131 | document.getElementById('localFile').style.display = 'block';
132 | block scripts
133 | script
134 | :coffee
135 | $('table').addClass 'table'
136 |
--------------------------------------------------------------------------------
/static/_bootstrap-mixins.jade:
--------------------------------------------------------------------------------
1 | //- Common mixins that templates can share
2 |
3 | mixin Nav(multipage)
4 | div.col-md-3
5 | nav#nav.hidden-sm.hidden-xs.affix.nav
6 | if multipage
7 | .list-group
8 | a.list-group-item.heading(href="#") Home
9 | each resourceGroup in api.resourceGroups
10 | .list-group
11 | a.list-group-item.heading(href="##{(multipage ? 'page:' : '') + slug(resourceGroup.name)}")
12 | = resourceGroup.name || 'Resource Group'
13 | each resource in resourceGroup.resources
14 | if !condenseNav || (resource.actions.length != 1)
15 | a.list-group-item(href="##{multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : ''}#{slug(resourceGroup.name)}-#{slug(resource.name)}")
16 | i.fa.fa-bars
17 | |
18 | = resource.name || 'Resource'
19 | each action in resource.actions
20 | a.list-group-item(href="##{multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : ''}#{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}", style="padding-left: 32px")
21 | +Icon(action.method)
22 | |
23 | = action.name || action.method + ' ' + resource.uriTemplate
24 | else
25 | a.list-group-item(href="##{multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : ''}#{slug(resourceGroup.name)}-#{slug(resource.name)}")
26 | - var action = resource.actions[0]
27 | +Icon(action.method)
28 | |
29 | = resource.name || action.name || action.method + ' ' + resource.uriTemplate
30 | each meta in api.metadata
31 | if meta.name == 'HOST'
32 | p(style="text-align: center")
33 | a(href=meta.value)= meta.value
34 |
35 | mixin Parameters(params)
36 | ul.list-group
37 | li.list-group-item.bg-default: strong Parameters
38 | li.list-group-item
39 | dl.dl-horizontal
40 | each param in params
41 | dt= param.name
42 | dd
43 | code= param.type
44 | |
45 | if param.required
46 | span.required (required)
47 | else
48 | span (optional)
49 | |
50 | if param.default
51 | span.text-info.default
52 | strong Default:
53 | span= param.default
54 | |
55 | if param.example
56 | span.text-muted.example
57 | strong Example:
58 | span= param.example
59 | != markdown(param.description)
60 | if param.values.length
61 | p
62 | strong Choices:
63 | each value in param.values
64 | code= value.value
65 | |
66 |
67 | mixin RequestResponse(title, request, resourceGroup, resource, action)
68 | - var id = hash(resourceGroup.name.toString() + resource.name.toString() + action.name.toString() + action.method.toString() + title.toString() + request.name.toString() + request.headers.toString() + request.body.toString() + request.schema.toString())
69 | - var content = Object.keys(request.headers).length || request.body || request.schema
70 | li.list-group-item
71 | strong
72 | = title
73 | if request.name
74 | |
75 | code= request.name
76 | if content
77 | a.pull-right(data-toggle="collapse", data-target="##{id}") Toggle
78 | if content
79 | li.list-group-item.panel-collapse.collapse(id=id)
80 | if Object.keys(request.headers).length
81 | .description!= markdown(request.description)
82 | h5 Headers
83 | pre
84 | code
85 | each item in request.headers
86 | != highlight(item.name + ': ' + item.value, 'http')
87 | br
88 | if request.body
89 | h5 Body
90 | pre
91 | code!= highlight(request.body)
92 | if request.schema
93 | h5 Schema
94 | pre
95 | code!= highlight(request.schema)
96 |
97 |
98 | mixin Examples(resourceGroup, resource, action)
99 | ul.list-group
100 | each example in action.examples
101 | each request in example.requests
102 | +RequestResponse('Request', request, resourceGroup, resource, action)
103 | each response in example.responses
104 | +RequestResponse('Response', response, resourceGroup, resource, action)
105 |
106 | mixin ResourceGroup(resourceGroup, getButtonClass, multipage)
107 | .panel.panel-default
108 | .panel-heading
109 | h3(id="#{slug(resourceGroup.name)}")
110 | = resourceGroup.name || 'Resource Group'
111 | |
112 | a(href="##{multipage ? 'page:' : ''}#{slug(resourceGroup.name)}")
113 | i.fa.fa-link
114 | .panel-body
115 | if resourceGroup.description
116 | != markdown(resourceGroup.description)
117 | each resource in resourceGroup.resources
118 | h4(id="#{slug(resourceGroup.name)}-#{slug(resource.name)}")
119 | = resource.name || 'Resources'
120 | |
121 | a(href="##{(multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : '')}#{slug(resourceGroup.name)}-#{slug(resource.name)}")
122 | i.fa.fa-link
123 | if resource.description
124 | != markdown(resource.description)
125 | each action in resource.actions
126 | case action.method
127 | when 'POST': - var panelClass = 'panel-success'
128 | when 'GET': - var panelClass = 'panel-info'
129 | when 'PUT': - var panelClass = 'panel-warning'
130 | when 'PATCH': - var panelClass = 'panel-warning'
131 | when 'DELETE': - var panelClass = 'panel-danger'
132 | default: - var panelClass = 'panel-default'
133 | section.panel(class=panelClass, id="#{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}")
134 | .panel-heading
135 | if action.name
136 | div(style="float:right")
137 | span(style="text-transform: lowercase")= action.name
138 | case action.method
139 | when 'POST': - var btnClass = 'btn-success'
140 | when 'GET': - var btnClass = 'btn-' + getButtonClass
141 | when 'PUT': - var btnClass = 'btn-warning'
142 | when 'PATCH': - var btnClass = 'btn-warning'
143 | when 'DELETE': - var btnClass = 'btn-danger'
144 | default: - var btnClass = 'btn-default'
145 | div(style="float:left")
146 | a.btn.btn-xs(class=btnClass, href="##{(multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : '')}#{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}")= action.method
147 | div(style="overflow:hidden")
148 | code= resource.uriTemplate
149 | if action.description
150 | .panel-body!= markdown(action.description)
151 |
152 | - var params = action.parameters.length ? action.parameters : resource.parameters
153 | if params.length
154 | +Parameters(params)
155 | if action.examples
156 | +Examples(resourceGroup, resource, action)
157 |
158 | mixin Paginate(resourceGroups, index)
159 | if index < resourceGroups.length - 1
160 | a.btn.btn-default.pull-right(href="#page:#{slug(resourceGroups[index + 1].name)}")
161 | | Next
162 | i.fa.fa-arrow-circle-right
163 |
164 | if index > 0
165 | a.btn.btn-default(href="#page:#{slug(resourceGroups[index - 1].name)}")
166 | i.fa.fa-arrow-circle-left
167 | | Previous
168 | else
169 | a.btn.btn-default(href="#")
170 | i.fa.fa-arrow-circle-left
171 | | Previous
172 | .clearfix
173 | hr
174 |
175 | mixin Icon(method)
176 | case method
177 | when 'GET'
178 | i.fa.fa-arrow-circle-down
179 | when 'POST'
180 | i.fa.fa-plus-square
181 | when 'PUT'
182 | i.fa.fa-pencil
183 | when 'PATCH'
184 | i.fa.fa-pencil
185 | when 'DELETE'
186 | i.fa.fa-warning
187 | default
188 | i.fa.fa-dot-circle-o
189 |
190 | mixin Content(getButtonClass, multipage)
191 | div(data-bind=multipage ? "visible: page() == 'home'" : undefined)
192 | header
193 | .page-header
194 | h1#top= api.name || 'API Documentation'
195 |
196 | .description!= markdown(api.description)
197 |
198 | if multipage
199 | a.btn.btn-default.pull-right(href="#page:#{slug(api.resourceGroups[0].name)}")
200 | | Next
201 | i.fa.fa-arrow-circle-right
202 | .clearfix
203 | hr
204 |
205 | each resourceGroup, index in api.resourceGroups
206 | div(data-bind=multipage ? "visible: page() == '#{slug(resourceGroup.name)}', style: {marginTop: page() == '#{slug(resourceGroup.name)}' ? '38px' : ''}" : undefined)
207 | +ResourceGroup(resourceGroup, getButtonClass, multipage)
208 |
209 | if multipage
210 | +Paginate(api.resourceGroups, index)
211 |
212 | mixin Multipage()
213 | //- Multi-page support through Knockout.js
214 | script(src="http://cdnjs.cloudflare.com/ajax/libs/knockout/3.0.0/knockout-min.js")
215 | script
216 | :coffee
217 | class App
218 | constructor: ->
219 | @page = ko.observable 'home'
220 |
221 | window.app = new App()
222 |
223 | window.onhashchange = ->
224 | vars = {}
225 | for v in location.hash.substr(1).split(',')
226 | parts = v.split ':'
227 | vars[parts[0]] = parts[1]
228 |
229 | # Set the page
230 | window.app.page vars.page or 'home'
231 |
232 | # Scroll to a header if Set
233 | if vars.header
234 | $("##{vars.header}")[0].scrollIntoView true
235 | else
236 | window.scrollTo 0, 0
237 |
238 | ko.applyBindings window.app
239 |
240 | # Load the correct page
241 | window.onhashchange()
242 |
--------------------------------------------------------------------------------
/static/blueprint.md:
--------------------------------------------------------------------------------
1 | FORMAT: 1A
2 | HOST: https://www.thecolorapi.com
3 |
4 | # The Color API Docs
5 | - [About](https://www.thecolorapi.com/) The Color API
6 | - Support is only an email away: [support@thecolorapi.com](mailto:support@thecolorapi.com?subject=The Color API)
7 | - Created by [Josh Beckman](https://www.joshbeckman.org) to bring a little more color into this world.
8 |
9 | ---
10 |
11 | __Note:__ All endpoints support JSONP with the `callback` query parameter.
12 |
13 | # Group Colors
14 |
15 | ## Color Identification [/id{?hex,rgb,hsl,cmyk,format}]
16 | Return available identifying information on the given color.
17 |
18 | + Parameters
19 |
20 | + hex (optional, string, `0047AB`) ... Valid hex code
21 | + rgb (optional, string, `0,71,171`) ... Valid rgb color, also `rgb(0,71,171)`
22 | + hsl (optional, string, `215,100%,34%`) ... Valid hsl color, also `hsl(215,100%,34%)`
23 | + cmyk (optional, string, `100,58,0,33`) ... Valid cmyk color, also `cmyk(100,58,0,33)`
24 | + format = `json` (optional, string, `html`) ... Return results as JSON(P), SVG or HTML page
25 |
26 | + Values
27 | + `json`
28 | + `html`
29 | + `svg`
30 | + w = `100` (optional, integer, `350`) ... Width of resulting image, only applicable on SVG format
31 | + w = `100` (optional, integer, `350`) ... Height of resulting image, only applicable on SVG format
32 | + named = `true` (optional, boolean, `false`) ... Whether to print the color names on resulting image, only applicable on SVG format
33 |
34 | + Model
35 |
36 | + Headers
37 |
38 | Content-Type: application/json
39 |
40 | + Body
41 |
42 | {
43 | "hex": {
44 | "value": "#0047AB",
45 | "clean": "0047AB"
46 | },
47 | "rgb": {
48 | "fraction": {
49 | "r": 0,
50 | "g": 0.2784313725490196,
51 | "b": 0.6705882352941176
52 | },
53 | "r": 0,
54 | "g": 71,
55 | "b": 171,
56 | "value": "rgb(0, 71, 171)"
57 | },
58 | "hsl": {
59 | "fraction": {
60 | "h": 0.5974658869395711,
61 | "s": 1,
62 | "l": 0.3352941176470588
63 | },
64 | "h": 215,
65 | "s": 100,
66 | "l": 34,
67 | "value": "hsl(215, 100%, 34%)"
68 | },
69 | "hsv": {
70 | "fraction": {
71 | "h": 0.5974658869395711,
72 | "s": 1,
73 | "v": 0.6705882352941176
74 | },
75 | "h": 215,
76 | "s": 100,
77 | "value": "hsv(215, 100%, 67%)",
78 | "v": 67
79 | },
80 | "name": {
81 | "value": "Cobalt",
82 | "closest_named_hex": "#0047AB",
83 | "exact_match_name": true,
84 | "distance": 0
85 | },
86 | "cmyk": {
87 | "fraction": {
88 | "c": 1,
89 | "m": 0.5847953216374269,
90 | "y": 0,
91 | "k": 0.3294117647058824
92 | },
93 | "value": "cmyk(100, 58, 0, 33)",
94 | "c": 100,
95 | "m": 58,
96 | "y": 0,
97 | "k": 33
98 | },
99 | "XYZ": {
100 | "fraction": {
101 | "X": 0.22060823529411763,
102 | "Y": 0.2475505882352941,
103 | "Z": 0.6705831372549019
104 | },
105 | "value": "XYZ(22, 25, 67)",
106 | "X": 22,
107 | "Y": 25,
108 | "Z": 67
109 | },
110 | "image": {
111 | "bare": "http://placehold.it/300x300.png/0047AB/000000",
112 | "named": "http://placehold.it/300x300.png/0047AB/000000&text=Cobalt"
113 | },
114 | "contrast": {
115 | "value": "#000000"
116 | },
117 | "_links": {
118 | "self": {
119 | "href": "/id?hex=0047AB"
120 | }
121 | },
122 | "_embedded": {}
123 | }
124 |
125 | ### Get Color [GET]
126 | Get information for a single color.
127 |
128 | e.g.
129 | ```
130 | /id?hex=24B1E0 || /id?rgb=rgb(0,71,171) || ...
131 | ```
132 |
133 | + Response 200
134 |
135 | [Color Identification][]
136 |
137 | + Response 400
138 |
139 | + Headers
140 |
141 | Content-Type: application/json
142 |
143 | + Body
144 |
145 | {
146 | "code": 400,
147 | "message": "The Color API doesn't understand what you mean. Please supply a query parameter of `rgb`, `hsl`, `cmyk` or `hex`.",
148 | "query": {},
149 | "params": [],
150 | "path": "/id",
151 | "example": "/id?hex=a674D3"
152 | }
153 |
154 | # Group Schemes
155 | Color schemes are multi-color combinations chosen according to color-wheel relationsships.
156 |
157 | ## Generate Scheme [/scheme{?hex,rgb,hsl,cmyk,format,mode,count}]
158 | Return a generated scheme for the provided seed color and optional mode.
159 |
160 | + Parameters
161 |
162 | + hex (optional, string, `0047AB`) ... Valid hex code
163 | + rgb (optional, string, `0,71,171`) ... Valid rgb color, also `rgb(0,71,171)`
164 | + hsl (optional, string, `215,100%,34%`) ... Valid hsl color, also `hsl(215,100%,34%)`
165 | + cmyk (optional, string, `100,58,0,33`) ... Valid cmyk color, also `cmyk(100,58,0,33)`
166 | + format = `json` (optional, string, `html`) ... Return results as JSON(P), SVG or HTML page of results
167 |
168 | + Values
169 | + `json`
170 | + `html`
171 | + `svg`
172 | + mode = `monochrome` (optional, string, `analogic`) ... Define mode by which to generate the scheme from the seed color
173 |
174 | + Values
175 | + `monochrome`
176 | + `monochrome-dark`
177 | + `monochrome-light`
178 | + `analogic`
179 | + `complement`
180 | + `analogic-complement`
181 | + `triad`
182 | + `quad`
183 | + count = `5` (optional, integer, `6`) ... Number of colors to return
184 | + w = `100` (optional, integer, `350`) ... Width of resulting image, only applicable on SVG format
185 | + w = `100` (optional, integer, `350`) ... Height of resulting image, only applicable on SVG format
186 | + named = `true` (optional, boolean, `false`) ... Whether to print the color names on resulting image, only applicable on SVG format
187 |
188 | + Model
189 |
190 | + Headers
191 |
192 | Content-Type: application/json
193 |
194 | + Body
195 |
196 | {
197 | "mode": "monochrome",
198 | "count": "2",
199 | "colors": [
200 | {
201 | "hex": {
202 | "value": "#01122A",
203 | "clean": "01122A"
204 | },
205 | "rgb": {
206 | "fraction": {
207 | "r": 0.00392156862745098,
208 | "g": 0.07058823529411765,
209 | "b": 0.16470588235294117
210 | },
211 | "r": 1,
212 | "g": 18,
213 | "b": 42,
214 | "value": "rgb(1, 18, 42)"
215 | },
216 | "hsl": {
217 | "fraction": {
218 | "h": 0.597560975609756,
219 | "s": 0.9534883720930231,
220 | "l": 0.08431372549019608
221 | },
222 | "h": 215,
223 | "s": 95,
224 | "l": 8,
225 | "value": "hsl(215, 95%, 8%)"
226 | },
227 | "hsv": {
228 | "fraction": {
229 | "h": 0.597560975609756,
230 | "s": 0.976190476190476,
231 | "v": 0.16470588235294117
232 | },
233 | "value": "hsv(215, 98%, 16%)",
234 | "h": 215,
235 | "s": 98,
236 | "v": 16
237 | },
238 | "name": {
239 | "value": "Midnight",
240 | "closest_named_hex": "#011635",
241 | "exact_match_name": false,
242 | "distance": 217
243 | },
244 | "cmyk": {
245 | "fraction": {
246 | "c": 0.9761904761904763,
247 | "m": 0.5714285714285715,
248 | "y": 0,
249 | "k": 0.8352941176470589
250 | },
251 | "value": "cmyk(98, 57, 0, 84)",
252 | "c": 98,
253 | "m": 57,
254 | "y": 0,
255 | "k": 84
256 | },
257 | "XYZ": {
258 | "fraction": {
259 | "X": 0.056589019607843134,
260 | "Y": 0.06321019607843137,
261 | "Z": 0.1650427450980392
262 | },
263 | "value": "XYZ(6, 6, 17)",
264 | "X": 6,
265 | "Y": 6,
266 | "Z": 17
267 | },
268 | "image": {
269 | "bare": "http://placehold.it/300x300.png/01122A/FFFFFF",
270 | "named": "http://placehold.it/300x300.png/01122A/FFFFFF&text=Midnight"
271 | },
272 | "contrast": {
273 | "value": "#FFFFFF"
274 | },
275 | "_links": {
276 | "self": {
277 | "href": "/id?hex=01122A"
278 | }
279 | },
280 | "_embedded": {}
281 | },
282 | {
283 | "hex": {
284 | "value": "#0247A9",
285 | "clean": "0247A9"
286 | },
287 | "rgb": {
288 | "fraction": {
289 | "r": 0.00784313725490196,
290 | "g": 0.2784313725490196,
291 | "b": 0.6627450980392157
292 | },
293 | "r": 2,
294 | "g": 71,
295 | "b": 169,
296 | "value": "rgb(2, 71, 169)"
297 | },
298 | "hsl": {
299 | "fraction": {
300 | "h": 0.5978043912175649,
301 | "s": 0.976608187134503,
302 | "l": 0.3352941176470588
303 | },
304 | "h": 215,
305 | "s": 98,
306 | "l": 34,
307 | "value": "hsl(215, 98%, 34%)"
308 | },
309 | "hsv": {
310 | "fraction": {
311 | "h": 0.5978043912175649,
312 | "s": 0.9881656804733728,
313 | "v": 0.6627450980392157
314 | },
315 | "value": "hsv(215, 99%, 66%)",
316 | "h": 215,
317 | "s": 99,
318 | "v": 66
319 | },
320 | "name": {
321 | "value": "Cobalt",
322 | "closest_named_hex": "#0047AB",
323 | "exact_match_name": false,
324 | "distance": 80
325 | },
326 | "cmyk": {
327 | "fraction": {
328 | "c": 0.9881656804733728,
329 | "m": 0.5798816568047337,
330 | "y": 0,
331 | "k": 0.33725490196078434
332 | },
333 | "value": "cmyk(99, 58, 0, 34)",
334 | "c": 99,
335 | "m": 58,
336 | "y": 0,
337 | "k": 34
338 | },
339 | "XYZ": {
340 | "fraction": {
341 | "X": 0.2224270588235294,
342 | "Y": 0.24865176470588235,
343 | "Z": 0.6632796078431373
344 | },
345 | "value": "XYZ(22, 25, 66)",
346 | "X": 22,
347 | "Y": 25,
348 | "Z": 66
349 | },
350 | "image": {
351 | "bare": "http://placehold.it/300x300.png/0247A9/000000",
352 | "named": "http://placehold.it/300x300.png/0247A9/000000&text=Cobalt"
353 | },
354 | "contrast": {
355 | "value": "#000000"
356 | },
357 | "_links": {
358 | "self": {
359 | "href": "/id?hex=0247A9"
360 | }
361 | },
362 | "_embedded": {}
363 | }
364 | ],
365 | "seed": {
366 | "hex": {
367 | "value": "#0047AB",
368 | "clean": "0047AB"
369 | },
370 | "rgb": {
371 | "fraction": {
372 | "r": 0,
373 | "g": 0.2784313725490196,
374 | "b": 0.6705882352941176
375 | },
376 | "r": 0,
377 | "g": 71,
378 | "b": 171,
379 | "value": "rgb(0, 71, 171)"
380 | },
381 | "hsl": {
382 | "fraction": {
383 | "h": 0.5974658869395711,
384 | "s": 1,
385 | "l": 0.3352941176470588
386 | },
387 | "h": 215,
388 | "s": 100,
389 | "l": 34,
390 | "value": "hsl(215, 100%, 34%)"
391 | },
392 | "hsv": {
393 | "fraction": {
394 | "h": 0.5974658869395711,
395 | "s": 1,
396 | "v": 0.6705882352941176
397 | },
398 | "value": "hsv(215, 100%, 67%)",
399 | "h": 215,
400 | "s": 100,
401 | "v": 67
402 | },
403 | "name": {
404 | "value": "Cobalt",
405 | "closest_named_hex": "#0047AB",
406 | "exact_match_name": true,
407 | "distance": 0
408 | },
409 | "cmyk": {
410 | "fraction": {
411 | "c": 1,
412 | "m": 0.5847953216374269,
413 | "y": 0,
414 | "k": 0.3294117647058824
415 | },
416 | "value": "cmyk(100, 58, 0, 33)",
417 | "c": 100,
418 | "m": 58,
419 | "y": 0,
420 | "k": 33
421 | },
422 | "XYZ": {
423 | "fraction": {
424 | "X": 0.22060823529411763,
425 | "Y": 0.2475505882352941,
426 | "Z": 0.6705831372549019
427 | },
428 | "value": "XYZ(22, 25, 67)",
429 | "X": 22,
430 | "Y": 25,
431 | "Z": 67
432 | },
433 | "image": {
434 | "bare": "http://placehold.it/300x300.png/0047AB/000000",
435 | "named": "http://placehold.it/300x300.png/0047AB/000000&text=Cobalt"
436 | },
437 | "contrast": {
438 | "value": "#000000"
439 | },
440 | "_links": {
441 | "self": {
442 | "href": "/id?hex=0047AB"
443 | }
444 | },
445 | "_embedded": {}
446 | },
447 | "_links": {
448 | "self": "/scheme?hex=0047AB&mode=monochrome&count=2",
449 | "schemes": {
450 | "monochrome": "/scheme?hex=0047AB&mode=monochrome&count=2",
451 | "monochrome-dark": "/scheme?hex=0047AB&mode=monochrome-dark&count=2",
452 | "monochrome-light": "/scheme?hex=0047AB&mode=monochrome-light&count=2",
453 | "analogic": "/scheme?hex=0047AB&mode=analogic&count=2",
454 | "complement": "/scheme?hex=0047AB&mode=complement&count=2",
455 | "analogic-complement": "/scheme?hex=0047AB&mode=analogic-complement&count=2",
456 | "triad": "/scheme?hex=0047AB&mode=triad&count=2",
457 | "quad": "/scheme?hex=0047AB&mode=quad&count=2"
458 | }
459 | },
460 | "_embedded": {}
461 | }
462 |
463 | ### Get Scheme [GET]
464 | Get a color scheme for a given seed color.
465 |
466 | e.g.
467 | ```
468 | /scheme?hex=24B1E0&mode=triad&count=6 || /scheme?rgb=rgb(0,71,171) || ...
469 | ```
470 |
471 | + Response 200
472 |
473 | [Generate Scheme][]
474 |
475 | + Response 400
476 |
477 | + Headers
478 |
479 | Content-Type: application/json
480 |
481 | + Body
482 |
483 | {
484 | "code": 400,
485 | "message": "The Color API doesn't understand what you mean. Please supply a query parameter of `rgb`, `hsl`, `cmyk` or `hex`.",
486 | "query": {},
487 | "params": [],
488 | "path": "/scheme",
489 | "example": "/scheme?hex=FF0&mode=monochrome&count=5"
490 | }
--------------------------------------------------------------------------------
/static/colorbrewer.js:
--------------------------------------------------------------------------------
1 | // This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
2 | // JavaScript specs as packaged in the D3 library (d3js.org). Please see license at http://colorbrewer.org/export/LICENSE.txt
3 | var colorbrewer = {YlGn: {
4 | 3: ["#f7fcb9","#addd8e","#31a354"],
5 | 4: ["#ffffcc","#c2e699","#78c679","#238443"],
6 | 5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
7 | 6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
8 | 7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
9 | 8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
10 | 9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
11 | },YlGnBu: {
12 | 3: ["#edf8b1","#7fcdbb","#2c7fb8"],
13 | 4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"],
14 | 5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],
15 | 6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],
16 | 7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
17 | 8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
18 | 9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]
19 | },GnBu: {
20 | 3: ["#e0f3db","#a8ddb5","#43a2ca"],
21 | 4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],
22 | 5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],
23 | 6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],
24 | 7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
25 | 8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
26 | 9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]
27 | },BuGn: {
28 | 3: ["#e5f5f9","#99d8c9","#2ca25f"],
29 | 4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"],
30 | 5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],
31 | 6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],
32 | 7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
33 | 8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
34 | 9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]
35 | },PuBuGn: {
36 | 3: ["#ece2f0","#a6bddb","#1c9099"],
37 | 4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"],
38 | 5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],
39 | 6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],
40 | 7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
41 | 8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
42 | 9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]
43 | },PuBu: {
44 | 3: ["#ece7f2","#a6bddb","#2b8cbe"],
45 | 4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],
46 | 5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],
47 | 6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],
48 | 7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
49 | 8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
50 | 9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]
51 | },BuPu: {
52 | 3: ["#e0ecf4","#9ebcda","#8856a7"],
53 | 4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"],
54 | 5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],
55 | 6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],
56 | 7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
57 | 8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
58 | 9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]
59 | },RdPu: {
60 | 3: ["#fde0dd","#fa9fb5","#c51b8a"],
61 | 4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"],
62 | 5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],
63 | 6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],
64 | 7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
65 | 8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
66 | 9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]
67 | },PuRd: {
68 | 3: ["#e7e1ef","#c994c7","#dd1c77"],
69 | 4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"],
70 | 5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],
71 | 6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],
72 | 7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
73 | 8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
74 | 9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]
75 | },OrRd: {
76 | 3: ["#fee8c8","#fdbb84","#e34a33"],
77 | 4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],
78 | 5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],
79 | 6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],
80 | 7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
81 | 8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
82 | 9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]
83 | },YlOrRd: {
84 | 3: ["#ffeda0","#feb24c","#f03b20"],
85 | 4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],
86 | 5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],
87 | 6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],
88 | 7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
89 | 8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
90 | 9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]
91 | },YlOrBr: {
92 | 3: ["#fff7bc","#fec44f","#d95f0e"],
93 | 4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"],
94 | 5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],
95 | 6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],
96 | 7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
97 | 8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
98 | 9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]
99 | },Purples: {
100 | 3: ["#efedf5","#bcbddc","#756bb1"],
101 | 4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],
102 | 5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],
103 | 6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],
104 | 7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
105 | 8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
106 | 9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]
107 | },Blues: {
108 | 3: ["#deebf7","#9ecae1","#3182bd"],
109 | 4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"],
110 | 5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],
111 | 6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],
112 | 7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
113 | 8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
114 | 9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]
115 | },Greens: {
116 | 3: ["#e5f5e0","#a1d99b","#31a354"],
117 | 4: ["#edf8e9","#bae4b3","#74c476","#238b45"],
118 | 5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],
119 | 6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],
120 | 7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
121 | 8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
122 | 9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]
123 | },Oranges: {
124 | 3: ["#fee6ce","#fdae6b","#e6550d"],
125 | 4: ["#feedde","#fdbe85","#fd8d3c","#d94701"],
126 | 5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],
127 | 6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],
128 | 7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
129 | 8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
130 | 9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]
131 | },Reds: {
132 | 3: ["#fee0d2","#fc9272","#de2d26"],
133 | 4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"],
134 | 5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],
135 | 6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],
136 | 7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
137 | 8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
138 | 9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]
139 | },Greys: {
140 | 3: ["#f0f0f0","#bdbdbd","#636363"],
141 | 4: ["#f7f7f7","#cccccc","#969696","#525252"],
142 | 5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"],
143 | 6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],
144 | 7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
145 | 8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
146 | 9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]
147 | },PuOr: {
148 | 3: ["#f1a340","#f7f7f7","#998ec3"],
149 | 4: ["#e66101","#fdb863","#b2abd2","#5e3c99"],
150 | 5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],
151 | 6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],
152 | 7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],
153 | 8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],
154 | 9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],
155 | 10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
156 | 11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]
157 | },BrBG: {
158 | 3: ["#d8b365","#f5f5f5","#5ab4ac"],
159 | 4: ["#a6611a","#dfc27d","#80cdc1","#018571"],
160 | 5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],
161 | 6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],
162 | 7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],
163 | 8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],
164 | 9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],
165 | 10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],
166 | 11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]
167 | },PRGn: {
168 | 3: ["#af8dc3","#f7f7f7","#7fbf7b"],
169 | 4: ["#7b3294","#c2a5cf","#a6dba0","#008837"],
170 | 5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],
171 | 6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],
172 | 7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],
173 | 8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
174 | 9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
175 | 10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],
176 | 11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]
177 | },PiYG: {
178 | 3: ["#e9a3c9","#f7f7f7","#a1d76a"],
179 | 4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"],
180 | 5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],
181 | 6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],
182 | 7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],
183 | 8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
184 | 9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
185 | 10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],
186 | 11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]
187 | },RdBu: {
188 | 3: ["#ef8a62","#f7f7f7","#67a9cf"],
189 | 4: ["#ca0020","#f4a582","#92c5de","#0571b0"],
190 | 5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],
191 | 6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],
192 | 7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],
193 | 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
194 | 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
195 | 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],
196 | 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]
197 | },RdGy: {
198 | 3: ["#ef8a62","#ffffff","#999999"],
199 | 4: ["#ca0020","#f4a582","#bababa","#404040"],
200 | 5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"],
201 | 6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],
202 | 7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],
203 | 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],
204 | 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],
205 | 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],
206 | 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]
207 | },RdYlBu: {
208 | 3: ["#fc8d59","#ffffbf","#91bfdb"],
209 | 4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"],
210 | 5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],
211 | 6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],
212 | 7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],
213 | 8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],
214 | 9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],
215 | 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],
216 | 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]
217 | },Spectral: {
218 | 3: ["#fc8d59","#ffffbf","#99d594"],
219 | 4: ["#d7191c","#fdae61","#abdda4","#2b83ba"],
220 | 5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],
221 | 6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],
222 | 7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],
223 | 8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],
224 | 9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],
225 | 10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],
226 | 11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]
227 | },RdYlGn: {
228 | 3: ["#fc8d59","#ffffbf","#91cf60"],
229 | 4: ["#d7191c","#fdae61","#a6d96a","#1a9641"],
230 | 5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],
231 | 6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],
232 | 7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],
233 | 8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
234 | 9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
235 | 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],
236 | 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]
237 | },Accent: {
238 | 3: ["#7fc97f","#beaed4","#fdc086"],
239 | 4: ["#7fc97f","#beaed4","#fdc086","#ffff99"],
240 | 5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],
241 | 6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],
242 | 7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],
243 | 8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]
244 | },Dark2: {
245 | 3: ["#1b9e77","#d95f02","#7570b3"],
246 | 4: ["#1b9e77","#d95f02","#7570b3","#e7298a"],
247 | 5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],
248 | 6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],
249 | 7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],
250 | 8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]
251 | },Paired: {
252 | 3: ["#a6cee3","#1f78b4","#b2df8a"],
253 | 4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"],
254 | 5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],
255 | 6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],
256 | 7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],
257 | 8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],
258 | 9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],
259 | 10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],
260 | 11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],
261 | 12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]
262 | },Pastel1: {
263 | 3: ["#fbb4ae","#b3cde3","#ccebc5"],
264 | 4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],
265 | 5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],
266 | 6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],
267 | 7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],
268 | 8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],
269 | 9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]
270 | },Pastel2: {
271 | 3: ["#b3e2cd","#fdcdac","#cbd5e8"],
272 | 4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],
273 | 5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],
274 | 6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],
275 | 7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],
276 | 8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]
277 | },Set1: {
278 | 3: ["#e41a1c","#377eb8","#4daf4a"],
279 | 4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"],
280 | 5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],
281 | 6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],
282 | 7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],
283 | 8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],
284 | 9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]
285 | },Set2: {
286 | 3: ["#66c2a5","#fc8d62","#8da0cb"],
287 | 4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],
288 | 5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],
289 | 6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],
290 | 7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],
291 | 8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]
292 | },Set3: {
293 | 3: ["#8dd3c7","#ffffb3","#bebada"],
294 | 4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"],
295 | 5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],
296 | 6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],
297 | 7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],
298 | 8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],
299 | 9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],
300 | 10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],
301 | 11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],
302 | 12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]
303 | }};
304 |
--------------------------------------------------------------------------------
/static/colorbrewer.json:
--------------------------------------------------------------------------------
1 | {
2 | "Spectral": {"3": ["rgb(252,141,89)", "rgb(255,255,191)", "rgb(153,213,148)"], "4": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(171,221,164)", "rgb(43,131,186)"], "5": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(255,255,191)", "rgb(171,221,164)", "rgb(43,131,186)"], "6": ["rgb(213,62,79)", "rgb(252,141,89)", "rgb(254,224,139)", "rgb(230,245,152)", "rgb(153,213,148)", "rgb(50,136,189)"], "7": ["rgb(213,62,79)", "rgb(252,141,89)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(230,245,152)", "rgb(153,213,148)", "rgb(50,136,189)"], "8": ["rgb(213,62,79)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(230,245,152)", "rgb(171,221,164)", "rgb(102,194,165)", "rgb(50,136,189)"], "9": ["rgb(213,62,79)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(230,245,152)", "rgb(171,221,164)", "rgb(102,194,165)", "rgb(50,136,189)"], "10": ["rgb(158,1,66)", "rgb(213,62,79)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(230,245,152)", "rgb(171,221,164)", "rgb(102,194,165)", "rgb(50,136,189)", "rgb(94,79,162)"], "11": ["rgb(158,1,66)", "rgb(213,62,79)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(230,245,152)", "rgb(171,221,164)", "rgb(102,194,165)", "rgb(50,136,189)", "rgb(94,79,162)"], "type": "div"} ,
3 | "RdYlGn": {"3": ["rgb(252,141,89)", "rgb(255,255,191)", "rgb(145,207,96)"], "4": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(166,217,106)", "rgb(26,150,65)"], "5": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(255,255,191)", "rgb(166,217,106)", "rgb(26,150,65)"], "6": ["rgb(215,48,39)", "rgb(252,141,89)", "rgb(254,224,139)", "rgb(217,239,139)", "rgb(145,207,96)", "rgb(26,152,80)"], "7": ["rgb(215,48,39)", "rgb(252,141,89)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(217,239,139)", "rgb(145,207,96)", "rgb(26,152,80)"], "8": ["rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(217,239,139)", "rgb(166,217,106)", "rgb(102,189,99)", "rgb(26,152,80)"], "9": ["rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(217,239,139)", "rgb(166,217,106)", "rgb(102,189,99)", "rgb(26,152,80)"], "10": ["rgb(165,0,38)", "rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(217,239,139)", "rgb(166,217,106)", "rgb(102,189,99)", "rgb(26,152,80)", "rgb(0,104,55)"], "11": ["rgb(165,0,38)", "rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,139)", "rgb(255,255,191)", "rgb(217,239,139)", "rgb(166,217,106)", "rgb(102,189,99)", "rgb(26,152,80)", "rgb(0,104,55)"], "type": "div"} ,
4 | "RdBu": {"3": ["rgb(239,138,98)", "rgb(247,247,247)", "rgb(103,169,207)"], "4": ["rgb(202,0,32)", "rgb(244,165,130)", "rgb(146,197,222)", "rgb(5,113,176)"], "5": ["rgb(202,0,32)", "rgb(244,165,130)", "rgb(247,247,247)", "rgb(146,197,222)", "rgb(5,113,176)"], "6": ["rgb(178,24,43)", "rgb(239,138,98)", "rgb(253,219,199)", "rgb(209,229,240)", "rgb(103,169,207)", "rgb(33,102,172)"], "7": ["rgb(178,24,43)", "rgb(239,138,98)", "rgb(253,219,199)", "rgb(247,247,247)", "rgb(209,229,240)", "rgb(103,169,207)", "rgb(33,102,172)"], "8": ["rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(209,229,240)", "rgb(146,197,222)", "rgb(67,147,195)", "rgb(33,102,172)"], "9": ["rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(247,247,247)", "rgb(209,229,240)", "rgb(146,197,222)", "rgb(67,147,195)", "rgb(33,102,172)"], "10": ["rgb(103,0,31)", "rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(209,229,240)", "rgb(146,197,222)", "rgb(67,147,195)", "rgb(33,102,172)", "rgb(5,48,97)"], "11": ["rgb(103,0,31)", "rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(247,247,247)", "rgb(209,229,240)", "rgb(146,197,222)", "rgb(67,147,195)", "rgb(33,102,172)", "rgb(5,48,97)"], "type": "div"} ,
5 | "PiYG": {"3": ["rgb(233,163,201)", "rgb(247,247,247)", "rgb(161,215,106)"], "4": ["rgb(208,28,139)", "rgb(241,182,218)", "rgb(184,225,134)", "rgb(77,172,38)"], "5": ["rgb(208,28,139)", "rgb(241,182,218)", "rgb(247,247,247)", "rgb(184,225,134)", "rgb(77,172,38)"], "6": ["rgb(197,27,125)", "rgb(233,163,201)", "rgb(253,224,239)", "rgb(230,245,208)", "rgb(161,215,106)", "rgb(77,146,33)"], "7": ["rgb(197,27,125)", "rgb(233,163,201)", "rgb(253,224,239)", "rgb(247,247,247)", "rgb(230,245,208)", "rgb(161,215,106)", "rgb(77,146,33)"], "8": ["rgb(197,27,125)", "rgb(222,119,174)", "rgb(241,182,218)", "rgb(253,224,239)", "rgb(230,245,208)", "rgb(184,225,134)", "rgb(127,188,65)", "rgb(77,146,33)"], "9": ["rgb(197,27,125)", "rgb(222,119,174)", "rgb(241,182,218)", "rgb(253,224,239)", "rgb(247,247,247)", "rgb(230,245,208)", "rgb(184,225,134)", "rgb(127,188,65)", "rgb(77,146,33)"], "10": ["rgb(142,1,82)", "rgb(197,27,125)", "rgb(222,119,174)", "rgb(241,182,218)", "rgb(253,224,239)", "rgb(230,245,208)", "rgb(184,225,134)", "rgb(127,188,65)", "rgb(77,146,33)", "rgb(39,100,25)"], "11": ["rgb(142,1,82)", "rgb(197,27,125)", "rgb(222,119,174)", "rgb(241,182,218)", "rgb(253,224,239)", "rgb(247,247,247)", "rgb(230,245,208)", "rgb(184,225,134)", "rgb(127,188,65)", "rgb(77,146,33)", "rgb(39,100,25)"], "type": "div"} ,
6 | "PRGn": {"3": ["rgb(175,141,195)", "rgb(247,247,247)", "rgb(127,191,123)"], "4": ["rgb(123,50,148)", "rgb(194,165,207)", "rgb(166,219,160)", "rgb(0,136,55)"], "5": ["rgb(123,50,148)", "rgb(194,165,207)", "rgb(247,247,247)", "rgb(166,219,160)", "rgb(0,136,55)"], "6": ["rgb(118,42,131)", "rgb(175,141,195)", "rgb(231,212,232)", "rgb(217,240,211)", "rgb(127,191,123)", "rgb(27,120,55)"], "7": ["rgb(118,42,131)", "rgb(175,141,195)", "rgb(231,212,232)", "rgb(247,247,247)", "rgb(217,240,211)", "rgb(127,191,123)", "rgb(27,120,55)"], "8": ["rgb(118,42,131)", "rgb(153,112,171)", "rgb(194,165,207)", "rgb(231,212,232)", "rgb(217,240,211)", "rgb(166,219,160)", "rgb(90,174,97)", "rgb(27,120,55)"], "9": ["rgb(118,42,131)", "rgb(153,112,171)", "rgb(194,165,207)", "rgb(231,212,232)", "rgb(247,247,247)", "rgb(217,240,211)", "rgb(166,219,160)", "rgb(90,174,97)", "rgb(27,120,55)"], "10": ["rgb(64,0,75)", "rgb(118,42,131)", "rgb(153,112,171)", "rgb(194,165,207)", "rgb(231,212,232)", "rgb(217,240,211)", "rgb(166,219,160)", "rgb(90,174,97)", "rgb(27,120,55)", "rgb(0,68,27)"], "11": ["rgb(64,0,75)", "rgb(118,42,131)", "rgb(153,112,171)", "rgb(194,165,207)", "rgb(231,212,232)", "rgb(247,247,247)", "rgb(217,240,211)", "rgb(166,219,160)", "rgb(90,174,97)", "rgb(27,120,55)", "rgb(0,68,27)"], "type": "div"} ,
7 | "RdYlBu": {"3": ["rgb(252,141,89)", "rgb(255,255,191)", "rgb(145,191,219)"], "4": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(171,217,233)", "rgb(44,123,182)"], "5": ["rgb(215,25,28)", "rgb(253,174,97)", "rgb(255,255,191)", "rgb(171,217,233)", "rgb(44,123,182)"], "6": ["rgb(215,48,39)", "rgb(252,141,89)", "rgb(254,224,144)", "rgb(224,243,248)", "rgb(145,191,219)", "rgb(69,117,180)"], "7": ["rgb(215,48,39)", "rgb(252,141,89)", "rgb(254,224,144)", "rgb(255,255,191)", "rgb(224,243,248)", "rgb(145,191,219)", "rgb(69,117,180)"], "8": ["rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,144)", "rgb(224,243,248)", "rgb(171,217,233)", "rgb(116,173,209)", "rgb(69,117,180)"], "9": ["rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,144)", "rgb(255,255,191)", "rgb(224,243,248)", "rgb(171,217,233)", "rgb(116,173,209)", "rgb(69,117,180)"], "10": ["rgb(165,0,38)", "rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,144)", "rgb(224,243,248)", "rgb(171,217,233)", "rgb(116,173,209)", "rgb(69,117,180)", "rgb(49,54,149)"], "11": ["rgb(165,0,38)", "rgb(215,48,39)", "rgb(244,109,67)", "rgb(253,174,97)", "rgb(254,224,144)", "rgb(255,255,191)", "rgb(224,243,248)", "rgb(171,217,233)", "rgb(116,173,209)", "rgb(69,117,180)", "rgb(49,54,149)"], "type": "div"} ,
8 | "BrBG": {"3": ["rgb(216,179,101)", "rgb(245,245,245)", "rgb(90,180,172)"], "4": ["rgb(166,97,26)", "rgb(223,194,125)", "rgb(128,205,193)", "rgb(1,133,113)"], "5": ["rgb(166,97,26)", "rgb(223,194,125)", "rgb(245,245,245)", "rgb(128,205,193)", "rgb(1,133,113)"], "6": ["rgb(140,81,10)", "rgb(216,179,101)", "rgb(246,232,195)", "rgb(199,234,229)", "rgb(90,180,172)", "rgb(1,102,94)"], "7": ["rgb(140,81,10)", "rgb(216,179,101)", "rgb(246,232,195)", "rgb(245,245,245)", "rgb(199,234,229)", "rgb(90,180,172)", "rgb(1,102,94)"], "8": ["rgb(140,81,10)", "rgb(191,129,45)", "rgb(223,194,125)", "rgb(246,232,195)", "rgb(199,234,229)", "rgb(128,205,193)", "rgb(53,151,143)", "rgb(1,102,94)"], "9": ["rgb(140,81,10)", "rgb(191,129,45)", "rgb(223,194,125)", "rgb(246,232,195)", "rgb(245,245,245)", "rgb(199,234,229)", "rgb(128,205,193)", "rgb(53,151,143)", "rgb(1,102,94)"], "10": ["rgb(84,48,5)", "rgb(140,81,10)", "rgb(191,129,45)", "rgb(223,194,125)", "rgb(246,232,195)", "rgb(199,234,229)", "rgb(128,205,193)", "rgb(53,151,143)", "rgb(1,102,94)", "rgb(0,60,48)"], "11": ["rgb(84,48,5)", "rgb(140,81,10)", "rgb(191,129,45)", "rgb(223,194,125)", "rgb(246,232,195)", "rgb(245,245,245)", "rgb(199,234,229)", "rgb(128,205,193)", "rgb(53,151,143)", "rgb(1,102,94)", "rgb(0,60,48)"], "type": "div"} ,
9 | "RdGy": {"3": ["rgb(239,138,98)", "rgb(255,255,255)", "rgb(153,153,153)"], "4": ["rgb(202,0,32)", "rgb(244,165,130)", "rgb(186,186,186)", "rgb(64,64,64)"], "5": ["rgb(202,0,32)", "rgb(244,165,130)", "rgb(255,255,255)", "rgb(186,186,186)", "rgb(64,64,64)"], "6": ["rgb(178,24,43)", "rgb(239,138,98)", "rgb(253,219,199)", "rgb(224,224,224)", "rgb(153,153,153)", "rgb(77,77,77)"], "7": ["rgb(178,24,43)", "rgb(239,138,98)", "rgb(253,219,199)", "rgb(255,255,255)", "rgb(224,224,224)", "rgb(153,153,153)", "rgb(77,77,77)"], "8": ["rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(224,224,224)", "rgb(186,186,186)", "rgb(135,135,135)", "rgb(77,77,77)"], "9": ["rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(255,255,255)", "rgb(224,224,224)", "rgb(186,186,186)", "rgb(135,135,135)", "rgb(77,77,77)"], "10": ["rgb(103,0,31)", "rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(224,224,224)", "rgb(186,186,186)", "rgb(135,135,135)", "rgb(77,77,77)", "rgb(26,26,26)"], "11": ["rgb(103,0,31)", "rgb(178,24,43)", "rgb(214,96,77)", "rgb(244,165,130)", "rgb(253,219,199)", "rgb(255,255,255)", "rgb(224,224,224)", "rgb(186,186,186)", "rgb(135,135,135)", "rgb(77,77,77)", "rgb(26,26,26)"], "type": "div"} ,
10 | "PuOr": {"3": ["rgb(241,163,64)", "rgb(247,247,247)", "rgb(153,142,195)"], "4": ["rgb(230,97,1)", "rgb(253,184,99)", "rgb(178,171,210)", "rgb(94,60,153)"], "5": ["rgb(230,97,1)", "rgb(253,184,99)", "rgb(247,247,247)", "rgb(178,171,210)", "rgb(94,60,153)"], "6": ["rgb(179,88,6)", "rgb(241,163,64)", "rgb(254,224,182)", "rgb(216,218,235)", "rgb(153,142,195)", "rgb(84,39,136)"], "7": ["rgb(179,88,6)", "rgb(241,163,64)", "rgb(254,224,182)", "rgb(247,247,247)", "rgb(216,218,235)", "rgb(153,142,195)", "rgb(84,39,136)"], "8": ["rgb(179,88,6)", "rgb(224,130,20)", "rgb(253,184,99)", "rgb(254,224,182)", "rgb(216,218,235)", "rgb(178,171,210)", "rgb(128,115,172)", "rgb(84,39,136)"], "9": ["rgb(179,88,6)", "rgb(224,130,20)", "rgb(253,184,99)", "rgb(254,224,182)", "rgb(247,247,247)", "rgb(216,218,235)", "rgb(178,171,210)", "rgb(128,115,172)", "rgb(84,39,136)"], "10": ["rgb(127,59,8)", "rgb(179,88,6)", "rgb(224,130,20)", "rgb(253,184,99)", "rgb(254,224,182)", "rgb(216,218,235)", "rgb(178,171,210)", "rgb(128,115,172)", "rgb(84,39,136)", "rgb(45,0,75)"], "11": ["rgb(127,59,8)", "rgb(179,88,6)", "rgb(224,130,20)", "rgb(253,184,99)", "rgb(254,224,182)", "rgb(247,247,247)", "rgb(216,218,235)", "rgb(178,171,210)", "rgb(128,115,172)", "rgb(84,39,136)", "rgb(45,0,75)"], "type": "div"} ,
11 |
12 | "Set2": {"3": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)"], "4": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)", "rgb(231,138,195)"], "5": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)", "rgb(231,138,195)", "rgb(166,216,84)"], "6": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)", "rgb(231,138,195)", "rgb(166,216,84)", "rgb(255,217,47)"], "7": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)", "rgb(231,138,195)", "rgb(166,216,84)", "rgb(255,217,47)", "rgb(229,196,148)"], "8": ["rgb(102,194,165)", "rgb(252,141,98)", "rgb(141,160,203)", "rgb(231,138,195)", "rgb(166,216,84)", "rgb(255,217,47)", "rgb(229,196,148)", "rgb(179,179,179)"], "type": "qual"} ,
13 | "Accent": {"3": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)"], "4": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)", "rgb(255,255,153)"], "5": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)", "rgb(255,255,153)", "rgb(56,108,176)"], "6": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)", "rgb(255,255,153)", "rgb(56,108,176)", "rgb(240,2,127)"], "7": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)", "rgb(255,255,153)", "rgb(56,108,176)", "rgb(240,2,127)", "rgb(191,91,23)"], "8": ["rgb(127,201,127)", "rgb(190,174,212)", "rgb(253,192,134)", "rgb(255,255,153)", "rgb(56,108,176)", "rgb(240,2,127)", "rgb(191,91,23)", "rgb(102,102,102)"], "type": "qual"} ,
14 | "Set1": {"3": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)"], "4": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)"], "5": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)", "rgb(255,127,0)"], "6": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)", "rgb(255,127,0)", "rgb(255,255,51)"], "7": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)", "rgb(255,127,0)", "rgb(255,255,51)", "rgb(166,86,40)"], "8": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)", "rgb(255,127,0)", "rgb(255,255,51)", "rgb(166,86,40)", "rgb(247,129,191)"], "9": ["rgb(228,26,28)", "rgb(55,126,184)", "rgb(77,175,74)", "rgb(152,78,163)", "rgb(255,127,0)", "rgb(255,255,51)", "rgb(166,86,40)", "rgb(247,129,191)", "rgb(153,153,153)"], "type": "qual"} ,
15 | "Set3": {"3": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)"], "4": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)"], "5": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)"], "6": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)"], "7": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)"], "8": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)", "rgb(252,205,229)"], "9": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)", "rgb(252,205,229)", "rgb(217,217,217)"], "10": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)", "rgb(252,205,229)", "rgb(217,217,217)", "rgb(188,128,189)"], "11": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)", "rgb(252,205,229)", "rgb(217,217,217)", "rgb(188,128,189)", "rgb(204,235,197)"], "12": ["rgb(141,211,199)", "rgb(255,255,179)", "rgb(190,186,218)", "rgb(251,128,114)", "rgb(128,177,211)", "rgb(253,180,98)", "rgb(179,222,105)", "rgb(252,205,229)", "rgb(217,217,217)", "rgb(188,128,189)", "rgb(204,235,197)", "rgb(255,237,111)"], "type": "qual"} ,
16 | "Dark2": {"3": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)"], "4": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)", "rgb(231,41,138)"], "5": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)", "rgb(231,41,138)", "rgb(102,166,30)"], "6": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)", "rgb(231,41,138)", "rgb(102,166,30)", "rgb(230,171,2)"], "7": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)", "rgb(231,41,138)", "rgb(102,166,30)", "rgb(230,171,2)", "rgb(166,118,29)"], "8": ["rgb(27,158,119)", "rgb(217,95,2)", "rgb(117,112,179)", "rgb(231,41,138)", "rgb(102,166,30)", "rgb(230,171,2)", "rgb(166,118,29)", "rgb(102,102,102)"], "type": "qual"} ,
17 | "Paired": {"3": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)"], "4": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)"], "5": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)"], "6": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)"], "7": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)"], "8": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)", "rgb(255,127,0)"], "9": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)", "rgb(255,127,0)", "rgb(202,178,214)"], "10": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)", "rgb(255,127,0)", "rgb(202,178,214)", "rgb(106,61,154)"], "11": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)", "rgb(255,127,0)", "rgb(202,178,214)", "rgb(106,61,154)", "rgb(255,255,153)"], "12": ["rgb(166,206,227)", "rgb(31,120,180)", "rgb(178,223,138)", "rgb(51,160,44)", "rgb(251,154,153)", "rgb(227,26,28)", "rgb(253,191,111)", "rgb(255,127,0)", "rgb(202,178,214)", "rgb(106,61,154)", "rgb(255,255,153)", "rgb(177,89,40)"], "type": "qual"} ,
18 | "Pastel2": {"3": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)"], "4": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)", "rgb(244,202,228)"], "5": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)", "rgb(244,202,228)", "rgb(230,245,201)"], "6": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)", "rgb(244,202,228)", "rgb(230,245,201)", "rgb(255,242,174)"], "7": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)", "rgb(244,202,228)", "rgb(230,245,201)", "rgb(255,242,174)", "rgb(241,226,204)"], "8": ["rgb(179,226,205)", "rgb(253,205,172)", "rgb(203,213,232)", "rgb(244,202,228)", "rgb(230,245,201)", "rgb(255,242,174)", "rgb(241,226,204)", "rgb(204,204,204)"], "type": "qual"} ,
19 | "Pastel1": {"3": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)"], "4": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)"], "5": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)", "rgb(254,217,166)"], "6": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)", "rgb(254,217,166)", "rgb(255,255,204)"], "7": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)", "rgb(254,217,166)", "rgb(255,255,204)", "rgb(229,216,189)"], "8": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)", "rgb(254,217,166)", "rgb(255,255,204)", "rgb(229,216,189)", "rgb(253,218,236)"], "9": ["rgb(251,180,174)", "rgb(179,205,227)", "rgb(204,235,197)", "rgb(222,203,228)", "rgb(254,217,166)", "rgb(255,255,204)", "rgb(229,216,189)", "rgb(253,218,236)", "rgb(242,242,242)"], "type": "qual"} ,
20 |
21 | "OrRd": {"3": ["rgb(254,232,200)", "rgb(253,187,132)", "rgb(227,74,51)"], "4": ["rgb(254,240,217)", "rgb(253,204,138)", "rgb(252,141,89)", "rgb(215,48,31)"], "5": ["rgb(254,240,217)", "rgb(253,204,138)", "rgb(252,141,89)", "rgb(227,74,51)", "rgb(179,0,0)"], "6": ["rgb(254,240,217)", "rgb(253,212,158)", "rgb(253,187,132)", "rgb(252,141,89)", "rgb(227,74,51)", "rgb(179,0,0)"], "7": ["rgb(254,240,217)", "rgb(253,212,158)", "rgb(253,187,132)", "rgb(252,141,89)", "rgb(239,101,72)", "rgb(215,48,31)", "rgb(153,0,0)"], "8": ["rgb(255,247,236)", "rgb(254,232,200)", "rgb(253,212,158)", "rgb(253,187,132)", "rgb(252,141,89)", "rgb(239,101,72)", "rgb(215,48,31)", "rgb(153,0,0)"], "9": ["rgb(255,247,236)", "rgb(254,232,200)", "rgb(253,212,158)", "rgb(253,187,132)", "rgb(252,141,89)", "rgb(239,101,72)", "rgb(215,48,31)", "rgb(179,0,0)", "rgb(127,0,0)"], "type": "seq"} ,
22 | "PuBu": {"3": ["rgb(236,231,242)", "rgb(166,189,219)", "rgb(43,140,190)"], "4": ["rgb(241,238,246)", "rgb(189,201,225)", "rgb(116,169,207)", "rgb(5,112,176)"], "5": ["rgb(241,238,246)", "rgb(189,201,225)", "rgb(116,169,207)", "rgb(43,140,190)", "rgb(4,90,141)"], "6": ["rgb(241,238,246)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(116,169,207)", "rgb(43,140,190)", "rgb(4,90,141)"], "7": ["rgb(241,238,246)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(116,169,207)", "rgb(54,144,192)", "rgb(5,112,176)", "rgb(3,78,123)"], "8": ["rgb(255,247,251)", "rgb(236,231,242)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(116,169,207)", "rgb(54,144,192)", "rgb(5,112,176)", "rgb(3,78,123)"], "9": ["rgb(255,247,251)", "rgb(236,231,242)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(116,169,207)", "rgb(54,144,192)", "rgb(5,112,176)", "rgb(4,90,141)", "rgb(2,56,88)"], "type": "seq"} ,
23 | "BuPu": {"3": ["rgb(224,236,244)", "rgb(158,188,218)", "rgb(136,86,167)"], "4": ["rgb(237,248,251)", "rgb(179,205,227)", "rgb(140,150,198)", "rgb(136,65,157)"], "5": ["rgb(237,248,251)", "rgb(179,205,227)", "rgb(140,150,198)", "rgb(136,86,167)", "rgb(129,15,124)"], "6": ["rgb(237,248,251)", "rgb(191,211,230)", "rgb(158,188,218)", "rgb(140,150,198)", "rgb(136,86,167)", "rgb(129,15,124)"], "7": ["rgb(237,248,251)", "rgb(191,211,230)", "rgb(158,188,218)", "rgb(140,150,198)", "rgb(140,107,177)", "rgb(136,65,157)", "rgb(110,1,107)"], "8": ["rgb(247,252,253)", "rgb(224,236,244)", "rgb(191,211,230)", "rgb(158,188,218)", "rgb(140,150,198)", "rgb(140,107,177)", "rgb(136,65,157)", "rgb(110,1,107)"], "9": ["rgb(247,252,253)", "rgb(224,236,244)", "rgb(191,211,230)", "rgb(158,188,218)", "rgb(140,150,198)", "rgb(140,107,177)", "rgb(136,65,157)", "rgb(129,15,124)", "rgb(77,0,75)"], "type": "seq"} ,
24 | "Oranges": {"3": ["rgb(254,230,206)", "rgb(253,174,107)", "rgb(230,85,13)"], "4": ["rgb(254,237,222)", "rgb(253,190,133)", "rgb(253,141,60)", "rgb(217,71,1)"], "5": ["rgb(254,237,222)", "rgb(253,190,133)", "rgb(253,141,60)", "rgb(230,85,13)", "rgb(166,54,3)"], "6": ["rgb(254,237,222)", "rgb(253,208,162)", "rgb(253,174,107)", "rgb(253,141,60)", "rgb(230,85,13)", "rgb(166,54,3)"], "7": ["rgb(254,237,222)", "rgb(253,208,162)", "rgb(253,174,107)", "rgb(253,141,60)", "rgb(241,105,19)", "rgb(217,72,1)", "rgb(140,45,4)"], "8": ["rgb(255,245,235)", "rgb(254,230,206)", "rgb(253,208,162)", "rgb(253,174,107)", "rgb(253,141,60)", "rgb(241,105,19)", "rgb(217,72,1)", "rgb(140,45,4)"], "9": ["rgb(255,245,235)", "rgb(254,230,206)", "rgb(253,208,162)", "rgb(253,174,107)", "rgb(253,141,60)", "rgb(241,105,19)", "rgb(217,72,1)", "rgb(166,54,3)", "rgb(127,39,4)"], "type": "seq"} ,
25 | "BuGn": {"3": ["rgb(229,245,249)", "rgb(153,216,201)", "rgb(44,162,95)"], "4": ["rgb(237,248,251)", "rgb(178,226,226)", "rgb(102,194,164)", "rgb(35,139,69)"], "5": ["rgb(237,248,251)", "rgb(178,226,226)", "rgb(102,194,164)", "rgb(44,162,95)", "rgb(0,109,44)"], "6": ["rgb(237,248,251)", "rgb(204,236,230)", "rgb(153,216,201)", "rgb(102,194,164)", "rgb(44,162,95)", "rgb(0,109,44)"], "7": ["rgb(237,248,251)", "rgb(204,236,230)", "rgb(153,216,201)", "rgb(102,194,164)", "rgb(65,174,118)", "rgb(35,139,69)", "rgb(0,88,36)"], "8": ["rgb(247,252,253)", "rgb(229,245,249)", "rgb(204,236,230)", "rgb(153,216,201)", "rgb(102,194,164)", "rgb(65,174,118)", "rgb(35,139,69)", "rgb(0,88,36)"], "9": ["rgb(247,252,253)", "rgb(229,245,249)", "rgb(204,236,230)", "rgb(153,216,201)", "rgb(102,194,164)", "rgb(65,174,118)", "rgb(35,139,69)", "rgb(0,109,44)", "rgb(0,68,27)"], "type": "seq"} ,
26 | "YlOrBr": {"3": ["rgb(255,247,188)", "rgb(254,196,79)", "rgb(217,95,14)"], "4": ["rgb(255,255,212)", "rgb(254,217,142)", "rgb(254,153,41)", "rgb(204,76,2)"], "5": ["rgb(255,255,212)", "rgb(254,217,142)", "rgb(254,153,41)", "rgb(217,95,14)", "rgb(153,52,4)"], "6": ["rgb(255,255,212)", "rgb(254,227,145)", "rgb(254,196,79)", "rgb(254,153,41)", "rgb(217,95,14)", "rgb(153,52,4)"], "7": ["rgb(255,255,212)", "rgb(254,227,145)", "rgb(254,196,79)", "rgb(254,153,41)", "rgb(236,112,20)", "rgb(204,76,2)", "rgb(140,45,4)"], "8": ["rgb(255,255,229)", "rgb(255,247,188)", "rgb(254,227,145)", "rgb(254,196,79)", "rgb(254,153,41)", "rgb(236,112,20)", "rgb(204,76,2)", "rgb(140,45,4)"], "9": ["rgb(255,255,229)", "rgb(255,247,188)", "rgb(254,227,145)", "rgb(254,196,79)", "rgb(254,153,41)", "rgb(236,112,20)", "rgb(204,76,2)", "rgb(153,52,4)", "rgb(102,37,6)"], "type": "seq"} ,
27 | "YlGn": {"3": ["rgb(247,252,185)", "rgb(173,221,142)", "rgb(49,163,84)"], "4": ["rgb(255,255,204)", "rgb(194,230,153)", "rgb(120,198,121)", "rgb(35,132,67)"], "5": ["rgb(255,255,204)", "rgb(194,230,153)", "rgb(120,198,121)", "rgb(49,163,84)", "rgb(0,104,55)"], "6": ["rgb(255,255,204)", "rgb(217,240,163)", "rgb(173,221,142)", "rgb(120,198,121)", "rgb(49,163,84)", "rgb(0,104,55)"], "7": ["rgb(255,255,204)", "rgb(217,240,163)", "rgb(173,221,142)", "rgb(120,198,121)", "rgb(65,171,93)", "rgb(35,132,67)", "rgb(0,90,50)"], "8": ["rgb(255,255,229)", "rgb(247,252,185)", "rgb(217,240,163)", "rgb(173,221,142)", "rgb(120,198,121)", "rgb(65,171,93)", "rgb(35,132,67)", "rgb(0,90,50)"], "9": ["rgb(255,255,229)", "rgb(247,252,185)", "rgb(217,240,163)", "rgb(173,221,142)", "rgb(120,198,121)", "rgb(65,171,93)", "rgb(35,132,67)", "rgb(0,104,55)", "rgb(0,69,41)"], "type": "seq"} ,
28 | "Reds": {"3": ["rgb(254,224,210)", "rgb(252,146,114)", "rgb(222,45,38)"], "4": ["rgb(254,229,217)", "rgb(252,174,145)", "rgb(251,106,74)", "rgb(203,24,29)"], "5": ["rgb(254,229,217)", "rgb(252,174,145)", "rgb(251,106,74)", "rgb(222,45,38)", "rgb(165,15,21)"], "6": ["rgb(254,229,217)", "rgb(252,187,161)", "rgb(252,146,114)", "rgb(251,106,74)", "rgb(222,45,38)", "rgb(165,15,21)"], "7": ["rgb(254,229,217)", "rgb(252,187,161)", "rgb(252,146,114)", "rgb(251,106,74)", "rgb(239,59,44)", "rgb(203,24,29)", "rgb(153,0,13)"], "8": ["rgb(255,245,240)", "rgb(254,224,210)", "rgb(252,187,161)", "rgb(252,146,114)", "rgb(251,106,74)", "rgb(239,59,44)", "rgb(203,24,29)", "rgb(153,0,13)"], "9": ["rgb(255,245,240)", "rgb(254,224,210)", "rgb(252,187,161)", "rgb(252,146,114)", "rgb(251,106,74)", "rgb(239,59,44)", "rgb(203,24,29)", "rgb(165,15,21)", "rgb(103,0,13)"], "type": "seq"} ,
29 | "RdPu": {"3": ["rgb(253,224,221)", "rgb(250,159,181)", "rgb(197,27,138)"], "4": ["rgb(254,235,226)", "rgb(251,180,185)", "rgb(247,104,161)", "rgb(174,1,126)"], "5": ["rgb(254,235,226)", "rgb(251,180,185)", "rgb(247,104,161)", "rgb(197,27,138)", "rgb(122,1,119)"], "6": ["rgb(254,235,226)", "rgb(252,197,192)", "rgb(250,159,181)", "rgb(247,104,161)", "rgb(197,27,138)", "rgb(122,1,119)"], "7": ["rgb(254,235,226)", "rgb(252,197,192)", "rgb(250,159,181)", "rgb(247,104,161)", "rgb(221,52,151)", "rgb(174,1,126)", "rgb(122,1,119)"], "8": ["rgb(255,247,243)", "rgb(253,224,221)", "rgb(252,197,192)", "rgb(250,159,181)", "rgb(247,104,161)", "rgb(221,52,151)", "rgb(174,1,126)", "rgb(122,1,119)"], "9": ["rgb(255,247,243)", "rgb(253,224,221)", "rgb(252,197,192)", "rgb(250,159,181)", "rgb(247,104,161)", "rgb(221,52,151)", "rgb(174,1,126)", "rgb(122,1,119)", "rgb(73,0,106)"], "type": "seq"} ,
30 | "Greens": {"3": ["rgb(229,245,224)", "rgb(161,217,155)", "rgb(49,163,84)"], "4": ["rgb(237,248,233)", "rgb(186,228,179)", "rgb(116,196,118)", "rgb(35,139,69)"], "5": ["rgb(237,248,233)", "rgb(186,228,179)", "rgb(116,196,118)", "rgb(49,163,84)", "rgb(0,109,44)"], "6": ["rgb(237,248,233)", "rgb(199,233,192)", "rgb(161,217,155)", "rgb(116,196,118)", "rgb(49,163,84)", "rgb(0,109,44)"], "7": ["rgb(237,248,233)", "rgb(199,233,192)", "rgb(161,217,155)", "rgb(116,196,118)", "rgb(65,171,93)", "rgb(35,139,69)", "rgb(0,90,50)"], "8": ["rgb(247,252,245)", "rgb(229,245,224)", "rgb(199,233,192)", "rgb(161,217,155)", "rgb(116,196,118)", "rgb(65,171,93)", "rgb(35,139,69)", "rgb(0,90,50)"], "9": ["rgb(247,252,245)", "rgb(229,245,224)", "rgb(199,233,192)", "rgb(161,217,155)", "rgb(116,196,118)", "rgb(65,171,93)", "rgb(35,139,69)", "rgb(0,109,44)", "rgb(0,68,27)"], "type": "seq"} ,
31 | "YlGnBu": {"3": ["rgb(237,248,177)", "rgb(127,205,187)", "rgb(44,127,184)"], "4": ["rgb(255,255,204)", "rgb(161,218,180)", "rgb(65,182,196)", "rgb(34,94,168)"], "5": ["rgb(255,255,204)", "rgb(161,218,180)", "rgb(65,182,196)", "rgb(44,127,184)", "rgb(37,52,148)"], "6": ["rgb(255,255,204)", "rgb(199,233,180)", "rgb(127,205,187)", "rgb(65,182,196)", "rgb(44,127,184)", "rgb(37,52,148)"], "7": ["rgb(255,255,204)", "rgb(199,233,180)", "rgb(127,205,187)", "rgb(65,182,196)", "rgb(29,145,192)", "rgb(34,94,168)", "rgb(12,44,132)"], "8": ["rgb(255,255,217)", "rgb(237,248,177)", "rgb(199,233,180)", "rgb(127,205,187)", "rgb(65,182,196)", "rgb(29,145,192)", "rgb(34,94,168)", "rgb(12,44,132)"], "9": ["rgb(255,255,217)", "rgb(237,248,177)", "rgb(199,233,180)", "rgb(127,205,187)", "rgb(65,182,196)", "rgb(29,145,192)", "rgb(34,94,168)", "rgb(37,52,148)", "rgb(8,29,88)"], "type": "seq"} ,
32 | "Purples": {"3": ["rgb(239,237,245)", "rgb(188,189,220)", "rgb(117,107,177)"], "4": ["rgb(242,240,247)", "rgb(203,201,226)", "rgb(158,154,200)", "rgb(106,81,163)"], "5": ["rgb(242,240,247)", "rgb(203,201,226)", "rgb(158,154,200)", "rgb(117,107,177)", "rgb(84,39,143)"], "6": ["rgb(242,240,247)", "rgb(218,218,235)", "rgb(188,189,220)", "rgb(158,154,200)", "rgb(117,107,177)", "rgb(84,39,143)"], "7": ["rgb(242,240,247)", "rgb(218,218,235)", "rgb(188,189,220)", "rgb(158,154,200)", "rgb(128,125,186)", "rgb(106,81,163)", "rgb(74,20,134)"], "8": ["rgb(252,251,253)", "rgb(239,237,245)", "rgb(218,218,235)", "rgb(188,189,220)", "rgb(158,154,200)", "rgb(128,125,186)", "rgb(106,81,163)", "rgb(74,20,134)"], "9": ["rgb(252,251,253)", "rgb(239,237,245)", "rgb(218,218,235)", "rgb(188,189,220)", "rgb(158,154,200)", "rgb(128,125,186)", "rgb(106,81,163)", "rgb(84,39,143)", "rgb(63,0,125)"], "type": "seq"} ,
33 | "GnBu": {"3": ["rgb(224,243,219)", "rgb(168,221,181)", "rgb(67,162,202)"], "4": ["rgb(240,249,232)", "rgb(186,228,188)", "rgb(123,204,196)", "rgb(43,140,190)"], "5": ["rgb(240,249,232)", "rgb(186,228,188)", "rgb(123,204,196)", "rgb(67,162,202)", "rgb(8,104,172)"], "6": ["rgb(240,249,232)", "rgb(204,235,197)", "rgb(168,221,181)", "rgb(123,204,196)", "rgb(67,162,202)", "rgb(8,104,172)"], "7": ["rgb(240,249,232)", "rgb(204,235,197)", "rgb(168,221,181)", "rgb(123,204,196)", "rgb(78,179,211)", "rgb(43,140,190)", "rgb(8,88,158)"], "8": ["rgb(247,252,240)", "rgb(224,243,219)", "rgb(204,235,197)", "rgb(168,221,181)", "rgb(123,204,196)", "rgb(78,179,211)", "rgb(43,140,190)", "rgb(8,88,158)"], "9": ["rgb(247,252,240)", "rgb(224,243,219)", "rgb(204,235,197)", "rgb(168,221,181)", "rgb(123,204,196)", "rgb(78,179,211)", "rgb(43,140,190)", "rgb(8,104,172)", "rgb(8,64,129)"], "type": "seq"} ,
34 | "Greys": {"3": ["rgb(240,240,240)", "rgb(189,189,189)", "rgb(99,99,99)"], "4": ["rgb(247,247,247)", "rgb(204,204,204)", "rgb(150,150,150)", "rgb(82,82,82)"], "5": ["rgb(247,247,247)", "rgb(204,204,204)", "rgb(150,150,150)", "rgb(99,99,99)", "rgb(37,37,37)"], "6": ["rgb(247,247,247)", "rgb(217,217,217)", "rgb(189,189,189)", "rgb(150,150,150)", "rgb(99,99,99)", "rgb(37,37,37)"], "7": ["rgb(247,247,247)", "rgb(217,217,217)", "rgb(189,189,189)", "rgb(150,150,150)", "rgb(115,115,115)", "rgb(82,82,82)", "rgb(37,37,37)"], "8": ["rgb(255,255,255)", "rgb(240,240,240)", "rgb(217,217,217)", "rgb(189,189,189)", "rgb(150,150,150)", "rgb(115,115,115)", "rgb(82,82,82)", "rgb(37,37,37)"], "9": ["rgb(255,255,255)", "rgb(240,240,240)", "rgb(217,217,217)", "rgb(189,189,189)", "rgb(150,150,150)", "rgb(115,115,115)", "rgb(82,82,82)", "rgb(37,37,37)", "rgb(0,0,0)"], "type": "seq"} ,
35 | "YlOrRd": {"3": ["rgb(255,237,160)", "rgb(254,178,76)", "rgb(240,59,32)"], "4": ["rgb(255,255,178)", "rgb(254,204,92)", "rgb(253,141,60)", "rgb(227,26,28)"], "5": ["rgb(255,255,178)", "rgb(254,204,92)", "rgb(253,141,60)", "rgb(240,59,32)", "rgb(189,0,38)"], "6": ["rgb(255,255,178)", "rgb(254,217,118)", "rgb(254,178,76)", "rgb(253,141,60)", "rgb(240,59,32)", "rgb(189,0,38)"], "7": ["rgb(255,255,178)", "rgb(254,217,118)", "rgb(254,178,76)", "rgb(253,141,60)", "rgb(252,78,42)", "rgb(227,26,28)", "rgb(177,0,38)"], "8": ["rgb(255,255,204)", "rgb(255,237,160)", "rgb(254,217,118)", "rgb(254,178,76)", "rgb(253,141,60)", "rgb(252,78,42)", "rgb(227,26,28)", "rgb(177,0,38)"], "type": "seq"} ,
36 | "PuRd": {"3": ["rgb(231,225,239)", "rgb(201,148,199)", "rgb(221,28,119)"], "4": ["rgb(241,238,246)", "rgb(215,181,216)", "rgb(223,101,176)", "rgb(206,18,86)"], "5": ["rgb(241,238,246)", "rgb(215,181,216)", "rgb(223,101,176)", "rgb(221,28,119)", "rgb(152,0,67)"], "6": ["rgb(241,238,246)", "rgb(212,185,218)", "rgb(201,148,199)", "rgb(223,101,176)", "rgb(221,28,119)", "rgb(152,0,67)"], "7": ["rgb(241,238,246)", "rgb(212,185,218)", "rgb(201,148,199)", "rgb(223,101,176)", "rgb(231,41,138)", "rgb(206,18,86)", "rgb(145,0,63)"], "8": ["rgb(247,244,249)", "rgb(231,225,239)", "rgb(212,185,218)", "rgb(201,148,199)", "rgb(223,101,176)", "rgb(231,41,138)", "rgb(206,18,86)", "rgb(145,0,63)"], "9": ["rgb(247,244,249)", "rgb(231,225,239)", "rgb(212,185,218)", "rgb(201,148,199)", "rgb(223,101,176)", "rgb(231,41,138)", "rgb(206,18,86)", "rgb(152,0,67)", "rgb(103,0,31)"], "type": "seq"} ,
37 | "Blues": {"3": ["rgb(222,235,247)", "rgb(158,202,225)", "rgb(49,130,189)"], "4": ["rgb(239,243,255)", "rgb(189,215,231)", "rgb(107,174,214)", "rgb(33,113,181)"], "5": ["rgb(239,243,255)", "rgb(189,215,231)", "rgb(107,174,214)", "rgb(49,130,189)", "rgb(8,81,156)"], "6": ["rgb(239,243,255)", "rgb(198,219,239)", "rgb(158,202,225)", "rgb(107,174,214)", "rgb(49,130,189)", "rgb(8,81,156)"], "7": ["rgb(239,243,255)", "rgb(198,219,239)", "rgb(158,202,225)", "rgb(107,174,214)", "rgb(66,146,198)", "rgb(33,113,181)", "rgb(8,69,148)"], "8": ["rgb(247,251,255)", "rgb(222,235,247)", "rgb(198,219,239)", "rgb(158,202,225)", "rgb(107,174,214)", "rgb(66,146,198)", "rgb(33,113,181)", "rgb(8,69,148)"], "9": ["rgb(247,251,255)", "rgb(222,235,247)", "rgb(198,219,239)", "rgb(158,202,225)", "rgb(107,174,214)", "rgb(66,146,198)", "rgb(33,113,181)", "rgb(8,81,156)", "rgb(8,48,107)"], "type": "seq"} ,
38 | "PuBuGn": {"3": ["rgb(236,226,240)", "rgb(166,189,219)", "rgb(28,144,153)"], "4": ["rgb(246,239,247)", "rgb(189,201,225)", "rgb(103,169,207)", "rgb(2,129,138)"], "5": ["rgb(246,239,247)", "rgb(189,201,225)", "rgb(103,169,207)", "rgb(28,144,153)", "rgb(1,108,89)"], "6": ["rgb(246,239,247)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(103,169,207)", "rgb(28,144,153)", "rgb(1,108,89)"], "7": ["rgb(246,239,247)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(103,169,207)", "rgb(54,144,192)", "rgb(2,129,138)", "rgb(1,100,80)"], "8": ["rgb(255,247,251)", "rgb(236,226,240)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(103,169,207)", "rgb(54,144,192)", "rgb(2,129,138)", "rgb(1,100,80)"], "9": ["rgb(255,247,251)", "rgb(236,226,240)", "rgb(208,209,230)", "rgb(166,189,219)", "rgb(103,169,207)", "rgb(54,144,192)", "rgb(2,129,138)", "rgb(1,108,89)", "rgb(1,70,54)"], "type": "seq"}
39 | }
40 |
--------------------------------------------------------------------------------
/static/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "The Color API",
3 | "status": {
4 | "500": {
5 | "code": 500,
6 | "message": "This is embarassing. Something went wrong!"
7 | },
8 | "404": {
9 | "code":404,
10 | "message":"Nothing found by that identifier. Life is hard."
11 | },
12 | "403": {
13 | "code": 403,
14 | "message": "Not allowed. You can't always get what you want."
15 | },
16 | "400": {
17 | "code":400,
18 | "message":"The Color API doesn't understand what you mean. Speak slowly."
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/static/crayola.json:
--------------------------------------------------------------------------------
1 | {"colors":[{"name":"Yellow Sunshine","r":255,"g":247,"b":0},{"name":"Yellow Orange","r":255,"g":182,"b":83},{"name":"Yellow Green","r":197,"g":227,"b":132},{"name":"Yellow","r":252,"g":232,"b":131},{"name":"Wisteria","r":205,"g":164,"b":222},{"name":"Wintergreen Dream","r":86,"g":136,"b":125},{"name":"Winter Wizard","r":160,"g":230,"b":255},{"name":"Winter Sky","r":255,"g":0,"b":124},{"name":"Wild Watermelon","r":252,"g":108,"b":133},{"name":"Wild Strawberry","r":255,"g":67,"b":164},{"name":"Wild Blue Yonder","r":162,"g":173,"b":208},{"name":"White","r":255,"g":255,"b":255},{"name":"Vivid Violet","r":143,"g":80,"b":157},{"name":"Vivid Tangerine","r":255,"g":160,"b":137},{"name":"Violet Red","r":247,"g":83,"b":148},{"name":"Violet Purple","r":146,"g":110,"b":174},{"name":"Violet Blue","r":50,"g":74,"b":178},{"name":"Unmellow Yellow","r":0,"g":15,"b":246},{"name":"Twilight Lavender","r":138,"g":73,"b":107},{"name":"Turquoise Pearl","r":59,"g":188,"b":208},{"name":"Turquoise Blue","r":119,"g":221,"b":231},{"name":"Tumbleweed","r":222,"g":170,"b":136},{"name":"Tulip","r":255,"g":135,"b":141},{"name":"Tropical Rain Forest","r":23,"g":128,"b":109},{"name":"Timberwolf","r":219,"g":215,"b":210},{"name":"Tigers Eye","r":181,"g":105,"b":23},{"name":"Tickle Me Pink","r":252,"g":137,"b":172},{"name":"Thistle","r":235,"g":199,"b":223},{"name":"Teal Blue","r":24,"g":167,"b":181},{"name":"Tart Orange","r":251,"g":77,"b":70},{"name":"Tan","r":250,"g":167,"b":108},{"name":"Sweet Brown","r":168,"g":55,"b":49},{"name":"Sunset Pearl","r":241,"g":204,"b":121},{"name":"Sunset Orange","r":253,"g":94,"b":83},{"name":"Sunny Pearl","r":242,"g":242,"b":122},{"name":"Sunglow","r":255,"g":207,"b":72},{"name":"Sunburnt Cyclops","r":255,"g":64,"b":76},{"name":"Sugar Plum","r":145,"g":78,"b":117},{"name":"Strawberry","r":252,"g":90,"b":141},{"name":"Steel Teal","r":95,"g":138,"b":139},{"name":"Steel Blue","r":0,"g":129,"b":171},{"name":"Spring Green","r":236,"g":234,"b":190},{"name":"Spring Frost","r":135,"g":255,"b":42},{"name":"Sonic Silver","r":117,"g":117,"b":117},{"name":"Soap","r":206,"g":200,"b":239},{"name":"Smokey Topaz","r":131,"g":42,"b":13},{"name":"Smoke","r":115,"g":130,"b":118},{"name":"Smashed Pumpkin","r":255,"g":109,"b":58},{"name":"Slimy Green","r":41,"g":150,"b":23},{"name":"Sky Blue","r":128,"g":218,"b":235},{"name":"Sizzling Sunrise","r":255,"g":219,"b":0},{"name":"Sizzling Red","r":255,"g":56,"b":85},{"name":"Silver","r":205,"g":197,"b":194},{"name":"Shocking Pink","r":251,"g":126,"b":253},{"name":"Shiny Shamrock","r":95,"g":167,"b":120},{"name":"Shimmering Blush","r":217,"g":134,"b":149},{"name":"Sheen Green","r":143,"g":212,"b":0},{"name":"Shamrock","r":69,"g":206,"b":162},{"name":"Shampoo","r":255,"g":207,"b":241},{"name":"Shadow Blue","r":119,"g":139,"b":165},{"name":"Shadow","r":138,"g":121,"b":93},{"name":"Sepia","r":165,"g":105,"b":79},{"name":"Sea Serpent","r":75,"g":199,"b":207},{"name":"Sea Green","r":159,"g":226,"b":191},{"name":"Screamin Green","r":118,"g":255,"b":122},{"name":"Scarlet","r":252,"g":40,"b":71},{"name":"Sasquatch Socks","r":255,"g":70,"b":129},{"name":"Sapphire","r":45,"g":93,"b":161},{"name":"Salmon Pearl","r":241,"g":68,"b":74},{"name":"Salmon","r":255,"g":155,"b":170},{"name":"Rusty Red","r":218,"g":44,"b":67},{"name":"Ruby","r":170,"g":64,"b":105},{"name":"Royal Purple","r":120,"g":81,"b":169},{"name":"Rose Quartz","r":189,"g":85,"b":156},{"name":"Rose Pearl","r":240,"g":56,"b":101},{"name":"Rose Dust","r":158,"g":94,"b":111},{"name":"Rose","r":255,"g":80,"b":80},{"name":"Robins Egg Blue","r":31,"g":206,"b":203},{"name":"Red Violet","r":192,"g":68,"b":143},{"name":"Red Salsa","r":253,"g":58,"b":74},{"name":"Red Orange","r":255,"g":83,"b":73},{"name":"Red","r":238,"g":32,"b":77},{"name":"Razzmic Berry","r":141,"g":78,"b":133},{"name":"Razzmatazz","r":227,"g":37,"b":107},{"name":"Razzle Dazzle Rose","r":255,"g":72,"b":208},{"name":"Raw Umber","r":113,"g":75,"b":35},{"name":"Raw Sienna","r":214,"g":138,"b":89},{"name":"Radical Red","r":255,"g":73,"b":108},{"name":"Quick Silver","r":166,"g":166,"b":166},{"name":"Purple Plum","r":156,"g":81,"b":182},{"name":"Purple Pizzazz","r":254,"g":78,"b":218},{"name":"Purple Mountains Majesty","r":157,"g":129,"b":186},{"name":"Purple Heart","r":116,"g":66,"b":200},{"name":"Princess Perfume","r":255,"g":133,"b":207},{"name":"Polished Pine","r":93,"g":164,"b":147},{"name":"Plump Purple","r":89,"g":70,"b":178},{"name":"Plum","r":142,"g":69,"b":133},{"name":"Pixie Powder","r":57,"g":18,"b":133},{"name":"Pink Sherbert","r":247,"g":143,"b":167},{"name":"Pink Pearl","r":176,"g":112,"b":128},{"name":"Pink Flamingo","r":252,"g":116,"b":253},{"name":"Pine Green","r":21,"g":128,"b":120},{"name":"Pine","r":69,"g":162,"b":125},{"name":"Piggy Pink","r":253,"g":221,"b":230},{"name":"Pewter Blue","r":139,"g":168,"b":183},{"name":"Periwinkle","r":197,"g":208,"b":230},{"name":"Peridot","r":171,"g":173,"b":72},{"name":"Pearly Purple","r":183,"g":104,"b":162},{"name":"Peach","r":255,"g":207,"b":171},{"name":"Pacific Blue","r":28,"g":169,"b":201},{"name":"Outrageous Orange","r":255,"g":110,"b":74},{"name":"Outer Space","r":65,"g":74,"b":76},{"name":"Orchid Pearl","r":123,"g":66,"b":89},{"name":"Orchid","r":230,"g":168,"b":215},{"name":"Orange Yellow","r":248,"g":213,"b":104},{"name":"Orange Soda","r":250,"g":91,"b":61},{"name":"Orange Red","r":255,"g":43,"b":43},{"name":"Orange","r":255,"g":117,"b":56},{"name":"Onyx","r":53,"g":56,"b":57},{"name":"Olive Green","r":186,"g":184,"b":108},{"name":"Ogre Odor","r":253,"g":82,"b":64},{"name":"Ocean Green Pearl","r":72,"g":191,"b":145},{"name":"Ocean Blue Pearl","r":79,"g":66,"b":181},{"name":"New Car","r":33,"g":79,"b":198},{"name":"Neon Carrot","r":255,"g":163,"b":67},{"name":"Navy Blue","r":25,"g":116,"b":210},{"name":"Mystic Pearl","r":214,"g":82,"b":130},{"name":"Mystic Maroon","r":173,"g":67,"b":121},{"name":"Mummys Tomb","r":130,"g":142,"b":132},{"name":"Mulberry","r":197,"g":75,"b":140},{"name":"Mountain Meadow","r":48,"g":186,"b":143},{"name":"Moonstone","r":58,"g":168,"b":193},{"name":"Misty Moss","r":187,"g":180,"b":119},{"name":"Midnight Pearl","r":112,"g":38,"b":112},{"name":"Midnight Blue","r":26,"g":72,"b":118},{"name":"Metallic Sunburst","r":156,"g":124,"b":56},{"name":"Metallic Seaweed","r":10,"g":126,"b":140},{"name":"Melon","r":253,"g":188,"b":180},{"name":"Mauvelous","r":239,"g":152,"b":170},{"name":"Maroon","r":200,"g":56,"b":90},{"name":"Mango Tango","r":255,"g":130,"b":67},{"name":"Mandarin Pearl","r":243,"g":122,"b":72},{"name":"Manatee","r":151,"g":154,"b":170},{"name":"Malachite","r":70,"g":148,"b":150},{"name":"Maize","r":237,"g":209,"b":156},{"name":"Mahogany","r":205,"g":74,"b":76},{"name":"Magic Potion","r":0,"g":15,"b":70},{"name":"Magic Mint","r":170,"g":240,"b":209},{"name":"Magenta","r":246,"g":100,"b":175},{"name":"Macaroni Cheese","r":255,"g":189,"b":136},{"name":"Lumber","r":255,"g":228,"b":205},{"name":"Lime","r":178,"g":243,"b":2},{"name":"Lilac Luster","r":174,"g":152,"b":170},{"name":"Lilac","r":219,"g":145,"b":239},{"name":"Licorice","r":26,"g":17,"b":16},{"name":"Lemon Yellow","r":255,"g":244,"b":79},{"name":"Lemon Glacier","r":253,"g":255,"b":0},{"name":"Lemon","r":255,"g":255,"b":56},{"name":"Leather Jacket","r":37,"g":53,"b":41},{"name":"Lavender","r":252,"g":180,"b":213},{"name":"Laser Lemon","r":254,"g":254,"b":34},{"name":"Lapis Lazuli","r":67,"g":108,"b":185},{"name":"Key Lime Pearl","r":232,"g":244,"b":140},{"name":"Jungle Green","r":59,"g":176,"b":143},{"name":"Jelly Bean","r":218,"g":97,"b":78},{"name":"Jazzberry Jam","r":202,"g":55,"b":103},{"name":"Jasper","r":208,"g":83,"b":64},{"name":"Jade","r":70,"g":154,"b":132},{"name":"Indigo","r":93,"g":118,"b":203},{"name":"Inchworm","r":178,"g":236,"b":93},{"name":"Illuminating Emerald","r":49,"g":145,"b":119},{"name":"Hot Magenta","r":255,"g":29,"b":206},{"name":"Heat Wave","r":255,"g":122,"b":0},{"name":"Green Yellow","r":240,"g":232,"b":145},{"name":"Green Sheen","r":110,"g":174,"b":161},{"name":"Green Lizard","r":167,"g":244,"b":50},{"name":"Green Blue","r":17,"g":100,"b":180},{"name":"Green","r":28,"g":172,"b":120},{"name":"Gray","r":149,"g":145,"b":140},{"name":"Grape","r":111,"g":45,"b":168},{"name":"Granny Smith Apple","r":168,"g":228,"b":160},{"name":"Granite Gray","r":103,"g":103,"b":103},{"name":"Goldenrod","r":252,"g":217,"b":117},{"name":"Gold Fusion","r":133,"g":117,"b":78},{"name":"Gold","r":231,"g":198,"b":151},{"name":"Glossy Grape","r":171,"g":146,"b":179},{"name":"Giants Club","r":176,"g":92,"b":82},{"name":"Gargoyle Gas","r":255,"g":223,"b":70},{"name":"Fuzzy Wuzzy","r":0,"g":12,"b":102},{"name":"Fuchsia","r":195,"g":100,"b":197},{"name":"Frostbite","r":233,"g":54,"b":167},{"name":"Fresh Air","r":166,"g":231,"b":255},{"name":"Forest Green","r":109,"g":174,"b":129},{"name":"Fiery Rose","r":255,"g":84,"b":112},{"name":"Fern","r":113,"g":188,"b":120},{"name":"Eucalyptus","r":68,"g":215,"b":168},{"name":"Emerald","r":20,"g":169,"b":137},{"name":"Electric Lime","r":206,"g":255,"b":29},{"name":"Eggplant","r":110,"g":81,"b":96},{"name":"Eerie Black","r":27,"g":27,"b":27},{"name":"Dirt","r":155,"g":118,"b":83},{"name":"Dingy Dungeon","r":197,"g":49,"b":81},{"name":"Desert Sand","r":239,"g":205,"b":184},{"name":"Denim Blue","r":34,"g":67,"b":182},{"name":"Denim","r":43,"g":108,"b":196},{"name":"Deep Space Sparkle","r":74,"g":100,"b":108},{"name":"Dandelion","r":253,"g":219,"b":109},{"name":"Daffodil","r":255,"g":255,"b":49},{"name":"Cyber Grape","r":88,"g":66,"b":124},{"name":"Cultured Pearl","r":245,"g":245,"b":245},{"name":"Cotton Candy","r":255,"g":188,"b":217},{"name":"Cosmic Cobalt","r":46,"g":45,"b":136},{"name":"Cornflower","r":154,"g":206,"b":235},{"name":"Copper Penny","r":173,"g":111,"b":105},{"name":"Copper","r":221,"g":148,"b":117},{"name":"Coconut","r":254,"g":254,"b":254},{"name":"Citrine","r":147,"g":55,"b":9},{"name":"Cinnamon Satin","r":205,"g":96,"b":126},{"name":"Chocolate","r":189,"g":130,"b":96},{"name":"Chestnut","r":188,"g":93,"b":88},{"name":"Cherry","r":218,"g":38,"b":71},{"name":"Cerulean Frost","r":109,"g":155,"b":195},{"name":"Cerulean","r":29,"g":172,"b":214},{"name":"Cerise","r":221,"g":68,"b":146},{"name":"Cedar Chest","r":201,"g":90,"b":73},{"name":"Carnation Pink","r":0,"g":15,"b":172},{"name":"Caribbean Green Pearl","r":106,"g":218,"b":142},{"name":"Caribbean Green","r":28,"g":211,"b":162},{"name":"Canary","r":0,"g":15,"b":249},{"name":"Cadet Blue","r":176,"g":183,"b":198},{"name":"Burnt Sienna","r":234,"g":126,"b":93},{"name":"Burnt Orange","r":255,"g":127,"b":73},{"name":"Burnished Brown","r":161,"g":122,"b":116},{"name":"Bubble Gum","r":255,"g":211,"b":248},{"name":"Brown Sugar","r":175,"g":110,"b":77},{"name":"Brown","r":180,"g":103,"b":77},{"name":"Bright Yellow","r":255,"g":170,"b":29},{"name":"Brick Red","r":203,"g":65,"b":84},{"name":"Booger Buster","r":221,"g":226,"b":106},{"name":"Blush","r":222,"g":93,"b":131},{"name":"Blueberry","r":79,"g":134,"b":247},{"name":"Blue Violet","r":115,"g":102,"b":189},{"name":"Blue Jeans","r":93,"g":173,"b":236},{"name":"Blue Green","r":13,"g":152,"b":186},{"name":"Blue Gray","r":0,"g":6,"b":156},{"name":"Blue Bell","r":162,"g":162,"b":208},{"name":"Blue","r":31,"g":117,"b":254},{"name":"Blizzard Blue","r":172,"g":229,"b":238},{"name":"Blast Off Bronze","r":165,"g":113,"b":100},{"name":"Black Shadows","r":191,"g":175,"b":178},{"name":"Black Coral Pearl","r":84,"g":98,"b":111},{"name":"Black","r":0,"g":0,"b":0},{"name":"Bittersweet Shimmer","r":191,"g":79,"b":81},{"name":"Bittersweet","r":253,"g":124,"b":110},{"name":"Big Foot Feet","r":232,"g":142,"b":90},{"name":"Big Dip O Ruby","r":156,"g":37,"b":66},{"name":"Beaver","r":159,"g":129,"b":112},{"name":"Bdazzled Blue","r":46,"g":88,"b":148},{"name":"Banana Mania","r":250,"g":231,"b":181},{"name":"Banana","r":255,"g":209,"b":42},{"name":"Baby Powder","r":254,"g":254,"b":250},{"name":"Aztec Gold","r":195,"g":153,"b":83},{"name":"Atomic Tangerine","r":255,"g":164,"b":116},{"name":"Asparagus","r":135,"g":169,"b":107},{"name":"Aquamarine","r":120,"g":219,"b":226},{"name":"Aqua Pearl","r":95,"g":190,"b":215},{"name":"Apricot","r":253,"g":217,"b":181},{"name":"Antique Brass","r":205,"g":149,"b":117},{"name":"Amethyst","r":100,"g":96,"b":154},{"name":"Almond","r":239,"g":222,"b":205},{"name":"Alloy Orange","r":196,"g":98,"b":16},{"name":"Alien Armpit","r":132,"g":222,"b":2},{"name":"Absolute Zero","r":0,"g":72,"b":186}]}
--------------------------------------------------------------------------------
/static/crayola2.json:
--------------------------------------------------------------------------------
1 | {"colors":[{"name":"Yellow Sunshine","r":255,"g":247,"b":0,"hex":"#fff700","h":41,"s":255,"l":127},{"name":"Yellow Orange","r":255,"g":182,"b":83,"hex":"#ffb653","h":24,"s":255,"l":169},{"name":"Yellow Green","r":197,"g":227,"b":132,"hex":"#c5e384","h":55,"s":160,"l":179},{"name":"Yellow","r":252,"g":232,"b":131,"hex":"#fce883","h":35,"s":242,"l":191},{"name":"Wisteria","r":205,"g":164,"b":222,"hex":"#cda4de","h":200,"s":119,"l":193},{"name":"Wintergreen Dream","r":86,"g":136,"b":125,"hex":"#56887d","h":118,"s":57,"l":111},{"name":"Winter Wizard","r":160,"g":230,"b":255,"hex":"#a0e6ff","h":138,"s":255,"l":207},{"name":"Winter Sky","r":255,"g":0,"b":124,"hex":"#ff007c","h":-20,"s":255,"l":127},{"name":"Wild Watermelon","r":252,"g":108,"b":133,"hex":"#fc6c85","h":-7,"s":244,"l":180},{"name":"Wild Strawberry","r":255,"g":67,"b":164,"hex":"#ff43a4","h":-21,"s":255,"l":161},{"name":"Wild Blue Yonder","r":162,"g":173,"b":208,"hex":"#a2add0","h":159,"s":83,"l":185},{"name":"White","r":255,"g":255,"b":255,"hex":"#ffffff","h":0,"s":0,"l":255},{"name":"Vivid Violet","r":143,"g":80,"b":157,"hex":"#8f509d","h":204,"s":82,"l":118},{"name":"Vivid Tangerine","r":255,"g":160,"b":137,"hex":"#ffa089","h":8,"s":254,"l":195},{"name":"Violet Red","r":247,"g":83,"b":148,"hex":"#f75394","h":-16,"s":232,"l":165},{"name":"Violet Purple","r":146,"g":110,"b":174,"hex":"#926eae","h":193,"s":72,"l":142},{"name":"Violet Blue","r":50,"g":74,"b":178,"hex":"#324ab2","h":162,"s":143,"l":113},{"name":"Unmellow Yellow","r":0,"g":15,"b":246,"hex":"#000ff6","h":167,"s":255,"l":123},{"name":"Twilight Lavender","r":138,"g":73,"b":107,"hex":"#8a496b","h":-22,"s":78,"l":105},{"name":"Turquoise Pearl","r":59,"g":188,"b":208,"hex":"#3bbcd0","h":133,"s":156,"l":133},{"name":"Turquoise Blue","r":119,"g":221,"b":231,"hex":"#77dde7","h":131,"s":178,"l":175},{"name":"Tumbleweed","r":222,"g":170,"b":136,"hex":"#deaa88","h":16,"s":144,"l":179},{"name":"Tulip","r":255,"g":135,"b":141,"hex":"#ff878d","h":-2,"s":254,"l":195},{"name":"Tropical Rain Forest","r":23,"g":128,"b":109,"hex":"#17806d","h":119,"s":177,"l":75},{"name":"Timberwolf","r":219,"g":215,"b":210,"hex":"#dbd7d2","h":23,"s":28,"l":214},{"name":"Tigers Eye","r":181,"g":105,"b":23,"hex":"#b56917","h":22,"s":197,"l":102},{"name":"Tickle Me Pink","r":252,"g":137,"b":172,"hex":"#fc89ac","h":-12,"s":242,"l":194},{"name":"Thistle","r":235,"g":199,"b":223,"hex":"#ebc7df","h":-28,"s":120,"l":217},{"name":"Teal Blue","r":24,"g":167,"b":181,"hex":"#18a7b5","h":131,"s":195,"l":102},{"name":"Tart Orange","r":251,"g":77,"b":70,"hex":"#fb4d46","h":1,"s":244,"l":160},{"name":"Tan","r":250,"g":167,"b":108,"hex":"#faa76c","h":17,"s":238,"l":179},{"name":"Sweet Brown","r":168,"g":55,"b":49,"hex":"#a83731","h":2,"s":139,"l":108},{"name":"Sunset Pearl","r":241,"g":204,"b":121,"hex":"#f1cc79","h":29,"s":206,"l":180},{"name":"Sunset Orange","r":253,"g":94,"b":83,"hex":"#fd5e53","h":2,"s":249,"l":168},{"name":"Sunny Pearl","r":242,"g":242,"b":122,"hex":"#f2f27a","h":42,"s":209,"l":182},{"name":"Sunglow","r":255,"g":207,"b":72,"hex":"#ffcf48","h":31,"s":254,"l":163},{"name":"Sunburnt Cyclops","r":255,"g":64,"b":76,"hex":"#ff404c","h":-2,"s":255,"l":159},{"name":"Sugar Plum","r":145,"g":78,"b":117,"hex":"#914e75","h":-24,"s":76,"l":111},{"name":"Strawberry","r":252,"g":90,"b":141,"hex":"#fc5a8d","h":-13,"s":245,"l":171},{"name":"Steel Teal","r":95,"g":138,"b":139,"hex":"#5f8a8b","h":128,"s":47,"l":117},{"name":"Steel Blue","r":0,"g":129,"b":171,"hex":"#0081ab","h":137,"s":255,"l":85},{"name":"Spring Green","r":236,"g":234,"b":190,"hex":"#eceabe","h":40,"s":139,"l":213},{"name":"Spring Frost","r":135,"g":255,"b":42,"hex":"#87ff2a","h":66,"s":255,"l":148},{"name":"Sonic Silver","r":117,"g":117,"b":117,"hex":"#757575","h":0,"s":0,"l":117},{"name":"Soap","r":206,"g":200,"b":239,"hex":"#cec8ef","h":176,"s":140,"l":219},{"name":"Smokey Topaz","r":131,"g":42,"b":13,"hex":"#832a0d","h":10,"s":208,"l":72},{"name":"Smoke","r":115,"g":130,"b":118,"hex":"#738276","h":93,"s":15,"l":122},{"name":"Smashed Pumpkin","r":255,"g":109,"b":58,"hex":"#ff6d3a","h":11,"s":255,"l":156},{"name":"Slimy Green","r":41,"g":150,"b":23,"hex":"#299617","h":78,"s":187,"l":86},{"name":"Sky Blue","r":128,"g":218,"b":235,"hex":"#80daeb","h":134,"s":185,"l":181},{"name":"Sizzling Sunrise","r":255,"g":219,"b":0,"hex":"#ffdb00","h":36,"s":255,"l":127},{"name":"Sizzling Red","r":255,"g":56,"b":85,"hex":"#ff3855","h":-6,"s":255,"l":155},{"name":"Silver","r":205,"g":197,"b":194,"hex":"#cdc5c2","h":11,"s":25,"l":199},{"name":"Shocking Pink","r":251,"g":126,"b":253,"hex":"#fb7efd","h":211,"s":247,"l":189},{"name":"Shiny Shamrock","r":95,"g":167,"b":120,"hex":"#5fa778","h":99,"s":74,"l":131},{"name":"Shimmering Blush","r":217,"g":134,"b":149,"hex":"#d98695","h":-7,"s":133,"l":175},{"name":"Sheen Green","r":143,"g":212,"b":0,"hex":"#8fd400","h":56,"s":255,"l":106},{"name":"Shamrock","r":69,"g":206,"b":162,"hex":"#45cea2","h":113,"s":148,"l":137},{"name":"Shampoo","r":255,"g":207,"b":241,"hex":"#ffcff1","h":-30,"s":255,"l":231},{"name":"Shadow Blue","r":119,"g":139,"b":165,"hex":"#778ba5","h":151,"s":51,"l":142},{"name":"Shadow","r":138,"g":121,"b":93,"hex":"#8a795d","h":26,"s":49,"l":115},{"name":"Sepia","r":165,"g":105,"b":79,"hex":"#a5694f","h":12,"s":89,"l":122},{"name":"Sea Serpent","r":75,"g":199,"b":207,"hex":"#4bc7cf","h":130,"s":147,"l":141},{"name":"Sea Green","r":159,"g":226,"b":191,"hex":"#9fe2bf","h":105,"s":136,"l":192},{"name":"Screamin Green","r":118,"g":255,"b":122,"hex":"#76ff7a","h":86,"s":255,"l":186},{"name":"Scarlet","r":252,"g":40,"b":71,"hex":"#fc2847","h":-6,"s":247,"l":146},{"name":"Sasquatch Socks","r":255,"g":70,"b":129,"hex":"#ff4681","h":-13,"s":254,"l":162},{"name":"Sapphire","r":45,"g":93,"b":161,"hex":"#2d5da1","h":152,"s":143,"l":103},{"name":"Salmon Pearl","r":241,"g":68,"b":74,"hex":"#f1444a","h":-1,"s":219,"l":154},{"name":"Salmon","r":255,"g":155,"b":170,"hex":"#ff9baa","h":-6,"s":255,"l":205},{"name":"Rusty Red","r":218,"g":44,"b":67,"hex":"#da2c43","h":-5,"s":178,"l":131},{"name":"Ruby","r":170,"g":64,"b":105,"hex":"#aa4069","h":-16,"s":115,"l":117},{"name":"Royal Purple","r":120,"g":81,"b":169,"hex":"#7851a9","h":188,"s":89,"l":125},{"name":"Rose Quartz","r":189,"g":85,"b":156,"hex":"#bd559c","h":-29,"s":112,"l":137},{"name":"Rose Pearl","r":240,"g":56,"b":101,"hex":"#f03865","h":-10,"s":219,"l":147},{"name":"Rose Dust","r":158,"g":94,"b":111,"hex":"#9e5e6f","h":-11,"s":64,"l":126},{"name":"Rose","r":255,"g":80,"b":80,"hex":"#ff5050","h":0,"s":255,"l":167},{"name":"Robins Egg Blue","r":31,"g":206,"b":203,"hex":"#1fcecb","h":126,"s":188,"l":118},{"name":"Red Violet","r":192,"g":68,"b":143,"hex":"#c0448f","h":-25,"s":126,"l":130},{"name":"Red Salsa","r":253,"g":58,"b":74,"hex":"#fd3a4a","h":-3,"s":249,"l":155},{"name":"Red Orange","r":255,"g":83,"b":73,"hex":"#ff5349","h":2,"s":254,"l":163},{"name":"Red","r":238,"g":32,"b":77,"hex":"#ee204d","h":-9,"s":218,"l":135},{"name":"Razzmic Berry","r":141,"g":78,"b":133,"hex":"#8d4e85","h":-37,"s":73,"l":109},{"name":"Razzmatazz","r":227,"g":37,"b":107,"hex":"#e3256b","h":-15,"s":196,"l":131},{"name":"Razzle Dazzle Rose","r":255,"g":72,"b":208,"hex":"#ff48d0","h":-31,"s":254,"l":163},{"name":"Raw Umber","r":113,"g":75,"b":35,"hex":"#714b23","h":21,"s":134,"l":73},{"name":"Raw Sienna","r":214,"g":138,"b":89,"hex":"#d68a59","h":16,"s":153,"l":151},{"name":"Radical Red","r":255,"g":73,"b":108,"hex":"#ff496c","h":-8,"s":254,"l":163},{"name":"Quick Silver","r":166,"g":166,"b":166,"hex":"#a6a6a6","h":0,"s":0,"l":166},{"name":"Purple Plum","r":156,"g":81,"b":182,"hex":"#9c51b6","h":201,"s":104,"l":131},{"name":"Purple Pizzazz","r":254,"g":78,"b":218,"hex":"#fe4eda","h":-33,"s":252,"l":166},{"name":"Purple Mountains Majesty","r":157,"g":129,"b":186,"hex":"#9d81ba","h":190,"s":74,"l":157},{"name":"Purple Heart","r":116,"g":66,"b":200,"hex":"#7442c8","h":185,"s":140,"l":133},{"name":"Princess Perfume","r":255,"g":133,"b":207,"hex":"#ff85cf","h":-25,"s":254,"l":194},{"name":"Polished Pine","r":93,"g":164,"b":147,"hex":"#5da493","h":117,"s":71,"l":128},{"name":"Plump Purple","r":89,"g":70,"b":178,"hex":"#5946b2","h":177,"s":111,"l":124},{"name":"Plum","r":142,"g":69,"b":133,"hex":"#8e4585","h":-37,"s":88,"l":105},{"name":"Pixie Powder","r":57,"g":18,"b":133,"hex":"#391285","h":184,"s":194,"l":75},{"name":"Pink Sherbert","r":247,"g":143,"b":167,"hex":"#f78fa7","h":-9,"s":220,"l":195},{"name":"Pink Pearl","r":176,"g":112,"b":128,"hex":"#b07080","h":-10,"s":73,"l":144},{"name":"Pink Flamingo","r":252,"g":116,"b":253,"hex":"#fc74fd","h":212,"s":247,"l":184},{"name":"Pine Green","r":21,"g":128,"b":120,"hex":"#158078","h":124,"s":183,"l":74},{"name":"Pine","r":69,"g":162,"b":125,"hex":"#45a27d","h":110,"s":102,"l":115},{"name":"Piggy Pink","r":253,"g":221,"b":230,"hex":"#fddde6","h":-11,"s":226,"l":237},{"name":"Pewter Blue","r":139,"g":168,"b":183,"hex":"#8ba8b7","h":141,"s":59,"l":161},{"name":"Periwinkle","r":197,"g":208,"b":230,"hex":"#c5d0e6","h":155,"s":101,"l":213},{"name":"Peridot","r":171,"g":173,"b":72,"hex":"#abad48","h":43,"s":105,"l":122},{"name":"Pearly Purple","r":183,"g":104,"b":162,"hex":"#b768a2","h":-31,"s":90,"l":143},{"name":"Peach","r":255,"g":207,"b":171,"hex":"#ffcfab","h":18,"s":254,"l":212},{"name":"Pacific Blue","r":28,"g":169,"b":201,"hex":"#1ca9c9","h":135,"s":192,"l":114},{"name":"Outrageous Orange","r":255,"g":110,"b":74,"hex":"#ff6e4a","h":8,"s":255,"l":164},{"name":"Outer Space","r":65,"g":74,"b":76,"hex":"#414a4c","h":135,"s":19,"l":70},{"name":"Orchid Pearl","r":123,"g":66,"b":89,"hex":"#7b4259","h":-17,"s":76,"l":94},{"name":"Orchid","r":230,"g":168,"b":215,"hex":"#e6a8d7","h":-32,"s":141,"l":199},{"name":"Orange Yellow","r":248,"g":213,"b":104,"hex":"#f8d568","h":32,"s":232,"l":176},{"name":"Orange Soda","r":250,"g":91,"b":61,"hex":"#fa5b3d","h":6,"s":242,"l":155},{"name":"Orange Red","r":255,"g":43,"b":43,"hex":"#ff2b2b","h":0,"s":255,"l":149},{"name":"Orange","r":255,"g":117,"b":56,"hex":"#ff7538","h":13,"s":255,"l":155},{"name":"Onyx","r":53,"g":56,"b":57,"hex":"#353839","h":138,"s":9,"l":55},{"name":"Olive Green","r":186,"g":184,"b":108,"hex":"#bab86c","h":41,"s":92,"l":147},{"name":"Ogre Odor","r":253,"g":82,"b":64,"hex":"#fd5240","h":4,"s":249,"l":158},{"name":"Ocean Green Pearl","r":72,"g":191,"b":145,"hex":"#48bf91","h":111,"s":122,"l":131},{"name":"Ocean Blue Pearl","r":79,"g":66,"b":181,"hex":"#4f42b5","h":174,"s":118,"l":123},{"name":"New Car","r":33,"g":79,"b":198,"hex":"#214fc6","h":158,"s":182,"l":115},{"name":"Neon Carrot","r":255,"g":163,"b":67,"hex":"#ffa343","h":21,"s":255,"l":161},{"name":"Navy Blue","r":25,"g":116,"b":210,"hex":"#1974d2","h":149,"s":200,"l":117},{"name":"Mystic Pearl","r":214,"g":82,"b":130,"hex":"#d65282","h":-15,"s":157,"l":148},{"name":"Mystic Maroon","r":173,"g":67,"b":121,"hex":"#ad4379","h":-21,"s":112,"l":120},{"name":"Mummys Tomb","r":130,"g":142,"b":132,"hex":"#828e84","h":92,"s":12,"l":136},{"name":"Mulberry","r":197,"g":75,"b":140,"hex":"#c54b8c","h":-22,"s":130,"l":136},{"name":"Mountain Meadow","r":48,"g":186,"b":143,"hex":"#30ba8f","h":114,"s":150,"l":117},{"name":"Moonstone","r":58,"g":168,"b":193,"hex":"#3aa8c1","h":135,"s":137,"l":125},{"name":"Misty Moss","r":187,"g":180,"b":119,"hex":"#bbb477","h":38,"s":84,"l":153},{"name":"Midnight Pearl","r":112,"g":38,"b":112,"hex":"#702670","h":-42,"s":125,"l":75},{"name":"Midnight Blue","r":26,"g":72,"b":118,"hex":"#1a4876","h":148,"s":162,"l":72},{"name":"Metallic Sunburst","r":156,"g":124,"b":56,"hex":"#9c7c38","h":28,"s":120,"l":106},{"name":"Metallic Seaweed","r":10,"g":126,"b":140,"hex":"#0a7e8c","h":132,"s":221,"l":75},{"name":"Melon","r":253,"g":188,"b":180,"hex":"#fdbcb4","h":4,"s":241,"l":216},{"name":"Mauvelous","r":239,"g":152,"b":170,"hex":"#ef98aa","h":-8,"s":186,"l":195},{"name":"Maroon","r":200,"g":56,"b":90,"hex":"#c8385a","h":-10,"s":144,"l":128},{"name":"Mango Tango","r":255,"g":130,"b":67,"hex":"#ff8243","h":14,"s":255,"l":161},{"name":"Mandarin Pearl","r":243,"g":122,"b":72,"hex":"#f37a48","h":12,"s":223,"l":157},{"name":"Manatee","r":151,"g":154,"b":170,"hex":"#979aaa","h":163,"s":25,"l":160},{"name":"Malachite","r":70,"g":148,"b":150,"hex":"#469496","h":128,"s":92,"l":110},{"name":"Maize","r":237,"g":209,"b":156,"hex":"#edd19c","h":27,"s":176,"l":196},{"name":"Mahogany","r":205,"g":74,"b":76,"hex":"#cd4a4c","h":0,"s":144,"l":139},{"name":"Magic Potion","r":0,"g":15,"b":70,"hex":"#000f46","h":160,"s":255,"l":35},{"name":"Magic Mint","r":170,"g":240,"b":209,"hex":"#aaf0d1","h":108,"s":178,"l":205},{"name":"Magenta","r":246,"g":100,"b":175,"hex":"#f664af","h":-21,"s":227,"l":173},{"name":"Macaroni Cheese","r":255,"g":189,"b":136,"hex":"#ffbd88","h":18,"s":254,"l":195},{"name":"Lumber","r":255,"g":228,"b":205,"hex":"#ffe4cd","h":19,"s":255,"l":230},{"name":"Lime","r":178,"g":243,"b":2,"hex":"#b2f302","h":53,"s":250,"l":122},{"name":"Lilac Luster","r":174,"g":152,"b":170,"hex":"#ae98aa","h":-34,"s":30,"l":163},{"name":"Lilac","r":219,"g":145,"b":239,"hex":"#db91ef","h":203,"s":190,"l":192},{"name":"Licorice","r":26,"g":17,"b":16,"hex":"#1a1110","h":4,"s":60,"l":21},{"name":"Lemon Yellow","r":255,"g":244,"b":79,"hex":"#fff44f","h":39,"s":255,"l":167},{"name":"Lemon Glacier","r":253,"g":255,"b":0,"hex":"#fdff00","h":42,"s":255,"l":127},{"name":"Lemon","r":255,"g":255,"b":56,"hex":"#ffff38","h":42,"s":255,"l":155},{"name":"Leather Jacket","r":37,"g":53,"b":41,"hex":"#253529","h":95,"s":45,"l":45},{"name":"Lavender","r":252,"g":180,"b":213,"hex":"#fcb4d5","h":-19,"s":235,"l":216},{"name":"Laser Lemon","r":254,"g":254,"b":34,"hex":"#fefe22","h":42,"s":252,"l":144},{"name":"Lapis Lazuli","r":67,"g":108,"b":185,"hex":"#436cb9","h":155,"s":119,"l":126},{"name":"Key Lime Pearl","r":232,"g":244,"b":140,"hex":"#e8f48c","h":47,"s":210,"l":192},{"name":"Jungle Green","r":59,"g":176,"b":143,"hex":"#3bb08f","h":115,"s":126,"l":117},{"name":"Jelly Bean","r":218,"g":97,"b":78,"hex":"#da614e","h":5,"s":166,"l":147},{"name":"Jazzberry Jam","r":202,"g":55,"b":103,"hex":"#ca3767","h":-13,"s":148,"l":128},{"name":"Jasper","r":208,"g":83,"b":64,"hex":"#d05340","h":5,"s":154,"l":136},{"name":"Jade","r":70,"g":154,"b":132,"hex":"#469a84","h":116,"s":95,"l":112},{"name":"Indigo","r":93,"g":118,"b":203,"hex":"#5d76cb","h":160,"s":131,"l":147},{"name":"Inchworm","r":178,"g":236,"b":93,"hex":"#b2ec5d","h":59,"s":201,"l":164},{"name":"Illuminating Emerald","r":49,"g":145,"b":119,"hex":"#319177","h":115,"s":126,"l":97},{"name":"Hot Magenta","r":255,"g":29,"b":206,"hex":"#ff1dce","h":-33,"s":255,"l":142},{"name":"Heat Wave","r":255,"g":122,"b":0,"hex":"#ff7a00","h":20,"s":255,"l":127},{"name":"Green Yellow","r":240,"g":232,"b":145,"hex":"#f0e891","h":38,"s":193,"l":192},{"name":"Green Sheen","r":110,"g":174,"b":161,"hex":"#6eaea1","h":118,"s":72,"l":142},{"name":"Green Lizard","r":167,"g":244,"b":50,"hex":"#a7f432","h":59,"s":229,"l":147},{"name":"Green Blue","r":17,"g":100,"b":180,"hex":"#1164b4","h":148,"s":210,"l":98},{"name":"Green","r":28,"g":172,"b":120,"hex":"#1cac78","h":112,"s":183,"l":100},{"name":"Gray","r":149,"g":145,"b":140,"hex":"#95918c","h":23,"s":10,"l":144},{"name":"Grape","r":111,"g":45,"b":168,"hex":"#6f2da8","h":192,"s":147,"l":106},{"name":"Granny Smith Apple","r":168,"g":228,"b":160,"hex":"#a8e4a0","h":80,"s":142,"l":194},{"name":"Granite Gray","r":103,"g":103,"b":103,"hex":"#676767","h":0,"s":0,"l":103},{"name":"Goldenrod","r":252,"g":217,"b":117,"hex":"#fcd975","h":31,"s":244,"l":184},{"name":"Gold Fusion","r":133,"g":117,"b":78,"hex":"#85754e","h":30,"s":66,"l":105},{"name":"Gold","r":231,"g":198,"b":151,"hex":"#e7c697","h":24,"s":159,"l":191},{"name":"Glossy Grape","r":171,"g":146,"b":179,"hex":"#ab92b3","h":202,"s":45,"l":162},{"name":"Giants Club","r":176,"g":92,"b":82,"hex":"#b05c52","h":4,"s":95,"l":129},{"name":"Gargoyle Gas","r":255,"g":223,"b":70,"hex":"#ffdf46","h":35,"s":254,"l":162},{"name":"Fuzzy Wuzzy","r":0,"g":12,"b":102,"hex":"#000c66","h":165,"s":255,"l":51},{"name":"Fuchsia","r":195,"g":100,"b":197,"hex":"#c364c5","h":211,"s":116,"l":148},{"name":"Frostbite","r":233,"g":54,"b":167,"hex":"#e936a7","h":-26,"s":204,"l":143},{"name":"Fresh Air","r":166,"g":231,"b":255,"hex":"#a6e7ff","h":138,"s":254,"l":210},{"name":"Forest Green","r":109,"g":174,"b":129,"hex":"#6dae81","h":98,"s":73,"l":141},{"name":"Fiery Rose","r":255,"g":84,"b":112,"hex":"#ff5470","h":-6,"s":255,"l":169},{"name":"Fern","r":113,"g":188,"b":120,"hex":"#71bc78","h":88,"s":91,"l":150},{"name":"Eucalyptus","r":68,"g":215,"b":168,"hex":"#44d7a8","h":113,"s":165,"l":141},{"name":"Emerald","r":20,"g":169,"b":137,"hex":"#14a989","h":118,"s":201,"l":94},{"name":"Electric Lime","r":206,"g":255,"b":29,"hex":"#ceff1d","h":51,"s":255,"l":142},{"name":"Eggplant","r":110,"g":81,"b":96,"hex":"#6e5160","h":-21,"s":38,"l":95},{"name":"Eerie Black","r":27,"g":27,"b":27,"hex":"#1b1b1b","h":0,"s":0,"l":27},{"name":"Dirt","r":155,"g":118,"b":83,"hex":"#9b7653","h":20,"s":77,"l":119},{"name":"Dingy Dungeon","r":197,"g":49,"b":81,"hex":"#c53151","h":-9,"s":153,"l":123},{"name":"Desert Sand","r":239,"g":205,"b":184,"hex":"#efcdb8","h":16,"s":161,"l":211},{"name":"Denim Blue","r":34,"g":67,"b":182,"hex":"#2243b6","h":160,"s":174,"l":108},{"name":"Denim","r":43,"g":108,"b":196,"hex":"#2b6cc4","h":151,"s":163,"l":119},{"name":"Deep Space Sparkle","r":74,"g":100,"b":108,"hex":"#4a646c","h":137,"s":47,"l":91},{"name":"Dandelion","r":253,"g":219,"b":109,"hex":"#fddb6d","h":32,"s":248,"l":181},{"name":"Daffodil","r":255,"g":255,"b":49,"hex":"#ffff31","h":42,"s":255,"l":152},{"name":"Cyber Grape","r":88,"g":66,"b":124,"hex":"#58427c","h":186,"s":77,"l":95},{"name":"Cultured Pearl","r":245,"g":245,"b":245,"hex":"#f5f5f5","h":0,"s":0,"l":245},{"name":"Cotton Candy","r":255,"g":188,"b":217,"hex":"#ffbcd9","h":-18,"s":255,"l":221},{"name":"Cosmic Cobalt","r":46,"g":45,"b":136,"hex":"#2e2d88","h":170,"s":128,"l":90},{"name":"Cornflower","r":154,"g":206,"b":235,"hex":"#9aceeb","h":142,"s":170,"l":194},{"name":"Copper Penny","r":173,"g":111,"b":105,"hex":"#ad6f69","h":3,"s":74,"l":139},{"name":"Copper","r":221,"g":148,"b":117,"hex":"#dd9475","h":12,"s":154,"l":169},{"name":"Coconut","r":254,"g":254,"b":254,"hex":"#fefefe","h":0,"s":0,"l":254},{"name":"Citrine","r":147,"g":55,"b":9,"hex":"#933709","h":14,"s":225,"l":77},{"name":"Cinnamon Satin","r":205,"g":96,"b":126,"hex":"#cd607e","h":-11,"s":132,"l":150},{"name":"Chocolate","r":189,"g":130,"b":96,"hex":"#bd8260","h":15,"s":105,"l":142},{"name":"Chestnut","r":188,"g":93,"b":88,"hex":"#bc5d58","h":2,"s":108,"l":138},{"name":"Cherry","r":218,"g":38,"b":71,"hex":"#da2647","h":-7,"s":180,"l":128},{"name":"Cerulean Frost","r":109,"g":155,"b":195,"hex":"#6d9bc3","h":147,"s":106,"l":152},{"name":"Cerulean","r":29,"g":172,"b":214,"hex":"#1dacd6","h":137,"s":194,"l":121},{"name":"Cerise","r":221,"g":68,"b":146,"hex":"#dd4492","h":-21,"s":176,"l":144},{"name":"Cedar Chest","r":201,"g":90,"b":73,"hex":"#c95a49","h":5,"s":138,"l":137},{"name":"Carnation Pink","r":0,"g":15,"b":172,"hex":"#000fac","h":166,"s":255,"l":86},{"name":"Caribbean Green Pearl","r":106,"g":218,"b":142,"hex":"#6ada8e","h":98,"s":153,"l":162},{"name":"Caribbean Green","r":28,"g":211,"b":162,"hex":"#1cd3a2","h":116,"s":195,"l":119},{"name":"Canary","r":0,"g":15,"b":249,"hex":"#000ff9","h":167,"s":255,"l":124},{"name":"Cadet Blue","r":176,"g":183,"b":198,"hex":"#b0b7c6","h":156,"s":41,"l":187},{"name":"Burnt Sienna","r":234,"g":126,"b":93,"hex":"#ea7e5d","h":9,"s":196,"l":163},{"name":"Burnt Orange","r":255,"g":127,"b":73,"hex":"#ff7f49","h":12,"s":254,"l":163},{"name":"Burnished Brown","r":161,"g":122,"b":116,"hex":"#a17a74","h":5,"s":49,"l":138},{"name":"Bubble Gum","r":255,"g":211,"b":248,"hex":"#ffd3f8","h":-35,"s":255,"l":233},{"name":"Brown Sugar","r":175,"g":110,"b":77,"hex":"#af6e4d","h":14,"s":99,"l":126},{"name":"Brown","r":180,"g":103,"b":77,"hex":"#b4674d","h":10,"s":103,"l":128},{"name":"Bright Yellow","r":255,"g":170,"b":29,"hex":"#ffaa1d","h":26,"s":255,"l":142},{"name":"Brick Red","r":203,"g":65,"b":84,"hex":"#cb4154","h":-5,"s":145,"l":133},{"name":"Booger Buster","r":221,"g":226,"b":106,"hex":"#dde26a","h":44,"s":171,"l":166},{"name":"Blush","r":222,"g":93,"b":131,"hex":"#de5d83","h":-12,"s":168,"l":157},{"name":"Blueberry","r":79,"g":134,"b":247,"hex":"#4f86f7","h":156,"s":232,"l":163},{"name":"Blue Violet","r":115,"g":102,"b":189,"hex":"#7366bd","h":176,"s":101,"l":145},{"name":"Blue Jeans","r":93,"g":173,"b":236,"hex":"#5dadec","h":146,"s":201,"l":164},{"name":"Blue Green","r":13,"g":152,"b":186,"hex":"#0d98ba","h":135,"s":221,"l":99},{"name":"Blue Gray","r":0,"g":6,"b":156,"hex":"#00069c","h":168,"s":255,"l":78},{"name":"Blue Bell","r":162,"g":162,"b":208,"hex":"#a2a2d0","h":170,"s":83,"l":185},{"name":"Blue","r":31,"g":117,"b":254,"hex":"#1f75fe","h":153,"s":252,"l":142},{"name":"Blizzard Blue","r":172,"g":229,"b":238,"hex":"#ace5ee","h":133,"s":168,"l":205},{"name":"Blast Off Bronze","r":165,"g":113,"b":100,"hex":"#a57164","h":8,"s":67,"l":132},{"name":"Black Shadows","r":191,"g":175,"b":178,"hex":"#bfafb2","h":-7,"s":28,"l":183},{"name":"Black Coral Pearl","r":84,"g":98,"b":111,"hex":"#54626f","h":147,"s":35,"l":97},{"name":"Black","r":0,"g":0,"b":0,"hex":"#000000","h":0,"s":0,"l":0},{"name":"Bittersweet Shimmer","r":191,"g":79,"b":81,"hex":"#bf4f51","h":0,"s":119,"l":135},{"name":"Bittersweet","r":253,"g":124,"b":110,"hex":"#fd7c6e","h":4,"s":248,"l":181},{"name":"Big Foot Feet","r":232,"g":142,"b":90,"hex":"#e88e5a","h":15,"s":192,"l":161},{"name":"Big Dip O Ruby","r":156,"g":37,"b":66,"hex":"#9c2542","h":-10,"s":157,"l":96},{"name":"Beaver","r":159,"g":129,"b":112,"hex":"#9f8170","h":15,"s":50,"l":135},{"name":"Bdazzled Blue","r":46,"g":88,"b":148,"hex":"#2e5894","h":152,"s":134,"l":97},{"name":"Banana Mania","r":250,"g":231,"b":181,"hex":"#fae7b5","h":30,"s":222,"l":215},{"name":"Banana","r":255,"g":209,"b":42,"hex":"#ffd12a","h":33,"s":255,"l":148},{"name":"Baby Powder","r":254,"g":254,"b":250,"hex":"#fefefa","h":42,"s":170,"l":252},{"name":"Aztec Gold","r":195,"g":153,"b":83,"hex":"#c39953","h":26,"s":123,"l":139},{"name":"Atomic Tangerine","r":255,"g":164,"b":116,"hex":"#ffa474","h":14,"s":255,"l":185},{"name":"Asparagus","r":135,"g":169,"b":107,"hex":"#87a96b","h":65,"s":67,"l":138},{"name":"Aquamarine","r":120,"g":219,"b":226,"hex":"#78dbe2","h":130,"s":164,"l":173},{"name":"Aqua Pearl","r":95,"g":190,"b":215,"hex":"#5fbed7","h":136,"s":153,"l":155},{"name":"Apricot","r":253,"g":217,"b":181,"hex":"#fdd9b5","h":21,"s":241,"l":217},{"name":"Antique Brass","r":205,"g":149,"b":117,"hex":"#cd9575","h":15,"s":119,"l":161},{"name":"Amethyst","r":100,"g":96,"b":154,"hex":"#64609a","h":172,"s":59,"l":125},{"name":"Almond","r":239,"g":222,"b":205,"hex":"#efdecd","h":21,"s":131,"l":222},{"name":"Alloy Orange","r":196,"g":98,"b":16,"hex":"#c46210","h":19,"s":216,"l":106},{"name":"Alien Armpit","r":132,"g":222,"b":2,"hex":"#84de02","h":59,"s":250,"l":112},{"name":"Absolute Zero","r":0,"g":72,"b":186,"hex":"#0048ba","h":153,"s":255,"l":93}]}
--------------------------------------------------------------------------------
/static/flatly.jade:
--------------------------------------------------------------------------------
1 | extends _bootstrap-layout
2 |
3 | block bootstrap-theme
4 | link(rel="stylesheet", href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css")
5 |
6 | block styles
7 | style.
8 | pre code{display:block;padding:.5em;color:#333}
9 | /* Highlight.js Theme Tomorrow */
10 | .hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}
11 | style
12 | :stylus
13 | body, h4, h5
14 | font-family 'Futura' "Century Gothic" Helvetica sans-serif !important
15 |
16 | h1, h2, h3, .aglio
17 | font-family 'Futura' "Century Gothic" Helvetica sans-serif !important
18 | text-transform uppercase
19 | letter-spacing 5px
20 |
21 | h1, h2, h3, h4, h5
22 | & a
23 | display none
24 |
25 | &:hover a
26 | display inline
27 |
28 | .panel>.list-group .list-group-item
29 | overflow scroll
30 |
31 | code
32 | color #444
33 | background-color #ddd
34 | font-family monospace !important
35 |
36 | a[data-target]
37 | cursor pointer
38 |
39 | h4
40 | font-size 100%
41 | font-weight bold
42 | text-transform uppercase
43 |
44 | .back-to-top
45 | position fixed
46 | z-index 1
47 | bottom 0px
48 | right 24px
49 | padding 4px 8px
50 | background-color #eee
51 | text-decoration none !important
52 | border-top 1px solid rgba(0, 0, 0, 0.1)
53 | border-left 1px solid rgba(0, 0, 0, 0.1)
54 | border-right 1px solid rgba(0, 0, 0, 0.1)
55 | border-top-left-radius 3px
56 | border-top-right-radius 3px
57 |
58 | .panel
59 | overflow hidden
60 |
61 | .panel-heading
62 | code
63 | color white
64 | background-color transparent
65 | white-space pre-wrap
66 | white-space -moz-pre-wrap
67 | white-space -pre-wrap
68 | white-space -o-pre-wrap
69 | word-wrap break-word
70 | h3
71 | margin-top 10px
72 | margin-bottom 10px
73 |
74 | a.list-group-item
75 | white-space nowrap
76 | text-overflow ellipsis
77 | overflow hidden
78 |
79 | &.heading
80 | background-color #ecf0f1
81 |
82 | .list-group-item.collapse
83 | display none
84 |
85 | .list-group-item.collapse.in
86 | display block
87 |
88 | #nav
89 | margin-top 38px
90 | min-width 255px
91 | top 0
92 | bottom 0
93 | padding-right 12px
94 | padding-bottom 12px
95 | overflow-y auto
96 |
97 | @media(max-width: 1199px)
98 | #nav
99 | min-width 212px
100 |
101 | block content
102 | +Content('info', false)
103 |
--------------------------------------------------------------------------------
/views/400.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .text-center
5 | h1 Say What?!?
6 | p The Color API doesn't think "#{color}" is a color.
7 | p
8 | a(href="/") Homepage
--------------------------------------------------------------------------------
/views/404.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .container.pad-s-1
5 | h1 404
6 | p Cannot find url: #{url}
7 | p
8 | a(href="/") Homepage
--------------------------------------------------------------------------------
/views/about.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .pure-g-r.container
5 | #about.pure-u-1
6 | h1.title.text-center
7 | a(href="/", title="The Color API, Opening doors to better color")= title
8 | hr
9 | p The Color API was created by Josh to allow programmatic access to color transposition and color cheme generation.
10 | p You can consume the API at either
11 | ul
12 | li The JSON(P) endpoints (Read the docs here), or
13 | li The HTML interface, accessible either through the homepage or by specifying `&format=html`
on any API request.
14 | p Try Josh's favorite, for example (HTML version).
15 | p.text-center — — —
16 | h3#cool
17 | a(href="#cool") Is it any good?
18 | p Every color
object returned by the API
19 | ul
20 | li Is named (from a matched dataset of over 2000 names+colors)
21 | br
22 | em e.g. #24B1E0 == Cerulean
23 | li Has an image URL for demonstration
24 | br
25 | em e.g. #24B1E0 image
26 | li Is transposed into hex, rgb, cmyk, hsl, hsv and XYZ
27 | li Is matched to a best-contrast color for text overlay, etc.
28 | p Every scheme
object returned by the API is seeded by the color of your request and can be any length you specify (within limits). Scheme options include `monochrome`, `monochrome-dark`, `monochrome-light`, `analogic`, `complement`, `analogic-complement`, `triad` and `quad`.
29 | p.text-center — — —
30 | p The API is open to all, no keys required.
31 |
32 | #loading.loading.back
33 | .door
34 | .bullet
35 | .bullet
36 | .bullet
37 | .bullet
38 | .door
39 | #lede
40 | p.links
41 | span.maker Read The Docs — About — Support — Author
--------------------------------------------------------------------------------
/views/colorSVG.jade:
--------------------------------------------------------------------------------
1 | svg(xmlns='http://www.w3.org/2000/svg', width='#{width}', height='#{height}')
2 | rect(fill='#{color}', x="0", y="0", width="#{width}", height="#{height}")
3 | g(fill='#{contrast}', text-anchor='middle', font-family='Futura, Century Gothic, Helvetica, sans-serif', font-size='12', style="text-transform:lowercase;")
4 | text(x='#{Math.round(width/2)}', y='#{Math.round(height/2)}') #{named ? '' : text}
5 |
--------------------------------------------------------------------------------
/views/error.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .container.pad-s-1
5 | h1 Error
6 | p= error
--------------------------------------------------------------------------------
/views/formId.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .pure-g-r.container
5 | #lede.pure-u-1
6 | h1.title.text-center
7 | a(href="/", title="The Color API, Opening doors to better color") TheColorAPI
8 | .text-center
9 | form.leader(action="/form-id", method="POST")
10 | input(name="color", type="text", placeholder="#0074AB, rgb(2,45,5), etc.", autofocus, required, value="#{req.query.color || ''}")
11 | button ID This Color
12 | p.links
13 | span.maker Read The Docs — About — Support — Updates
14 | #loading.loading.back
15 | .door
16 | .bullet
17 | .bullet
18 | .bullet
19 | .bullet
20 | .door
--------------------------------------------------------------------------------
/views/formResults.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .pure-g-r.form-results
5 | .pure-u-1
6 | .text-center
7 | h1
8 | a(href="/") TheColorAPI
9 | a.in-api-link(href="/scheme?hex=#{color.hex.clean}&format=html", title="Go To Scheme API", style="background:#{color.hex.value};color:#{color.contrast.value};") "#{color.name.value}" schemes at
/scheme?hex=#{color.hex.clean}
10 | br
11 | br
12 | img(src="#{color.image.named}", class="pure-img")
13 | br
14 | br
15 | for tK in topKeys
16 | if tK != '_links' && tK != '_embedded'
17 | .margin-center
18 | table.pure-table
19 | caption #{tK}
20 | thead
21 | tr
22 | for lK in lowKeys[tK]
23 | th #{lK}
24 | tbody
25 | tr
26 | for lK in lowKeys[tK]
27 | if typeof(color[tK][lK]) == 'object'
28 | td
29 | - var kk = Object.keys(color[tK][lK]);
30 | for k in kk
31 | | #{k} : #{0.01 * Math.round(100 * color[tK][lK][k])}
32 | else
33 | td #{color[tK][lK]}
34 | #lede
35 | p.links
36 | span.maker Read The Docs — About — Support — Author
--------------------------------------------------------------------------------
/views/index.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | #sunset
5 | .pure-g-r.container
6 | #lede.pure-u-1
7 | h1.title.text-center
8 | a(href="/", title="The Color API, Opening doors to better color") TheColorAPI
9 | small color conversion, naming, scheming & placeholders
10 | #loading.loading.back
11 | .door
12 | .bullet
13 | .bullet
14 | .bullet
15 | .bullet
16 | .door
17 | .content-div
18 | div
19 | button#try-it Try Me
20 | img#try-show
21 | hr
22 | h3 Your fast, modern, swiss army knife for color.
23 | p Pass in any valid color and get conversion into any other format, the name of the color, placeholder images and a multitude of schemes.
24 | p There are only two endpoints you need to worry about, /id
and /scheme
, and you can read the docs about both. Each endpoint is available in JSON[P], HTML & SVG format. The SVG format can be saved or used as an img[src]
attribute for super-easy embedding/sharing!
25 | p Try Josh's favorite, for example, in JSON, HTML or SVG format.
26 | .text-center –––
27 | h2 How do I convert/identify a color?
28 | p All you really need to do is access the /id
endpoint, and pass in a color value as a query string. Read the docs for more details, but all these are valid:
29 | ul
30 | li
31 | code /id?hex=ffa
32 | | or
33 | code /id?hex=00ffa6
34 | li
35 | code /id?rgb=rgb(255,0,0)
36 | | or
37 | code /id?rgb=20,43,55
38 | li Same goes for cmyk, hsl, and hsv formats
39 | p Every color
object returned by the API
40 | ul
41 | li Is named (from a matched dataset of over 2000 names+colors)
42 | br
43 | em e.g. #24B1E0 == Cerulean
44 | li Has an image URL for demonstration
45 | br
46 | em e.g. Cerulean image
47 | li Is transposed into hex, rgb, cmyk, hsl, hsv and XYZ formats
48 | li Is matched to a best-contrast color for text overlay, etc
49 | .text-center –––
50 | h2 How do I generate color schemes?
51 | p The parameters are generally the same as those necessary for the /id
endpoint (supply a color, like above), but here you can also specify a scheme mode to guide the generation.
52 | p Scheme modes include monochrome
, monochrome-dark
, monochrome-light
, analogic
, complement
, analogic-complement
, triad
and quad
.
53 | p Every scheme
object returned by the API is seeded by the color of your request and can be any length you specify (within limits). It will also include a color
object for each constituent color.
54 | .text-center –––
55 | h2 Anything else?
56 | p If you find this open source API useful, please support the developer!
57 | p.links
58 | span.maker Read The Docs — ID color — Generate scheme — contact — Author
59 |
--------------------------------------------------------------------------------
/views/layout.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= title
5 | meta(name="viewport", content="width=device-width, initial-scale=1")
6 | link(rel='stylesheet', href='/stylesheets/style.css')
7 | link(rel='icon', href="/images/favicon.png")
8 | meta(name="description", content="The best color conversion, naming and scheming API out there.")
9 | if req && req.host != 'localhost' && !noTracking
10 | script.
11 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
12 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
13 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
14 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
15 | ga('create', 'UA-37125372-13', 'auto');
16 | ga('send', 'pageview');
17 | body
18 | block content
19 |
20 | script(src="/javascripts/script.js")
--------------------------------------------------------------------------------
/views/schemeId.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .pure-g-r.container
5 | #lede.pure-u-1
6 | h1.title.text-center
7 | a(href="/", title="The Color API, Opening doors to better color") TheColorAPI
8 | .text-center
9 | form.leader(action="/scheme-id", method="POST")
10 | input(name="color", type="text", placeholder="#0074AB, rgb(2,45,5), etc.", autofocus, required, value="#{req.query.color || ''}")
11 | select(name="mode", title="Mode of scheme generation")
12 | option(value="analogic") analogic
13 | option(value="monochrome") monochrome
14 | option(value="monochrome-light") monochrome-light
15 | option(value="monochrome-dark") monochrome-dark
16 | option(value="complement") complement
17 | option(value="analogic-complement") analogic-complement
18 | option(value="triad") triad
19 | option(value="quad") quad
20 | button Scheme For This Color
21 | p.links
22 | span.maker Read The Docs — About — Support — Updates
23 | #loading.loading.back
24 | .door
25 | .bullet
26 | .bullet
27 | .bullet
28 | .bullet
29 | .door
--------------------------------------------------------------------------------
/views/schemeResults.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | .pure-g-r.form-results
5 | .pure-u-1
6 | .text-center
7 | h1
8 | a(href="/") TheColorAPI
9 | h2 #{scheme.seed.name.value} — #{scheme.mode}
10 | for color in scheme.colors
11 | if color
12 | a.scheme-color-link(href="/id?hex=#{color.hex.clean}&format=html", title="#{color.name.value}", style="background:#{color.hex.value};color:#{color.contrast.value};") #{color.name.value} →
13 | hr
14 | for sc in scheme['_links'].schemes
15 | a.scheme-to-scheme-link(href="#{sc}&format=html") #{sc.split('mode=')[1].split('&')[0]}
16 | #lede
17 | p.links
18 | span.maker Read The Docs — About — Support — Author
--------------------------------------------------------------------------------
/views/schemeSVG.jade:
--------------------------------------------------------------------------------
1 | svg(xmlns='http://www.w3.org/2000/svg', width='#{width}', height='#{height}')
2 | for color in scheme.colors
3 | if color
4 | rect(fill='#{color.hex.value}', x="0", y="#{section * iter}", width="#{width}", height="#{section}")
5 | g(fill='#{color.contrast.value}', text-anchor='middle', font-family='Futura, Century Gothic, Helvetica, sans-serif', font-size='12', style="text-transform:lowercase;")
6 | text(x='#{Math.round(width/2)}', y='#{Math.round((section * iter) + (section/2))}') #{named ? '' : color.name.value}
7 | - iter++;
--------------------------------------------------------------------------------