Copy link to clipboard
Copied
Some of the larger publications that I work on accumulate a gazillion color swatches, and I would like to be able to sort them. In the past I've done this manually, by CMYK value. But this is time-consuming and often results in visually convoluted arrangements. The greens are not all together, there are pastels up in the reds and yellows, etc. I would like to do this with a script, to save time and make it more perceptually pleasing and useful.
Any help or advice would be much appreciated. Or if you're a scripting angel, maybe you'd like to write it for me. I've written scripts before, but I'm not sure the best way to iterate through the swatches, or how to sort them into folders or group them.
The basic sorting method I want is to group the swatches in folders like so (each bullet point would be a separate folder in the Swatches palette — or maybe just grouped together in a flat list — could be an option in the script ... and the formula that follows each bullet points describes the criteria for the colors in that group and how they would be sub-sorted):
(In the above section, "If MY >127" means, "If M and Y are both individually less than 127", etc.)
For gray calculation: Average = (C+M+Y)/3
For density sorting: Density = L from (L * a * b), or other formula to calculate lightness/darkness value such as: Density = (C * 0.49) + (M * 0.6) + (Y * 0.07) + (K * 0.91)
For RGB swatches, convert RGB colors and process as CMYK?
Drop all spot colors in their own folder (or at top of list).
Drop all gradients in their own folder (or at end of list).
Hi MPrewitt,
Having fun with your idea although I still get a huge number of unassigned swatches in the 'Others' category (last group).
My script allows to play with the thresholds you've provided, you'll probably want to restore the original values.
Anyway here is the code so far:
...////////////////////////////////////////////////////////////
//
// SWATCH SORTER for InDesign - v.1.001b - indiscripts.com
//
////////////////////////////////////////////////////////////
#targetengine 'SwatchSorter1001
Copy link to clipboard
Copied
Google is your friend: Ajar Productions » Sort Swatches in Adobe InDesign
Copy link to clipboard
Copied
The Ajar script doesn't do exactly what you want. Further Google suggestions to "InDesign sort swatches javascript" gives many answers. And do check Kasyan Servetsky's site (Scripts sorted by categories for InDesign), it has many excellent scripts, including all kinds of things related to swatches and colour. Lots of ideas there.
P.
Copy link to clipboard
Copied
In the Kasyan site, there was one script to sort swatches, but it too was only an alphabetical sort.
Copy link to clipboard
Copied
Thanks, but that script merely alphabetizes the list. I wanted them
sorted by color.
Copy link to clipboard
Copied
Hi
You are very much asking for a custom script. There are several freelances who frequent the forum (including myself) who are available for custom scripts. Contrary to the name "freelances" the services are not free or even partially cheep.
What you are looking for is not that simple, also there is a difference on what the definition of a "gazillion". I have quite a bit of experience of working with various color conversion and swatch functions processing documents with thousands of swatches.
There is a very big difference between working with documents with 1000 - 5000 swatches to documents with 5000 - 11000 and 11,000+ swatches at 14,000+ it gets really tough but either way one has to know what one is dealing with.
There are at least 4 basic approaches to what you are after.
1) The standard mess around with the swatches - create, delete, apply new swatch which will reorder the swatches in a destructive manner.
2) SUI based palette which will leave the swatches alone but display the swatches in any order you like and allow the swatches to be selected from that panel, (The gradient swatches would be a challenge for that).
3) A html (extension based) palette that would replace the built in swatch palette, it would look the same just with the added functionality.
4) A SDK c++ solution that would add the sort function to the built in swatch palette.
Solution 1 would change the index of the current swatches, 2 and 3 wouldn't, 4 could go either way but more likely would.
None of the solutions would be particularly cheep with the higher numbered solutions being more not cheep than the lower ones
I personally would recommend solution 3 as the most practical.
In short quality costs.
HTH
Trevor
Copy link to clipboard
Copied
Most of the problem palettes I've dealt with are maybe 40-100 swatches. I've never seen a publication with more than 100 or so swatches in 20+ years. But I've only worked for nonprofits, and everything designed in-house with no third-party content. Large palettes with 1000+ swatches are basically the same as the libraries that ship with InDesign, which are more-or-less already sorted (although not always in the best way).
Copy link to clipboard
Copied
Hi MPrewitt,
Provided that CMYK values belong to 0..100, what is the meaning of a criteria such as M > 127?
Is the script supposed to rescale 0..100 into 0..255?
@+
Marc
Copy link to clipboard
Copied
Oops, you are right. I was using 0-255 ranges, except when I got to the rules for darks and pastels, which are based on 0-100. So for the first nine rules, all the "127"s should be 50, and all the "64"s should be 25.
Copy link to clipboard
Copied
Here is the (non-functional, probably buggy) script so far:
// Description: SortSwatches v. 0.1. Script to sort InDesign swatches by color value
// Copyright © 2015, Michael Prewitt.
// This script is provided "as-is" and the author takes no responsibility whatsoever for results of its use.
/*
- Magentas: If M >50 and CYK <25, sort by density
- Reds: If MY >50 and CK <25, and M>=Y, sort by density
- Oranges: If MY >50 and CK <25, and Y>M, sort by density
- Yellows: If Y >50 and CMK <25, sort by density
- Warm Greens: If CY >50 and MK <25, and Y>=C, sort by density
- Cool Greens: If CY >50 and MK <25, and C>Y, sort by density
- Cyans: If C >50 and MYK <25, sort by density
- Blues: If CM >50 and YK <25, and C>=M, sort by density
- Purples: If CM >50 and YK <25, and M>C, sort by density
- Darks: All values are >85, sort by dominant CMY, then by density
- Pastels: All values are <15, sort by dominant CMY, then by density
- Grays: Any where the CMY values are +/- 10 from their average (which also includes CMY=0), sort by dominant CMY then by density.
- Everything else: Sort by dominant CMY then by density
Drop all spot colors in their own folder?
Drop all gradients in their own folder?
*/
// For reference, see http://jongware.mit.edu/idcs5js/index_Color%20Suite.html
(function(){
sortSwatches();
});
function sortSwatches(){
// Alert: Script will convert RGB to CMYK ... OK or cancel
// Alert: Does not currently support custom mixed ink swatches or custom registration swatches
// Load current swatches into arrays (RGB/CMYK, spot, gradient) ... convert RGB to CMYK in the process ??? may not be necessary
allSwatches = app.activeDocument.swatches.everyItem();
allSwatches.splice(0,4); // Don't sort None, Registration, Paper, Black
for (i=0; i<allSwatches.length; i++) {
if ( allSwatches instanceof Swatch.Color ) {
swatchType = allSwatches.model;
switch(swatchType) {
case model.SPOT:
arraySpot[arraySpot.length] = allSwatches;
break;
case model.PROCESS:
arrayCMYK[arrayCMYK.length] = allSwatches;
break;
}
} else if ( allSwatches instanceof Swatch.Gradient ) {
arrayGradient[arrayGradient.length] = allSwatches;
}
/*
else if ( allSwatches instanceof Swatch.MixedInk ) { }
else if ( allSwatches instanceof Swatch.MixedInkGroup ) { }
*/
}
// Sort spot array by name
arraySpot.sort(); // This likely needs to be more complex; each item is an object, and 'name' might not be the primary index
// Sort CMYK array by color
for (i=0; i<arrayCMYK.length; i++) {
color = arrayCMYK;
color.space = ColorSpace.CMYK;
var c = color.colorValue[0];
var m = color.colorValue[1];
var y = color.colorValue[2];
var k = color.colorValue[3];
// Determine the density value
var density = c*0.49 + m*0.6 + y*0.07 + k*0.91;
// Determine the average value of CMY
var avgValue = (c+m+y)/3;
// Sort all colors into arrays such as magentas, blues, grays
// Then sort those arrays by density, etc., as explained in rules above
}
// Sort gradient array by name
arrayGradient.sort(); // This likely needs to be more complex; each item is an object, and 'name' might not be the primary index
// Dump spot, CMYK, gradient values back into the palette
// Remember to skip None, Registration, Paper, Black
}
Copy link to clipboard
Copied
What does the expression "sort by dominant CMY" mean?
(i.e., what is the implied order there?)
@+
Marc
Copy link to clipboard
Copied
The intent of that was to sub-sort those swatches so the ones where the C value is highest are together, the ones where the M value is highest are together, and ones where the Y value are highest are together. This would group them by hue (roughly), as opposed to merely sorting by brightness, etc.
Copy link to clipboard
Copied
Hi MPrewitt,
Having fun with your idea although I still get a huge number of unassigned swatches in the 'Others' category (last group).
My script allows to play with the thresholds you've provided, you'll probably want to restore the original values.
Anyway here is the code so far:
////////////////////////////////////////////////////////////
//
// SWATCH SORTER for InDesign - v.1.001b - indiscripts.com
//
////////////////////////////////////////////////////////////
#targetengine 'SwatchSorter1001b'
$.global.hasOwnProperty('ProgressBar')||(function(H/*OST*/,S/*ELF*/,I/*NNER*/)
{
H
= function ProgressBar(/*str*/title, /*uint*/width, /*uint*/height){
(60<=(width||0))||(width=340);
(40<=(height||0))||(height=60);
var H = 22,
Y = (3*height-2*H)>>2,
W = new Window('palette', ' '+title, [0,0,width,height]),
P = W.add('progressbar', { x:20, y:height>>2, width:width-40, height:12 }, 0,100),
T = W.add('statictext' , { x:0, y:Y, width:width, height:H }),
__ = function(a,b){ return localize.apply(null,a.concat(b)) };
this.pattern = ['%1'];
W.center();
// ---
// API
// ---
this.msg = function(/*str*/s, v)
// ---------------------------------
{
s && (T.location = [(width-T.graphics.measureString(s)[0])>>1, Y]);
T.text = s;
W.update();
};
this.show = this.reset = function(/*str*/s, /*uint*/v)
// ---------------------------------
{
if( s && s != localize(s,1,2,3,4,5,6,7,8,9) )
{
this.pattern[0] = s;
s = __(this.pattern, [].slice.call(arguments,2));
}
else
{
this.pattern[0] = '%1';
}
P.value = 0;
P.maxvalue = v||0;
P.visible = !!v;
this.msg(s);
W.show();
W.update();
};
this.hit = function(x)
// ---------------------------------
{
++P.value;
('undefined' != typeof x) && this.msg(__(this.pattern, [].slice.call(arguments,0)));
W.update();
};
this.hide = function()
// ---------------------------------
{
W.hide();
};
this.close = function()
// ---------------------------------
{
W.close();
};
};
})($.global,{toString:function(){return 'ProgressBar'}},{});
$.global.hasOwnProperty('SwatchSorter')||(function(H/*OST*/,S/*SELF*/,I/*NNER*/)
{
H
= S;
//======================================================
// DATA AND SHORTCUTS
//======================================================
I.O_ROOT = app;
I.O_LOCKED = { 'None':1, 'Black':1,'Paper':1, 'Registration':1 };
I.CM_MIX = +ColorModel.MIXEDINKMODEL;
I.CM_PROCESS = +ColorModel.PROCESS;
I.CM_REG = +ColorModel.REGISTRATION;
I.CM_SPOT = +ColorModel.SPOT;
I.CS_CMYK = +ColorSpace.CMYK;
I.CS_LAB = +ColorSpace.LAB;
I.CS_MIX = +ColorSpace.MIXEDINK;
I.CS_RGB = +ColorSpace.RGB;
// Keep colors and tints together.
I.O_ORDER = { 'Color':1, 'Tint':1, 'Gradient':3, 'MixedInk':4 };
I.BUILD_CLUSTERS = 1;
I.CLUSTER_MASK = 0xF000;
I.O_CLUSTERS = {
'_0' : 'Magentas', // 0x0000
'_4096' : 'Reds', // 0x1000
'_8192' : 'Oranges', // 0x2000
// ---
'_16384' : 'Yellows', // 0x4000
'_20480' : 'Warm Greens', // 0x5000
'_24576' : 'Cool Greens', // 0x6000
// ---
'_32768' : 'Cyans', // 0x8000
'_36864' : 'Blues', // 0x9000
'_40960' : 'Purples', // 0xA000
// ===
'_49152' : 'Grays', // 0xC000
'_53248' : 'Darks', // 0xD000
'_57344' : 'Pastels', // 0xE000
'_61440' : 'Others', // 0xF000
};
//======================================================
// CMYK ROUTINES
//======================================================
I.F_APPLY_CMYK_TINT = function(/*0..100[4]&*/CMYK, /*]0,1]*/t)
//----------------------------------
{
CMYK[0] *= t;
CMYK[1] *= t;
CMYK[2] *= t;
CMYK[3] *= t;
};
I.F_TO_CMYK_KEY = function F(/*0..100[4]*/CMYK, d,a,v,i,t)
//----------------------------------
{
const mABS = Math.abs,
mMIN = Math.min,
mMAX = Math.max;
const INK_MIN = 50,
INK_MAX = 35,
GRAY_VAR = 5,
DARK_MIN = 70,
PASTEL_MAX = 25;
F.DENSITY || (F.DENSITY=[49,60,7,91]);
F.BUFFER || (F.BUFFER=[0,0,0,0]);
for( d=0, a=F.BUFFER, v=F.DENSITY, i=-1 ; ++i < 4 ; (d+=v*(t=CMYK)), a=-(INK_MAX>t)||+(INK_MIN<t) );
d >>>= 3; // <= 0xA1B
for( t=(0<=a[3]), i=-1 ; (!t) && (++i < 3) ; t = 0 > a && 0 < a[(1+i)%3] && a[(2+i)%3] );
if( 3 > (i&=3) )
{
// CMY CLASSES (0x0000 -> 0xAA1B).
// ---------------------------------------------
// DOM SUB DENSITY(12b)
//
// ---------------------------------------------
// Magentas: 00 00 xxxx xxxx xxxx
// Reds: 00 01 xxxx xxxx xxxx
// Oranges: 00 10 xxxx xxxx xxxx
// ---------------------------------------------
// Yellows: 01 00 xxxx xxxx xxxx
// Warm Greens: 01 01 xxxx xxxx xxxx
// Cool Greens: 01 10 xxxx xxxx xxxx
// ---------------------------------------------
// Cyans: 10 00 xxxx xxxx xxxx
// Blues: 10 01 xxxx xxxx xxxx
// Purples: 10 10 xxxx xxxx xxxx
// ---------------------------------------------
++t && (t -= CMYK[(2+i)%3] <= CMYK[(1+i)%3] );
t |= (i<<2);
return d | (t<<12);
}
// ---
// Darks, pastels, grays, others
// ---
d >>>= 2;
i = 0;
t = 3;
while( v = CMYK[0] + CMYK[1] + CMYK[2] )
{
// Other classes (0xC000 -> 0xFFFF)
// ---------------------------------------------
// MK CTG DOM DENSITY(10b)
//
// ---------------------------------------------
// Grays (M) 11 00 00 xx xxxx xxxx
// Grays (Y) 11 00 01 xx xxxx xxxx
// Grays (C) 11 00 10 xx xxxx xxxx
// Grays (K) 11 00 11 xx xxxx xxxx
// ---------------------------------------------
// Darks (M) 11 01 00 xx xxxx xxxx
// Darks (Y) 11 01 01 xx xxxx xxxx
// Darks (C) 11 01 10 xx xxxx xxxx
// ---------------------------------------------
// Pastels (M) 11 10 00 xx xxxx xxxx
// Pastels (Y) 11 10 01 xx xxxx xxxx
// Pastels (C) 11 10 10 xx xxxx xxxx
// ---------------------------------------------
// Others (M) 11 11 00 xx xxxx xxxx
// Others (Y) 11 11 01 xx xxxx xxxx
// Others (C) 11 11 10 xx xxxx xxxx
// ---------------------------------------------
v /= 3;
t = ( CMYK[1] < CMYK[2] || CMYK[1] < CMYK[0] ) << ( CMYK[2] < CMYK[0] );
// Grays
// ---
if( GRAY_VAR >= mMAX(mABS(CMYK[0]-v),mABS(CMYK[1]-v),mABS(CMYK[2]-v)) ) break;
// Darks
// ---
if( ++i && DARK_MIN < mMIN.apply(null,CMYK) ) break;
// Pastels
// ---
if( ++i && PASTEL_MAX > mMAX.apply(null,CMYK) ) break;
// Others
// ---
++i; break;
}
t |= 0x30 | (i<<2);
return d | (t<<10);
};
I.F_CONVERT_TO_CMYK = function(/*Color*/o,/*ColorSpace*/cs,/*ColorValue*/cv, r)
//----------------------------------
{
try {
// Convert to cmyk space if possible.
// This might fail due to imported swatches.
// ---
o.space = I.CS_CMYK;
r = o.colorValue;
// Revert to initial color props.
// ---
o.properties = { space:cs, colorValue:cv };
}
catch(_)
{
// Not implemented
// if( I.CS_RGB==cs && 3==cv.length ) r = I.FN_RGB_TO_CMYK_APPROX(cv);
}
return r || false;
};
I.F_COLOR_TO_CMYK = function(/*Color*/o, r,cv,cs)
//----------------------------------
{
r = false;
if( I.CM_MIX == +o.model ) return r;
cv = o.colorValue;
cs = +o.space;
r = I.CS_CMYK == cs ? cv : I.F_CONVERT_TO_CMYK(o,cs,cv);
return r;
};
//======================================================
// PARSING
//======================================================
I.F_TO_FULL_KEY = function(/*uint*/order,/*[c,m,y,k]*/CMYK,/*str*/name,/*uint*/id)
//----------------------------------
{
return String.fromCharCode(0x40+order,I.F_TO_CMYK_KEY(CMYK)) +
name + '\x01' + id;
};
I.F_PARSE_Color = function(/*Color*/o,/*str*/name,/*uint*/id, a,k)
//----------------------------------
{
if( I.O_LOCKED.hasOwnProperty(name) ) return '';
if( !(a=I.F_COLOR_TO_CMYK(o)) ) return '';
return I.F_TO_FULL_KEY(I.O_ORDER['Color'],a,name,id);
};
I.F_PARSE_Tint = function(/*Tint*/o,/*str*/name,/*uint*/id, bc,a,k)
//----------------------------------
{
bc = o.baseColor;
if( I.O_LOCKED.hasOwnProperty(bc.name) ) return '';
if( !(a=I.F_COLOR_TO_CMYK(bc)) ) return '';
I.F_APPLY_CMYK_TINT(a,o.tintValue/100);
return I.F_TO_FULL_KEY(I.O_ORDER['Tint'],a,name,id);
};
I.F_PARSE_Gradient = function(/*Color*/o,/*str*/name,/*uint*/id)
//----------------------------------
// Not implemented
{
return '';
};
I.F_PARSE_MixedInk = function(/*Color*/o,/*str*/name,/*uint*/id)
//----------------------------------
// Not implemented
{
return '';
};
//==========================================================================
// ORDERING
//==========================================================================
I.F_APPLY_ORDER_CLUSTERS = function(/*ProgressBar*/PB,/*str{}*/data,/*Swatches*/coll, n,o,i,k,s,t)
//----------------------------------
{
const CM = I.CLUSTER_MASK,
OC = I.O_CLUSTERS;
n = data.length;
PB.reset("Assigning groups... (%1 / %2)",n);
o = {};
for( i = 0 ; i < n ; ++i )
{
PB.hit(1+i,n);
if( !(k=data) ) continue;
s = '_' + (CM & k.charCodeAt(1));
if( !OC.hasOwnProperty(s) ) continue;
s = OC
;
k = k.substr(2).split('\x01');
if( !(t=coll.itemByID(parseInt(k[1],10))).isValid ) continue;
(o
||(o=[])).push(t);}
n = o.__count__;
i = 0;
t = I.O_ROOT.colorGroups;
PB.reset("Creating group %1... (%2 / %3)",n);
for( k in o )
{
if( !o.hasOwnProperty(k) ) continue;
PB.hit(k,++i,n);
t.add(k,o
); o
.length = 0; }
};
I.F_APPLY_ORDER_FLAT = function(/*ProgressBar*/PB,/*str{}*/data,/*Swatches*/coll, n,i,k,t,o,d)
//----------------------------------
{
n = data.length;
PB.reset("Reordering swatches... (%1 / %2)",n);
for( i = 0 ; i < n ; ++i )
{
PB.hit(1+i,n);
if( !(k=data) ) continue;
k = k.substr(2).split('\x01');
if( !(t=coll.itemByID(parseInt(k[1],10))).isValid ) continue;
t = t.getElements()[0]; // !important!
switch( t.constructor.name )
{
case 'Color':
o = t.duplicate();
t.remove(o);
o.name = k[0];
break;
case 'Tint':
o = t.properties;
d = o.tintValue > 50 ? -.001 : +.001;
o.tintValue += d;
o = I.O_ROOT.tints.add(o);
t.remove(o);
o.tintValue -= d;
break;
default:
// not implemented
}
}
};
I.F_PROCESS_ALL_SWATCHES = function(/*ProgressBar*/PB,/*Swatches*/coll, ei,a,names,ids,i,n,t,k)
//----------------------------------
{
ei = coll.everyItem();
a = ei.getElements();
names = ei.name;
ids = ei.id;
i = n = a.length;
// Parsing swatches
// ---
PB.reset("Parsing swatches... (%1 / %2)",n);
while( i-- )
{
PB.hit(n-i,n);
t = a;
k = 'F_PARSE_' + t.constructor.name;
a = I.hasOwnProperty(k) ? I
(t,names,ids) : ''; }
// Sorting
// ---
PB.reset("Sorting colors...");
a.sort();
// Reordering swatches
// ---
I['F_APPLY_ORDER_' + ((I.BUILD_CLUSTERS && 'colorGroups' in app) ? 'CLUSTERS' : 'FLAT')](PB,a,coll);
a.length = 0;
};
//==========================================================================
// IDLE MANAGER
//==========================================================================
(I.F_IDLE_TASK = ('idleTasks' in app) ?
function F(/*?fct*/callback, t)
//----------------------------------
{
t = app.idleTasks.length;
// Cleanup
// ---
if( t && (t=app.idleTasks.itemByName(F.Q.name)).isValid )
{
t.eventListeners.everyItem().remove();
t.remove();
}
// Set callback (if any)
// ---
if( 'function' == typeof callback )
{
app.idleTasks.add({ name:F.Q.name, sleep: F.Q.rate }).
addEventListener(IdleEvent.ON_IDLE, callback, false);
}
}:
function F(/*fct*/callback)
//----------------------------------
{
if( 'function' == typeof callback ) callback();
}
).Q = {name:'Task'+S, rate:25};
(I.F_EXIT_PROCESS = function F()
//----------------------------------
{
// Stop the task
// ---
I.F_IDLE_TASK();
// Close the PB
// ---
F.Q && (F.Q.close());
}).Q = 0;
//==========================================================================
// API
//==========================================================================
S.run = function(/*?Document*/doc,/*bool=0*/NO_CLUSTERS, PB,t)
//----------------------------------
{
I.BUILD_CLUSTERS = +!NO_CLUSTERS;
PB = new ProgressBar(S + ' \xA9indiscripts.com',400,100);
if( ('panels' in app) && (t=app.panels.itemByName('$ID/Swatches')).visible ) t.visible = false;
doc || (doc=app.properties.activeDocument);
if( doc instanceof Document )
{
doc.preflightOptions.properties = { preflightOff: true };
t = doc;
}
else
{
t = app;
}
if( ('colorGroups' in app) && 1 < t.colorGroups.length )
{
t.colorGroups.itemByRange(1,-1).ungroup();
}
I.O_ROOT = t;
app.doScript('I.F_PROCESS_ALL_SWATCHES(PB,t.swatches);',
ScriptLanguage.javascript,
undefined,
UndoModes.entireScript,
''+S
);
PB.reset("Refreshing the GUI. Please, wait...");
if( 'panels' in app )
{
app.panels.itemByName('$ID/Swatches').visible = true;
}
I.F_EXIT_PROCESS.Q = PB;
I.F_IDLE_TASK(I.F_EXIT_PROCESS);
};
})($.global,{toString:function(){return 'SwatchSorter'}}, {});
SwatchSorter.run();
@+
Marc
Copy link to clipboard
Copied
Hi Marc and all,
Pretty disappointing that you didn't even get a ta very much from MPrewitt for you 548 line solution but just for the crossword puzzle value here's my half pennies worth.
I didn't implement the sort for the non standard swatches, it would be very easy to add it but I couldn't be bothered.
Your method is obviously more efficient, the downside of it being the "other" category. As I wrote I think the only real solution is in the form of an extension that does not rely on the incredibly slow DOM operations and a really good solution should probably use c++ for the number churning. Other than that I think the best solution would be to combine our two completely different methods using yours as the primary and mine to deal with the other category, my only reservation being that there is clearly some miscategorization by your method which is tougher to fix than in mine.
My method is based on comparing the swatches colorValues with colorValues in a dictionary object that contains the color values in RGB CMYK and Lab of the standard CSS colors including their shades and the greys, matching the closest definition and indexing accordingly and retrieving the correct color group.
I made this dictionary by greping the rgb.txt file to produce the range of swatches on an ID document and then converting to CMYK and Lab spaces to add to the object those values, I then used the swatch panel to order and group the colors to inject those values into the dictionary
.
Non sorted colors from rgb.txt file
Manually sorted colors
Manually categorized colors
Script sorted by my method, a bit of a mess but no others
Sorted by your method, nice and tidy but a lot of others.
Off course my method totally ignores the op's spec (doesn't bother me) and could be significantly improved by applying a better manual sort and grouping. My method also ignores color profiles.
(function wrapper(){
function sortSwatches () {
const wantToGroupColor = true; // change to false if err you don't want to group
const process, notCopiableSwatchReg, standardColorReg;
process = +ColorModel.PROCESS;
notCopiableSwatchReg = /^Black|None|Paper|Registration$/;
standardColorReg = /C/;
var papa, pSwatches, groupColors, l, colorTable, n, colorModel, newColor, oldColor, colorGroup, colorGroups;
// if document open process document swatches otherwise process application swatches
papa = app.properties.activeDocument || app;
// setup color groupings (only useful for CC2015+ I think)
groupColors = wantToGroupColor && ('colorGroups' in app);
if (groupColors) {
if (papa.colorGroups.length > 1) {
papa.colorGroups.itemByRange(1,-1).ungroup();
};
// These names should match the colorGroup names in the cssColors object, use find and change all to change the names
colorGroups = {
"Blue Shades":[],
"Blues":[],
"Purples":[],
"Cyans":[],
"Greens":[],
"Yellows":[],
"Reds":[],
"Magentas":[],
"Pinks":[],
"Oranges":[],
"Browns":[],
"Pastels":[],
"Grey Shades":[],
"Light Grays and Whites":[],
"Medium Grays":[],
"Blacks And Darks Grays":[],
}
}
// Make array of processable swatches
pSwatches = papa.swatches.everyItem ().getElements ().slice(0);
l = pSwatches.length;
// if there are less than 2 copyable swatches then we might as well quit;
if (l < 6) exit(); // Black, None, Reg. & Paper are not copyable => 4 + 2 = 6
// Make a filtered array of colors removing non copyable swatches
colorTable = [];
/// Make Color Table
while (color = pSwatches.pop()) {
// for now not bothering to deal with mixed inks, gradients and tints
color && !notCopiableSwatchReg.test(color.name) && standardColorReg.test(color.constructor.name) && colorTable.push({color: color, properties: color.properties});
};
// Index the swatches by comparing with dictionary values
l = colorTable.length;
while (l--) {
colorTable
.cssData = indexByCSS(colorTable .color.colorValue, +colorTable .color.space); colorTable
._index = colorTable .cssData[0]; colorTable
.colorGroup = colorTable .cssData[1]; }
byValue = function(a, b) {
return a._index < b._index;
}
colorTable.sort(byValue);
// Add the colors and put them in groups if desired
l = colorTable.length;
for (n = 0; n < l; n++) {
newColor = papa.colors.add();
colorTable
.color.remove(newColor); newColor.properties = colorTable
.properties; if (groupColors) {
colorGroups[colorTable
.colorGroup].push(newColor); }
}
if (groupColors) {
for (colorGroup in colorGroups) {
if (colorGroups[colorGroup].length) papa.colorGroups.add(colorGroup, colorGroups[colorGroup]);
}
}
};
/***********************************************************************************************************/
/****** Helper Functions and const ****************/
/***********************************************************************************************************/
const cssColors = {
_fffafa:{name:"snow1", r:255, g:250, b:250, colorGroup:"Pastels", _index:"497", C:0, M:3, Y:1, K:0, L:99, A:1, B:0}, _f8f8ff:{name:"ghostwhite", r:248, g:248, b:255, colorGroup:"Pastels", _index:"438", C:3, M:2, Y:0, K:0, L:98, A:0, B:-4}, _f5f5f5:{name:"gray96", r:245, g:245, b:245, colorGroup:"Pastels", _index:"435", C:5, M:4, Y:4, K:0, L:97, A:0, B:0}, _dcdcdc:{name:"gainsboro", r:220, g:220, b:220, colorGroup:"Pastels", _index:"360", C:16, M:11, Y:13, K:0, L:88, A:0, B:0}, _fffaf0:{name:"floralwhite", r:255, g:250, b:240, colorGroup:"Pastels", _index:"496", C:0, M:2, Y:7, K:0, L:98, A:0, B:5}, _fdf5e6:{name:"oldlace", r:253, g:245, b:230, colorGroup:"Pastels", _index:"445", C:1, M:4, Y:12, K:0, L:97, A:0, B:8}, _faf0e6:{name:"linen", r:250, g:240, b:230, colorGroup:"Pastels", _index:"441", C:2, M:7, Y:11, K:0, L:95, A:2, B:6}, _faebd7:{name:"antiquewhite", r:250, g:235, b:215, colorGroup:"Pastels", _index:"440", C:2, M:9, Y:18, K:0, L:94, A:2, B:11}, _ffefd5:{name:"papayawhip", r:255, g:239, b:213, colorGroup:"Pastels", _index:"489", C:0, M:7, Y:20, K:0, L:95, A:2, B:14}, _ffebcd:{name:"blanchedalmond", r:255, g:235, b:205, colorGroup:"Pastels", _index:"487", C:0, M:9, Y:24, K:0, L:94, A:3, B:17}, _ffe4c4:{name:"bisque1", r:255, g:228, b:196, colorGroup:"Pastels", _index:"484", C:0, M:13, Y:26, K:0, L:92, A:6, B:19}, _ffdab9:{name:"peachpuff1", r:255, g:218, b:185, colorGroup:"Pastels", _index:"480", C:0, M:19, Y:30, K:0, L:90, A:9, B:21}, _ffdead:{name:"navajowhite1", r:255, g:222, b:173, colorGroup:"Pastels", _index:"481", C:0, M:16, Y:38, K:0, L:90, A:6, B:28}, _ffe4b5:{name:"moccasin", r:255, g:228, b:181, colorGroup:"Pastels", _index:"483", C:0, M:12, Y:35, K:0, L:92, A:4, B:26}, _fff8dc:{name:"cornsilk1", r:255, g:248, b:220, colorGroup:"Pastels", _index:"494", C:1, M:2, Y:18, K:0, L:98, A:-1, B:14}, _fffff0:{name:"ivory1", r:255, g:255, b:240, colorGroup:"Pastels", _index:"500", C:1, M:0, Y:8, K:0, L:100, A:-2, B:7}, _fffacd:{name:"lemonchiffon1", r:255, g:250, b:205, colorGroup:"Pastels", _index:"495", C:2, M:0, Y:27, K:0, L:98, A:-4, B:22}, _fff5ee:{name:"seashell1", r:255, g:245, b:238, colorGroup:"Pastels", _index:"492", C:0, M:5, Y:7, K:0, L:97, A:2, B:4}, _f0fff0:{name:"honeydew1", r:240, g:255, b:240, colorGroup:"Pastels", _index:"429", C:7, M:0, Y:10, K:0, L:99, A:-8, B:5}, _f5fffa:{name:"mintcream", r:245, g:255, b:250, colorGroup:"Pastels", _index:"436", C:5, M:0, Y:4, K:0, L:99, A:-5, B:1}, _f0ffff:{name:"azure1", r:240, g:255, b:255, colorGroup:"Pastels", _index:"430", C:7, M:0, Y:2, K:0, L:99, A:-6, B:-2}, _f0f8ff:{name:"aliceblue", r:240, g:248, b:255, colorGroup:"Pastels", _index:"428", C:7, M:1, Y:0, K:0, L:97, A:-2, B:-5}, _e6e6fa:{name:"lavender", r:230, g:230, b:250, colorGroup:"Pastels", _index:"371", C:11, M:9, Y:0, K:0, L:92, A:2, B:-10}, _fff0f5:{name:"lavenderblush1", r:255, g:240, b:245, colorGroup:"Pastels", _index:"491", C:0, M:9, Y:1, K:0, L:96, A:5, B:-1}, _ffe4e1:{name:"mistyrose1", r:255, g:228, b:225, colorGroup:"Pastels", _index:"485", C:0, M:15, Y:9, K:0, L:93, A:9, B:5}, _ffffff:{name:"gray100", r:255, g:255, b:255, colorGroup:"Pastels", _index:"501", C:0, M:0, Y:0, K:0, L:100, A:0, B:0}, _000000:{name:"gray0", r:0, g:0, b:0, colorGroup:"Blacks And Darks Grays", _index:"000", C:91, M:79, Y:62, K:97, L:0, A:0, B:0}, _000001:{name:"black", r:0, g:0, b:0, colorGroup:"Blacks And Darks Grays", _index:"000", C:0, M:0, Y:0, K:100, L:0, A:0, B:0}, _000002:{name:"richblack", r:0, g:0, b:0, colorGroup:"Blacks And Darks Grays", _index:"000", C:100, M:100, Y:100, K:100, L:0, A:0, B:0}, _2f4f4f:{name:"darkslategray", r:47, g:79, b:79, colorGroup:"Blue Shades", _index:"056", C:78, M:46, Y:53, K:46, L:31, A:-13, B:-4}, _696969:{name:"gray41", r:105, g:105, b:105, colorGroup:"Grey Shades", _index:"115", C:55, M:45, Y:44, K:31, L:44, A:0, B:0}, _708090:{name:"slategray", r:112, g:128, b:144, colorGroup:"Blue Shades", _index:"127", C:59, M:40, Y:31, K:14, L:53, A:-4, B:-11}, _778899:{name:"lightslategray", r:119, g:136, b:153, colorGroup:"Blue Shades", _index:"132", C:57, M:38, Y:28, K:11, L:56, A:-4, B:-12}, _bebebe:{name:"gray", r:190, g:190, b:190, colorGroup:"Grey Shades", _index:"280", C:29, M:21, Y:22, K:3, L:77, A:0, B:0}, _d3d3d3:{name:"lightgray", r:211, g:211, b:211, colorGroup:"Grey Shades", _index:"351", C:20, M:15, Y:16, K:0, L:85, A:0, B:0}, _191970:{name:"midnightblue", r:25, g:25, b:112, colorGroup:"Blues", _index:"040", C:100, M:95, Y:29, K:14, L:15, A:25, B:-51}, _000080:{name:"navyblue", r:0, g:0, b:128, colorGroup:"Blues", _index:"001", C:100, M:93, Y:26, K:14, L:11, A:40, B:-67}, _6495ed:{name:"cornflowerblue", r:100, g:149, b:237, colorGroup:"Blues", _index:"107", C:63, M:38, Y:0, K:0, L:61, A:3, B:-50}, _483d8b:{name:"darkslateblue", r:72, g:61, b:139, colorGroup:"Purples", _index:"079", C:87, M:84, Y:6, K:1, L:30, A:21, B:-43}, _6a5acd:{name:"slateblue", r:106, g:90, b:205, colorGroup:"Purples", _index:"118", C:74, M:70, Y:0, K:0, L:45, A:29, B:-59}, _7b68ee:{name:"mediumslateblue", r:123, g:104, b:238, colorGroup:"Purples", _index:"140", C:69, M:63, Y:0, K:0, L:51, A:33, B:-67}, _8470ff:{name:"lightslateblue", r:132, g:112, b:255, colorGroup:"Purples", _index:"153", C:66, M:60, Y:0, K:0, L:55, A:35, B:-70}, _0000cd:{name:"blue3", r:0, g:0, b:205, colorGroup:"Blues", _index:"003", C:98, M:81, Y:0, K:0, L:23, A:57, B:-95}, _4169e1:{name:"royalblue", r:65, g:105, b:225, colorGroup:"Blues", _index:"069", C:81, M:61, Y:0, K:0, L:47, A:17, B:-67}, _0000ff:{name:"blue1", r:0, g:0, b:255, colorGroup:"Blues", _index:"005", C:93, M:75, Y:0, K:0, L:30, A:68, B:-112}, _1e90ff:{name:"dodgerblue1", r:30, g:144, b:255, colorGroup:"Blues", _index:"044", C:74, M:41, Y:0, K:0, L:58, A:0, B:-65}, _00bfff:{name:"deepskyblue1", r:0, g:191, b:255, colorGroup:"Blues", _index:"014", C:66, M:4, Y:0, K:0, L:72, A:-24, B:-44}, _87ceeb:{name:"skyblue", r:135, g:206, b:235, colorGroup:"Blues", _index:"156", C:49, M:1, Y:5, K:0, L:79, A:-18, B:-22}, _87cefa:{name:"lightskyblue", r:135, g:206, b:250, colorGroup:"Blues", _index:"157", C:48, M:4, Y:0, K:0, L:79, A:-15, B:-29}, _4682b4:{name:"steelblue", r:70, g:130, b:180, colorGroup:"Blues", _index:"076", C:74, M:41, Y:12, K:1, L:52, A:-9, B:-33}, _b0c4de:{name:"lightsteelblue", r:176, g:196, b:222, colorGroup:"Blue Shades", _index:"257", C:35, M:17, Y:6, K:0, L:78, A:-3, B:-16}, _add8e6:{name:"lightblue", r:173, g:216, b:230, colorGroup:"Blue Shades", _index:"251", C:36, M:3, Y:10, K:0, L:84, A:-13, B:-12}, _b0e0e6:{name:"powderblue", r:176, g:224, b:230, colorGroup:"Blue Shades", _index:"258", C:35, M:0, Y:12, K:0, L:86, A:-16, B:-9}, _afeeee:{name:"paleturquoise", r:175, g:238, b:238, colorGroup:"Cyans", _index:"254", C:34, M:0, Y:13, K:0, L:90, A:-21, B:-7}, _00ced1:{name:"darkturquoise", r:0, g:206, b:209, colorGroup:"Cyans", _index:"019", C:67, M:0, Y:26, K:0, L:75, A:-43, B:-15}, _48d1cc:{name:"mediumturquoise", r:72, g:209, b:204, colorGroup:"Cyans", _index:"081", C:62, M:0, Y:28, K:0, L:77, A:-39, B:-9}, _40e0d0:{name:"turquoise", r:64, g:224, b:208, colorGroup:"Cyans", _index:"068", C:60, M:0, Y:30, K:0, L:81, A:-45, B:-5}, _00ffff:{name:"cyan1", r:0, g:255, b:255, colorGroup:"Cyans", _index:"028", C:57, M:0, Y:15, K:0, L:91, A:-51, B:-15}, _e0ffff:{name:"lightcyan1", r:224, g:255, b:255, colorGroup:"Cyans", _index:"368", C:13, M:0, Y:4, K:0, L:98, A:-11, B:-4}, _5f9ea0:{name:"cadetblue", r:95, g:158, b:160, colorGroup:"Blue Shades", _index:"102", C:65, M:21, Y:36, K:4, L:61, A:-21, B:-8}, _66cdaa:{name:"aquamarine3", r:102, g:205, b:170, colorGroup:"Greens", _index:"111", C:59, M:0, Y:44, K:0, L:76, A:-38, B:7}, _7fffd4:{name:"aquamarine1", r:127, g:255, b:212, colorGroup:"Greens", _index:"148", C:46, M:0, Y:32, K:0, L:92, A:-45, B:9}, _006400:{name:"darkgreen", r:0, g:100, b:0, colorGroup:"Greens", _index:"006", C:90, M:33, Y:100, K:28, L:36, A:-40, B:40}, _556b2f:{name:"darkolivegreen", r:85, g:107, b:47, colorGroup:"Greens", _index:"095", C:67, M:37, Y:94, K:28, L:42, A:-17, B:30}, _8fbc8f:{name:"darkseagreen", r:143, g:188, b:143, colorGroup:"Greens", _index:"213", C:50, M:9, Y:53, K:0, L:72, A:-23, B:17}, _2e8b57:{name:"seagreen4", r:46, g:139, b:87, colorGroup:"Greens", _index:"055", C:80, M:22, Y:79, K:6, L:51, A:-38, B:19}, _3cb371:{name:"mediumseagreen", r:60, g:179, b:113, colorGroup:"Greens", _index:"065", C:71, M:0, Y:70, K:0, L:65, A:-46, B:23}, _20b2aa:{name:"lightseagreen", r:32, g:178, b:170, colorGroup:"Cyans", _index:"046", C:73, M:0, Y:40, K:0, L:65, A:-39, B:-7}, _98fb98:{name:"palegreen", r:152, g:251, b:152, colorGroup:"Greens", _index:"224", C:43, M:0, Y:58, K:0, L:91, A:-45, B:37}, _00ff7f:{name:"springgreen1", r:0, g:255, b:127, colorGroup:"Greens", _index:"027", C:61, M:0, Y:75, K:0, L:88, A:-73, B:45}, _7cfc00:{name:"lawngreen", r:124, g:252, b:0, colorGroup:"Greens", _index:"142", C:53, M:0, Y:100, K:0, L:89, A:-62, B:82}, _00ff00:{name:"green1", r:0, g:255, b:0, colorGroup:"Greens", _index:"026", C:65, M:0, Y:100, K:0, L:88, A:-79, B:80}, _7fff00:{name:"chartreuse1", r:127, g:255, b:0, colorGroup:"Greens", _index:"147", C:53, M:0, Y:100, K:0, L:90, A:-62, B:83}, _00fa9a:{name:"mediumspringgreen", r:0, g:250, b:154, colorGroup:"Greens", _index:"025", C:61, M:0, Y:61, K:0, L:87, A:-68, B:31}, _adff2f:{name:"greenyellow", r:173, g:255, b:47, colorGroup:"Greens", _index:"252", C:40, M:0, Y:100, K:0, L:92, A:-47, B:80}, _32cd32:{name:"limegreen", r:50, g:205, b:50, colorGroup:"Greens", _index:"058", C:69, M:0, Y:98, K:0, L:73, A:-62, B:59}, _9acd32:{name:"olivedrab3", r:154, g:205, b:50, colorGroup:"Greens", _index:"229", C:48, M:0, Y:91, K:0, L:77, A:-33, B:65}, _228b22:{name:"forestgreen", r:34, g:139, b:34, colorGroup:"Greens", _index:"048", C:82, M:19, Y:100, K:5, L:51, A:-46, B:43}, _6b8e23:{name:"olivedrab", r:107, g:142, b:35, colorGroup:"Greens", _index:"120", C:63, M:25, Y:100, K:9, L:55, A:-25, B:48}, _bdb76b:{name:"darkkhaki", r:189, g:183, b:107, colorGroup:"Yellows", _index:"278", C:30, M:19, Y:67, K:4, L:74, A:-6, B:39}, _f0e68c:{name:"khaki", r:240, g:230, b:140, colorGroup:"Yellows", _index:"426", C:10, M:4, Y:56, K:0, L:91, A:-6, B:44}, _eee8aa:{name:"palegoldenrod", r:238, g:232, b:170, colorGroup:"Yellows", _index:"418", C:10, M:4, Y:42, K:0, L:91, A:-5, B:30}, _fafad2:{name:"lightgoldenrodyellow", r:250, g:250, b:210, colorGroup:"Pastels", _index:"442", C:4, M:0, Y:24, K:0, L:98, A:-5, B:19}, _ffffe0:{name:"lightyellow1", r:255, g:255, b:224, colorGroup:"Pastels", _index:"499", C:2, M:0, Y:17, K:0, L:99, A:-4, B:14}, _ffff00:{name:"yellow1", r:255, g:255, b:0, colorGroup:"Yellows", _index:"498", C:10, M:0, Y:95, K:0, L:98, A:-16, B:93}, _ffd700:{name:"gold1", r:255, g:215, b:0, colorGroup:"Yellows", _index:"479", C:1, M:13, Y:93, K:0, L:87, A:2, B:86}, _eedd82:{name:"lightgoldenrod", r:238, g:221, b:130, colorGroup:"Yellows", _index:"413", C:10, M:9, Y:59, K:0, L:88, A:-3, B:46}, _daa520:{name:"goldenrod", r:218, g:165, b:32, colorGroup:"Browns", _index:"357", C:14, M:35, Y:93, K:3, L:71, A:12, B:68}, _b8860b:{name:"darkgoldenrod", r:184, g:134, b:11, colorGroup:"Browns", _index:"269", C:24, M:43, Y:100, K:14, L:60, A:13, B:62}, _bc8f8f:{name:"rosybrown", r:188, g:143, b:143, colorGroup:"Pinks", _index:"275", C:24, M:45, Y:34, K:9, L:64, A:17, B:6}, _cd5c5c:{name:"indianred", r:205, g:92, b:92, colorGroup:"Reds", _index:"308", C:15, M:74, Y:56, K:4, L:54, A:45, B:23}, _8b4513:{name:"chocolate4", r:139, g:69, b:19, colorGroup:"Browns", _index:"175", C:30, M:73, Y:100, K:33, L:38, A:27, B:41}, _a0522d:{name:"sienna", r:160, g:82, b:45, colorGroup:"Browns", _index:"238", C:27, M:70, Y:85, K:22, L:44, A:30, B:36}, _cd853f:{name:"tan3", r:205, g:133, b:63, colorGroup:"Browns", _index:"318", C:17, M:51, Y:81, K:6, L:62, A:23, B:48}, _deb887:{name:"burlywood", r:222, g:184, b:135, colorGroup:"Browns", _index:"362", C:13, M:29, Y:51, K:2, L:77, A:9, B:30}, _f5f5dc:{name:"beige", r:245, g:245, b:220, colorGroup:"Pastels", _index:"434", C:6, M:1, Y:19, K:0, L:96, A:-4, B:12}, _f5deb3:{name:"wheat", r:245, g:222, b:179, colorGroup:"Browns", _index:"433", C:5, M:13, Y:35, K:0, L:90, A:3, B:24}, _f4a460:{name:"sandybrown", r:244, g:164, b:96, colorGroup:"Oranges", _index:"432", C:1, M:43, Y:66, K:0, L:74, A:25, B:47}, _d2b48c:{name:"tan", r:210, g:180, b:140, colorGroup:"Browns", _index:"350", C:18, M:28, Y:47, K:5, L:75, A:6, B:24}, _d2691e:{name:"chocolate", r:210, g:105, b:30, colorGroup:"Oranges", _index:"349", C:14, M:67, Y:96, K:3, L:57, A:39, B:57}, _b22222:{name:"firebrick", r:178, g:34, b:34, colorGroup:"Reds", _index:"260", C:21, M:97, Y:90, K:13, L:40, A:56, B:39}, _a52a2a:{name:"brown", r:165, g:42, b:42, colorGroup:"Reds", _index:"244", C:24, M:93, Y:82, K:19, L:38, A:50, B:31}, _e9967a:{name:"darksalmon", r:233, g:150, b:122, colorGroup:"Reds", _index:"373", C:6, M:50, Y:51, K:0, L:70, A:29, B:28}, _fa8072:{name:"salmon", r:250, g:128, b:114, colorGroup:"Reds", _index:"439", C:0, M:62, Y:48, K:0, L:68, A:46, B:30}, _ffa07a:{name:"lightsalmon1", r:255, g:160, b:122, colorGroup:"Reds", _index:"467", C:0, M:48, Y:51, K:0, L:75, A:33, B:35}, _ffa500:{name:"orange1", r:255, g:165, b:0, colorGroup:"Oranges", _index:"468", C:0, M:42, Y:93, K:0, L:76, A:27, B:78}, _ff8c00:{name:"darkorange", r:255, g:140, b:0, colorGroup:"Oranges", _index:"465", C:7, M:31, Y:91, K:0, L:77, A:13, B:73}, _ff7f50:{name:"coral", r:255, g:127, b:80, colorGroup:"Reds", _index:"461", C:0, M:62, Y:68, K:0, L:68, A:47, B:48}, _f08080:{name:"lightcoral", r:240, g:128, b:128, colorGroup:"Reds", _index:"425", C:0, M:62, Y:40, K:0, L:67, A:43, B:20}, _ff6347:{name:"tomato1", r:255, g:99, b:71, colorGroup:"Reds", _index:"454", C:0, M:73, Y:68, K:0, L:63, A:59, B:47}, _ff4500:{name:"orangered1", r:255, g:69, b:0, colorGroup:"Reds", _index:"453", C:0, M:82, Y:94, K:0, L:59, A:68, B:70}, _ff0000:{name:"red1", r:255, g:0, b:0, colorGroup:"Reds", _index:"446", C:0, M:95, Y:92, K:0, L:54, A:80, B:69}, _ff69b4:{name:"hotpink", r:255, g:105, b:180, colorGroup:"Magentas", _index:"455", C:0, M:70, Y:0, K:0, L:66, A:63, B:-10}, _ff1493:{name:"deeppink1", r:255, g:20, b:147, colorGroup:"Magentas", _index:"448", C:0, M:90, Y:0, K:0, L:57, A:83, B:-5}, _ffc0cb:{name:"pink", r:255, g:192, b:203, colorGroup:"Pinks", _index:"475", C:0, M:35, Y:11, K:0, L:84, A:24, B:3}, _ffb6c1:{name:"lightpink", r:255, g:182, b:193, colorGroup:"Pinks", _index:"472", C:0, M:39, Y:13, K:0, L:81, A:28, B:5}, _db7093:{name:"palevioletred", r:219, g:112, b:147, colorGroup:"Pinks", _index:"358", C:11, M:68, Y:20, K:0, L:61, A:45, B:1}, _b03060:{name:"maroon", r:176, g:48, b:96, colorGroup:"Reds", _index:"255", C:24, M:91, Y:34, K:13, L:42, A:54, B:3}, _c71585:{name:"mediumvioletred", r:199, g:21, b:133, colorGroup:"Magentas", _index:"291", C:22, M:96, Y:0, K:0, L:45, A:69, B:-15}, _d02090:{name:"violetred", r:208, g:32, b:144, colorGroup:"Magentas", _index:"345", C:20, M:91, Y:0, K:0, L:48, A:70, B:-17}, _ff00ff:{name:"magenta1", r:255, g:0, b:255, colorGroup:"Magentas", _index:"447", C:41, M:78, Y:0, K:0, L:60, A:93, B:-61}, _ee82ee:{name:"violet", r:238, g:130, b:238, colorGroup:"Purples", _index:"394", C:25, M:55, Y:0, K:0, L:70, A:53, B:-37}, _dda0dd:{name:"plum", r:221, g:160, b:221, colorGroup:"Purples", _index:"361", C:19, M:45, Y:0, K:0, L:73, A:30, B:-22}, _da70d6:{name:"orchid", r:218, g:112, b:214, colorGroup:"Purples", _index:"356", C:30, M:63, Y:0, K:0, L:63, A:52, B:-34}, _ba55d3:{name:"mediumorchid", r:186, g:85, b:211, colorGroup:"Purples", _index:"272", C:50, M:72, Y:0, K:0, L:53, A:54, B:-48}, _9932cc:{name:"darkorchid", r:153, g:50, b:204, colorGroup:"Purples", _index:"225", C:66, M:82, Y:0, K:0, L:43, A:59, B:-61}, _9400d3:{name:"darkviolet", r:148, g:0, b:211, colorGroup:"Purples", _index:"218", C:70, M:85, Y:0, K:0, L:39, A:70, B:-71}, _8a2be2:{name:"blueviolet", r:138, g:43, b:226, colorGroup:"Purples", _index:"160", C:74, M:81, Y:0, K:0, L:41, A:62, B:-76}, _a020f0:{name:"purple", r:160, g:32, b:240, colorGroup:"Purples", _index:"237", C:70, M:81, Y:0, K:0, L:44, A:71, B:-79}, _9370db:{name:"mediumpurple", r:147, g:112, b:219, colorGroup:"Purples", _index:"217", C:58, M:60, Y:0, K:0, L:54, A:31, B:-51}, _d8bfd8:{name:"thistle", r:216, g:191, b:216, colorGroup:"Purples", _index:"354", C:17, M:29, Y:4, K:0, L:80, A:12, B:-10}, _eee9e9:{name:"snow2", r:238, g:233, b:233, colorGroup:"Purples", _index:"421", C:8, M:8, Y:8, K:0, L:93, A:1, B:0}, _cdc9c9:{name:"snow3", r:205, g:201, b:201, colorGroup:"Grey Shades", _index:"340", C:22, M:19, Y:18, K:1, L:81, A:1, B:0}, _8b8989:{name:"snow4", r:139, g:137, b:137, colorGroup:"Browns", _index:"204", C:46, M:37, Y:36, K:17, L:57, A:0, B:0}, _eee5de:{name:"seashell2", r:238, g:229, b:222, colorGroup:"Purples", _index:"416", C:8, M:10, Y:13, K:0, L:92, A:2, B:4}, _cdc5bf:{name:"seashell3", r:205, g:197, b:191, colorGroup:"Grey Shades", _index:"336", C:22, M:20, Y:23, K:2, L:80, A:2, B:4}, _8b8682:{name:"seashell4", r:139, g:134, b:130, colorGroup:"Browns", _index:"201", C:44, M:38, Y:39, K:19, L:56, A:1, B:2}, _ffefdb:{name:"antiquewhite1", r:255, g:239, b:219, colorGroup:"Pastels", _index:"490", C:0, M:8, Y:16, K:0, L:95, A:3, B:11}, _eedfcc:{name:"antiquewhite2", r:238, g:223, b:204, colorGroup:"Browns", _index:"414", C:8, M:13, Y:22, K:0, L:90, A:3, B:11}, _cdc0b0:{name:"antiquewhite3", r:205, g:192, b:176, colorGroup:"Grey Shades", _index:"334", C:21, M:22, Y:30, K:3, L:78, A:2, B:9}, _8b8378:{name:"antiquewhite4", r:139, g:131, b:120, colorGroup:"Browns", _index:"198", C:43, M:38, Y:44, K:21, L:55, A:1, B:7}, _eed5b7:{name:"bisque2", r:238, g:213, b:183, colorGroup:"Browns", _index:"409", C:7, M:18, Y:31, K:0, L:87, A:5, B:18}, _cdb79e:{name:"bisque3", r:205, g:183, b:158, colorGroup:"Browns", _index:"330", C:20, M:26, Y:38, K:5, L:76, A:5, B:15}, _8b7d6b:{name:"bisque4", r:139, g:125, b:107, colorGroup:"Browns", _index:"194", C:40, M:40, Y:50, K:25, L:53, A:3, B:11}, _eecbad:{name:"peachpuff2", r:238, g:203, b:173, colorGroup:"Pinks", _index:"406", C:7, M:24, Y:34, K:0, L:84, A:9, B:19}, _cdaf95:{name:"peachpuff3", r:205, g:175, b:149, colorGroup:"Browns", _index:"327", C:19, M:31, Y:40, K:6, L:74, A:8, B:17}, _8b7765:{name:"peachpuff4", r:139, g:119, b:101, colorGroup:"Browns", _index:"191", C:38, M:42, Y:51, K:28, L:52, A:5, B:12}, _eecfa1:{name:"navajowhite2", r:238, g:207, b:161, colorGroup:"Browns", _index:"407", C:7, M:20, Y:42, K:0, L:85, A:6, B:27}, _cdb38b:{name:"navajowhite3", r:205, g:179, b:139, colorGroup:"Browns", _index:"328", C:20, M:27, Y:47, K:5, L:74, A:5, B:24}, _8b795e:{name:"navajowhite4", r:139, g:121, b:94, colorGroup:"Browns", _index:"192", C:39, M:41, Y:58, K:27, L:52, A:4, B:17}, _eee9bf:{name:"lemonchiffon2", r:238, g:233, b:191, colorGroup:"Pastels", _index:"420", C:9, M:5, Y:32, K:0, L:92, A:-4, B:21}, _cdc9a5:{name:"lemonchiffon3", r:205, g:201, b:165, colorGroup:"Browns", _index:"339", C:23, M:16, Y:39, K:2, L:81, A:-3, B:18}, _8b8970:{name:"lemonchiffon4", r:139, g:137, b:112, colorGroup:"Grey Shades", _index:"203", C:45, M:34, Y:53, K:18, L:57, A:-3, B:13}, _eee8cd:{name:"cornsilk2", r:238, g:232, b:205, colorGroup:"Pastels", _index:"419", C:9, M:7, Y:24, K:0, L:92, A:-2, B:13}, _cdc8b1:{name:"cornsilk3", r:205, g:200, b:177, colorGroup:"Browns", _index:"338", C:23, M:17, Y:32, K:2, L:81, A:-2, B:12}, _8b8878:{name:"cornsilk4", r:139, g:136, b:120, colorGroup:"Grey Shades", _index:"202", C:44, M:35, Y:47, K:19, L:57, A:-2, B:9}, _eeeee0:{name:"ivory2", r:238, g:238, b:224, colorGroup:"Pastels", _index:"424", C:8, M:4, Y:15, K:0, L:94, A:-2, B:6}, _cdcdc1:{name:"ivory3", r:205, g:205, b:193, colorGroup:"Grey Shades", _index:"343", C:23, M:16, Y:25, K:1, L:82, A:-2, B:5}, _8b8b83:{name:"ivory4", r:139, g:139, b:131, colorGroup:"Grey Shades", _index:"207", C:45, M:35, Y:41, K:17, L:58, A:-2, B:4}, _e0eee0:{name:"honeydew2", r:224, g:238, b:224, colorGroup:"Greens", _index:"366", C:15, M:0, Y:16, K:0, L:93, A:-7, B:5}, _c1cdc1:{name:"honeydew3", r:193, g:205, b:193, colorGroup:"Grey Shades", _index:"285", C:29, M:13, Y:26, K:1, L:81, A:-6, B:4}, _838b83:{name:"honeydew4", r:131, g:139, b:131, colorGroup:"Grey Shades", _index:"151", C:50, M:33, Y:42, K:16, L:57, A:-5, B:3}, _eee0e5:{name:"lavenderblush2", r:238, g:224, b:229, colorGroup:"Purples", _index:"415", C:7, M:14, Y:7, K:0, L:90, A:5, B:-1}, _cdc1c5:{name:"lavenderblush3", r:205, g:193, b:197, colorGroup:"Grey Shades", _index:"335", C:22, M:24, Y:18, K:2, L:79, A:4, B:-1}, _8b8386:{name:"lavenderblush4", r:139, g:131, b:134, colorGroup:"Grey Shades", _index:"199", C:45, M:40, Y:35, K:18, L:56, A:3, B:-1}, _eed5d2:{name:"mistyrose2", r:238, g:213, b:210, colorGroup:"Pinks", _index:"410", C:7, M:20, Y:15, K:0, L:87, A:8, B:4}, _cdb7b5:{name:"mistyrose3", r:205, g:183, b:181, colorGroup:"Purples", _index:"331", C:21, M:29, Y:24, K:3, L:76, A:7, B:4}, _8b7d7b:{name:"mistyrose4", r:139, g:125, b:123, colorGroup:"Grey Shades", _index:"195", C:42, M:42, Y:39, K:22, L:54, A:5, B:3}, _e0eeee:{name:"azure2", r:224, g:238, b:238, colorGroup:"Cyans", _index:"367", C:15, M:1, Y:8, K:0, L:93, A:-5, B:-2}, _c1cdcd:{name:"azure3", r:193, g:205, b:205, colorGroup:"Grey Shades", _index:"286", C:29, M:14, Y:19, K:1, L:81, A:-5, B:-2}, _838b8b:{name:"azure4", r:131, g:139, b:139, colorGroup:"Grey Shades", _index:"152", C:50, M:35, Y:37, K:15, L:57, A:-4, B:-2}, _836fff:{name:"slateblue1", r:131, g:111, b:255, colorGroup:"Purples", _index:"150", C:67, M:60, Y:0, K:0, L:55, A:35, B:-71}, _7a67ee:{name:"slateblue2", r:122, g:103, b:238, colorGroup:"Purples", _index:"136", C:70, M:64, Y:0, K:0, L:51, A:34, B:-67}, _6959cd:{name:"slateblue3", r:105, g:89, b:205, colorGroup:"Purples", _index:"114", C:75, M:70, Y:0, K:0, L:44, A:29, B:-60}, _473c8b:{name:"slateblue4", r:71, g:60, b:139, colorGroup:"Purples", _index:"077", C:87, M:85, Y:5, K:1, L:30, A:21, B:-44}, _4876ff:{name:"royalblue1", r:72, g:118, b:255, colorGroup:"Blues", _index:"080", C:77, M:57, Y:0, K:0, L:52, A:20, B:-75}, _436eee:{name:"royalblue2", r:67, g:110, b:238, colorGroup:"Blues", _index:"071", C:79, M:60, Y:0, K:0, L:49, A:18, B:-71}, _3a5fcd:{name:"royalblue3", r:58, g:95, b:205, colorGroup:"Blues", _index:"063", C:83, M:64, Y:0, K:0, L:43, A:16, B:-62}, _27408b:{name:"royalblue4", r:39, g:64, b:139, colorGroup:"Blues", _index:"051", C:97, M:82, Y:8, K:1, L:29, A:11, B:-46}, _0000ee:{name:"blue2", r:0, g:0, b:238, colorGroup:"Blues", _index:"004", C:94, M:77, Y:0, K:0, L:27, A:64, B:-106}, _00008b:{name:"darkblue", r:0, g:0, b:139, colorGroup:"Blues", _index:"002", C:100, M:92, Y:23, K:9, L:13, A:43, B:-72}, _1c86ee:{name:"dodgerblue2", r:28, g:134, b:238, colorGroup:"Blues", _index:"043", C:77, M:45, Y:0, K:0, L:55, A:0, B:-62}, _1874cd:{name:"dodgerblue3", r:24, g:116, b:205, colorGroup:"Blues", _index:"039", C:83, M:51, Y:0, K:0, L:48, A:0, B:-55}, _104e8b:{name:"dodgerblue4", r:16, g:78, b:139, colorGroup:"Blues", _index:"035", C:97, M:70, Y:17, K:3, L:32, A:-1, B:-40}, _63b8ff:{name:"steelblue1", r:99, g:184, b:255, colorGroup:"Blues", _index:"106", C:57, M:17, Y:0, K:0, L:72, A:-11, B:-44}, _5cacee:{name:"steelblue2", r:92, g:172, b:238, colorGroup:"Blues", _index:"099", C:62, M:21, Y:0, K:0, L:67, A:-11, B:-41}, _4f94cd:{name:"steelblue3", r:79, g:148, b:205, colorGroup:"Blues", _index:"087", C:70, M:32, Y:2, K:0, L:59, A:-10, B:-37}, _36648b:{name:"steelblue4", r:54, g:100, b:139, colorGroup:"Blues", _index:"061", C:83, M:54, Y:26, K:10, L:40, A:-7, B:-27}, _00b2ee:{name:"deepskyblue2", r:0, g:178, b:238, colorGroup:"Blues", _index:"013", C:71, M:9, Y:0, K:0, L:67, A:-23, B:-42}, _009acd:{name:"deepskyblue3", r:0, g:154, b:205, colorGroup:"Blues", _index:"012", C:78, M:22, Y:7, K:0, L:59, A:-21, B:-37}, _00688b:{name:"deepskyblue4", r:0, g:104, b:139, colorGroup:"Blues", _index:"007", C:89, M:47, Y:28, K:12, L:40, A:-16, B:-27}, _87ceff:{name:"skyblue1", r:135, g:206, b:255, colorGroup:"Blues", _index:"158", C:47, M:6, Y:0, K:0, L:79, A:-14, B:-32}, _7ec0ee:{name:"skyblue2", r:126, g:192, b:238, colorGroup:"Blues", _index:"145", C:52, M:11, Y:0, K:0, L:75, A:-13, B:-30}, _6ca6cd:{name:"skyblue3", r:108, g:166, b:205, colorGroup:"Blues", _index:"122", C:60, M:23, Y:9, K:0, L:65, A:-12, B:-27}, _4a708b:{name:"skyblue4", r:74, g:112, b:139, colorGroup:"Blue Shades", _index:"083", C:74, M:46, Y:30, K:13, L:45, A:-9, B:-20}, _b0e2ff:{name:"lightskyblue1", r:176, g:226, b:255, colorGroup:"Blue Shades", _index:"259", C:34, M:0, Y:0, K:0, L:87, A:-12, B:-20}, _a4d3ee:{name:"lightskyblue2", r:164, g:211, b:238, colorGroup:"Blue Shades", _index:"243", C:39, M:5, Y:3, K:0, L:82, A:-12, B:-19}, _8db6cd:{name:"lightskyblue3", r:141, g:182, b:205, colorGroup:"Blue Shades", _index:"209", C:49, M:18, Y:14, K:1, L:72, A:-11, B:-17}, _607b8b:{name:"lightskyblue4", r:96, g:123, b:139, colorGroup:"Blue Shades", _index:"103", C:64, M:40, Y:33, K:16, L:50, A:-8, B:-13}, _c6e2ff:{name:"slategray1", r:198, g:226, b:255, colorGroup:"Blue Shades", _index:"290", C:26, M:5, Y:0, K:0, L:89, A:-5, B:-18}, _b9d3ee:{name:"slategray2", r:185, g:211, b:238, colorGroup:"Blue Shades", _index:"271", C:32, M:10, Y:1, K:0, L:83, A:-5, B:-17}, _9fb6cd:{name:"slategray3", r:159, g:182, b:205, colorGroup:"Blue Shades", _index:"236", C:42, M:22, Y:13, K:1, L:73, A:-5, B:-15}, _6c7b8b:{name:"slategray4", r:108, g:123, b:139, colorGroup:"Blue Shades", _index:"121", C:60, M:42, Y:32, K:15, L:51, A:-3, B:-11}, _cae1ff:{name:"lightsteelblue1", r:202, g:225, b:255, colorGroup:"Blue Shades", _index:"294", C:24, M:7, Y:0, K:0, L:89, A:-4, B:-18}, _bcd2ee:{name:"lightsteelblue2", r:188, g:210, b:238, colorGroup:"Blue Shades", _index:"276", C:30, M:12, Y:0, K:0, L:83, A:-4, B:-17}, _a2b5cd:{name:"lightsteelblue3", r:162, g:181, b:205, colorGroup:"Blue Shades", _index:"240", C:41, M:23, Y:12, K:1, L:73, A:-3, B:-15}, _6e7b8b:{name:"lightsteelblue4", r:110, g:123, b:139, colorGroup:"Blue Shades", _index:"124", C:59, M:42, Y:32, K:15, L:51, A:-3, B:-11}, _bfefff:{name:"lightblue1", r:191, g:239, b:255, colorGroup:"Blue Shades", _index:"283", C:28, M:0, Y:2, K:0, L:91, A:-14, B:-14}, _b2dfee:{name:"lightblue2", r:178, g:223, b:238, colorGroup:"Blue Shades", _index:"262", C:34, M:0, Y:7, K:0, L:86, A:-13, B:-13}, _9ac0cd:{name:"lightblue3", r:154, g:192, b:205, colorGroup:"Blue Shades", _index:"228", C:44, M:14, Y:18, K:0, L:75, A:-11, B:-11}, _68838b:{name:"lightblue4", r:104, g:131, b:139, colorGroup:"Blue Shades", _index:"113", C:61, M:35, Y:36, K:15, L:53, A:-9, B:-8}, _d1eeee:{name:"lightcyan2", r:209, g:238, b:238, colorGroup:"Cyans", _index:"348", C:22, M:0, Y:9, K:0, L:92, A:-10, B:-4}, _b4cdcd:{name:"lightcyan3", r:180, g:205, b:205, colorGroup:"Blue Shades", _index:"266", C:34, M:11, Y:20, K:0, L:81, A:-9, B:-3}, _7a8b8b:{name:"lightcyan4", r:122, g:139, b:139, colorGroup:"Grey Shades", _index:"138", C:54, M:33, Y:38, K:15, L:56, A:-7, B:-3}, _bbffff:{name:"paleturquoise1", r:187, g:255, b:255, colorGroup:"Cyans", _index:"274", C:28, M:0, Y:8, K:0, L:95, A:-22, B:-8}, _aeeeee:{name:"paleturquoise2", r:174, g:238, b:238, colorGroup:"Cyans", _index:"253", C:34, M:0, Y:13, K:0, L:90, A:-21, B:-7}, _96cdcd:{name:"paleturquoise3", r:150, g:205, b:205, colorGroup:"Blue Shades", _index:"221", C:45, M:3, Y:22, K:0, L:79, A:-19, B:-7}, _668b8b:{name:"paleturquoise4", r:102, g:139, b:139, colorGroup:"Blue Shades", _index:"109", C:62, M:31, Y:40, K:12, L:55, A:-14, B:-5}, _98f5ff:{name:"cadetblue1", r:152, g:245, b:255, colorGroup:"Cyans", _index:"223", C:39, M:0, Y:8, K:0, L:91, A:-27, B:-14}, _8ee5ee:{name:"cadetblue2", r:142, g:229, b:238, colorGroup:"Cyans", _index:"211", C:44, M:0, Y:12, K:0, L:86, A:-26, B:-14}, _7ac5cd:{name:"cadetblue3", r:122, g:197, b:205, colorGroup:"Cyans", _index:"139", C:54, M:3, Y:22, K:0, L:75, A:-23, B:-12}, _53868b:{name:"cadetblue4", r:83, g:134, b:139, colorGroup:"Blue Shades", _index:"090", C:68, M:31, Y:39, K:13, L:52, A:-17, B:-9}, _00f5ff:{name:"turquoise1", r:0, g:245, b:255, colorGroup:"Cyans", _index:"024", C:58, M:0, Y:13, K:0, L:88, A:-47, B:-20}, _00e5ee:{name:"turquoise2", r:0, g:229, b:238, colorGroup:"Cyans", _index:"020", C:61, M:0, Y:17, K:0, L:83, A:-45, B:-19}, _00c5cd:{name:"turquoise3", r:0, g:197, b:205, colorGroup:"Cyans", _index:"015", C:69, M:0, Y:25, K:0, L:72, A:-40, B:-17}, _00868b:{name:"turquoise4", r:0, g:134, b:139, colorGroup:"Blue Shades", _index:"008", C:82, M:25, Y:43, K:9, L:50, A:-31, B:-12}, _00eeee:{name:"cyan2", r:0, g:238, b:238, colorGroup:"Cyans", _index:"023", C:60, M:0, Y:19, K:0, L:85, A:-48, B:-15}, _00cdcd:{name:"cyan3", r:0, g:205, b:205, colorGroup:"Cyans", _index:"018", C:67, M:0, Y:28, K:0, L:74, A:-43, B:-13}, _008b8b:{name:"darkcyan", r:0, g:139, b:139, colorGroup:"Blue Shades", _index:"011", C:82, M:23, Y:46, K:6, L:52, A:-33, B:-10}, _97ffff:{name:"darkslategray1", r:151, g:255, b:255, colorGroup:"Cyans", _index:"222", C:38, M:0, Y:11, K:0, L:94, A:-32, B:-10}, _8deeee:{name:"darkslategray2", r:141, g:238, b:238, colorGroup:"Cyans", _index:"210", C:44, M:0, Y:15, K:0, L:88, A:-30, B:-10}, _79cdcd:{name:"darkslategray3", r:121, g:205, b:205, colorGroup:"Blue Shades", _index:"134", C:54, M:0, Y:24, K:0, L:77, A:-27, B:-9}, _528b8b:{name:"darkslategray4", r:82, g:139, b:139, colorGroup:"Blue Shades", _index:"089", C:69, M:28, Y:42, K:10, L:54, A:-20, B:-7}, _76eec6:{name:"aquamarine2", r:118, g:238, b:198, colorGroup:"Greens", _index:"131", C:50, M:0, Y:36, K:0, L:86, A:-43, B:8}, _458b74:{name:"aquamarine4", r:69, g:139, b:116, colorGroup:"Greens", _index:"075", C:74, M:25, Y:59, K:8, L:53, A:-28, B:5}, _c1ffc1:{name:"darkseagreen1", r:193, g:255, b:193, colorGroup:"Greens", _index:"287", C:29, M:0, Y:37, K:0, L:95, A:-29, B:23}, _b4eeb4:{name:"darkseagreen2", r:180, g:238, b:180, colorGroup:"Greens", _index:"267", C:34, M:0, Y:41, K:0, L:89, A:-28, B:21}, _9bcd9b:{name:"darkseagreen3", r:155, g:205, b:155, colorGroup:"Greens", _index:"232", C:45, M:0, Y:49, K:0, L:78, A:-25, B:19}, _698b69:{name:"darkseagreen4", r:105, g:139, b:105, colorGroup:"Greens", _index:"117", C:63, M:29, Y:63, K:12, L:55, A:-18, B:14}, _54ff9f:{name:"seagreen1", r:84, g:255, b:159, colorGroup:"Greens", _index:"093", C:56, M:0, Y:59, K:0, L:90, A:-62, B:32}, _4eee94:{name:"seagreen2", r:78, g:238, b:148, colorGroup:"Greens", _index:"085", C:58, M:0, Y:60, K:0, L:84, A:-58, B:30}, _43cd80:{name:"seagreen3", r:67, g:205, b:128, colorGroup:"Greens", _index:"072", C:65, M:0, Y:64, K:0, L:74, A:-52, B:27}, _9aff9a:{name:"palegreen1", r:154, g:255, b:154, colorGroup:"Greens", _index:"230", C:42, M:0, Y:58, K:0, L:92, A:-46, B:38}, _90ee90:{name:"lightgreen", r:144, g:238, b:144, colorGroup:"Greens", _index:"214", C:46, M:0, Y:59, K:0, L:87, A:-43, B:36}, _7ccd7c:{name:"palegreen3", r:124, g:205, b:124, colorGroup:"Greens", _index:"141", C:55, M:0, Y:64, K:0, L:76, A:-39, B:32}, _548b54:{name:"palegreen4", r:84, g:139, b:84, colorGroup:"Greens", _index:"092", C:71, M:25, Y:78, K:8, L:53, A:-28, B:23}, _00ee76:{name:"springgreen2", r:0, g:238, b:118, colorGroup:"Greens", _index:"022", C:65, M:0, Y:75, K:0, L:83, A:-69, B:43}, _00cd66:{name:"springgreen3", r:0, g:205, b:102, colorGroup:"Greens", _index:"017", C:71, M:0, Y:76, K:0, L:73, A:-62, B:38}, _008b45:{name:"springgreen4", r:0, g:139, b:69, colorGroup:"Greens", _index:"010", C:85, M:19, Y:92, K:4, L:51, A:-46, B:27}, _00ee00:{name:"green2", r:0, g:238, b:0, colorGroup:"Greens", _index:"021", C:67, M:0, Y:100, K:0, L:83, A:-75, B:76}, _00cd00:{name:"green3", r:0, g:205, b:0, colorGroup:"Greens", _index:"016", C:71, M:0, Y:100, K:0, L:72, A:-67, B:68}, _008b00:{name:"green4", r:0, g:139, b:0, colorGroup:"Greens", _index:"009", C:85, M:16, Y:100, K:5, L:50, A:-51, B:51}, _76ee00:{name:"chartreuse2", r:118, g:238, b:0, colorGroup:"Greens", _index:"130", C:56, M:0, Y:100, K:0, L:85, A:-59, B:79}, _66cd00:{name:"chartreuse3", r:102, g:205, b:0, colorGroup:"Greens", _index:"110", C:62, M:0, Y:100, K:0, L:74, A:-52, B:70}, _458b00:{name:"chartreuse4", r:69, g:139, b:0, colorGroup:"Greens", _index:"074", C:76, M:21, Y:100, K:7, L:52, A:-39, B:53}, _c0ff3e:{name:"olivedrab1", r:192, g:255, b:62, colorGroup:"Greens", _index:"284", C:34, M:0, Y:95, K:0, L:93, A:-40, B:77}, _b3ee3a:{name:"olivedrab2", r:179, g:238, b:58, colorGroup:"Greens", _index:"264", C:39, M:0, Y:90, K:0, L:88, A:-38, B:73}, _698b22:{name:"olivedrab4", r:105, g:139, b:34, colorGroup:"Greens", _index:"116", C:64, M:26, Y:100, K:10, L:54, A:-24, B:48}, _caff70:{name:"darkolivegreen1", r:202, g:255, b:112, colorGroup:"Greens", _index:"295", C:28, M:0, Y:72, K:0, L:94, A:-34, B:60}, _bcee68:{name:"darkolivegreen2", r:188, g:238, b:104, colorGroup:"Greens", _index:"277", C:34, M:0, Y:72, K:0, L:89, A:-32, B:57}, _a2cd5a:{name:"darkolivegreen3", r:162, g:205, b:90, colorGroup:"Greens", _index:"241", C:45, M:0, Y:77, K:0, L:78, A:-28, B:51}, _6e8b3d:{name:"darkolivegreen4", r:110, g:139, b:61, colorGroup:"Greens", _index:"125", C:62, M:27, Y:90, K:11, L:54, A:-21, B:37}, _fff68f:{name:"khaki1", r:255, g:246, b:143, colorGroup:"Yellows", _index:"493", C:4, M:0, Y:54, K:0, L:96, A:-8, B:50}, _eee685:{name:"khaki2", r:238, g:230, b:133, colorGroup:"Yellows", _index:"417", C:11, M:3, Y:59, K:0, L:90, A:-7, B:47}, _cdc673:{name:"khaki3", r:205, g:198, b:115, colorGroup:"Greens", _index:"337", C:25, M:14, Y:64, K:2, L:79, A:-7, B:42}, _8b864e:{name:"khaki4", r:139, g:134, b:78, colorGroup:"Browns", _index:"200", C:45, M:34, Y:74, K:19, L:55, A:-5, B:30}, _ffec8b:{name:"lightgoldenrod1", r:255, g:236, b:139, colorGroup:"Yellows", _index:"488", C:2, M:4, Y:56, K:0, L:93, A:-3, B:49}, _eedc82:{name:"lightgoldenrod2", r:238, g:220, b:130, colorGroup:"Yellows", _index:"412", C:10, M:10, Y:59, K:0, L:88, A:-3, B:46}, _cdbe70:{name:"lightgoldenrod3", r:205, g:190, b:112, colorGroup:"Greens", _index:"333", C:23, M:19, Y:64, K:3, L:77, A:-3, B:41}, _8b814c:{name:"lightgoldenrod4", r:139, g:129, b:76, colorGroup:"Browns", _index:"197", C:43, M:36, Y:74, K:22, L:54, A:-2, B:29}, _eeeed1:{name:"lightyellow2", r:238, g:238, b:209, colorGroup:"Pastels", _index:"423", C:9, M:3, Y:23, K:0, L:94, A:-4, B:14}, _cdcdb4:{name:"lightyellow3", r:205, g:205, b:180, colorGroup:"Browns", _index:"342", C:24, M:15, Y:32, K:1, L:82, A:-4, B:12}, _8b8b7a:{name:"lightyellow4", r:139, g:139, b:122, colorGroup:"Browns", _index:"206", C:45, M:34, Y:48, K:18, L:57, A:-3, B:9}, _eeee00:{name:"yellow2", r:238, g:238, b:0, colorGroup:"Yellows", _index:"422", C:15, M:0, Y:89, K:0, L:92, A:-15, B:88}, _cdcd00:{name:"yellow3", r:205, g:205, b:0, colorGroup:"Yellows", _index:"341", C:27, M:7, Y:98, K:0, L:80, A:-14, B:78}, _8b8b00:{name:"yellow4", r:139, g:139, b:0, colorGroup:"Greens", _index:"205", C:48, M:30, Y:100, K:15, L:56, A:-10, B:59}, _eec900:{name:"gold2", r:238, g:201, b:0, colorGroup:"Yellows", _index:"405", C:9, M:18, Y:95, K:0, L:82, A:2, B:81}, _cdad00:{name:"gold3", r:205, g:173, b:0, colorGroup:"Yellows", _index:"326", C:20, M:26, Y:99, K:6, L:72, A:2, B:73}, _8b7500:{name:"gold4", r:139, g:117, b:0, colorGroup:"Browns", _index:"190", C:39, M:40, Y:100, K:27, L:50, A:1, B:55}, _ffc125:{name:"goldenrod1", r:255, g:193, b:37, colorGroup:"Oranges", _index:"476", C:0, M:27, Y:88, K:0, L:82, A:13, B:77}, _eeb422:{name:"goldenrod2", r:238, g:180, b:34, colorGroup:"Oranges", _index:"402", C:7, M:31, Y:91, K:0, L:77, A:13, B:73}, _cd9b1d:{name:"goldenrod3", r:205, g:155, b:29, colorGroup:"Yellows", _index:"323", C:18, M:37, Y:95, K:7, L:67, A:11, B:65}, _8b6914:{name:"goldenrod4", r:139, g:105, b:20, colorGroup:"Browns", _index:"187", C:34, M:47, Y:100, K:32, L:47, A:8, B:48}, _ffb90f:{name:"darkgoldenrod1", r:255, g:185, b:15, colorGroup:"Oranges", _index:"473", C:0, M:32, Y:92, K:0, L:80, A:17, B:80}, _eead0e:{name:"darkgoldenrod2", r:238, g:173, b:14, colorGroup:"Oranges", _index:"400", C:6, M:35, Y:95, K:0, L:75, A:16, B:76}, _cd950c:{name:"darkgoldenrod3", r:205, g:149, b:12, colorGroup:"Oranges", _index:"321", C:18, M:40, Y:99, K:7, L:66, A:14, B:67}, _8b6508:{name:"darkgoldenrod4", r:139, g:101, b:8, colorGroup:"Browns", _index:"185", C:33, M:50, Y:100, K:33, L:46, A:10, B:50}, _ffc1c1:{name:"rosybrown1", r:255, g:193, b:193, colorGroup:"Pinks", _index:"477", C:0, M:34, Y:17, K:0, L:84, A:22, B:9}, _eeb4b4:{name:"rosybrown2", r:238, g:180, b:180, colorGroup:"Pinks", _index:"403", C:5, M:38, Y:22, K:0, L:79, A:21, B:8}, _cd9b9b:{name:"rosybrown3", r:205, g:155, b:155, colorGroup:"Pinks", _index:"324", C:19, M:43, Y:31, K:5, L:69, A:19, B:7}, _8b6969:{name:"rosybrown4", r:139, g:105, b:105, colorGroup:"Pinks", _index:"188", C:37, M:53, Y:42, K:29, L:48, A:13, B:5}, _ff6a6a:{name:"indianred1", r:255, g:106, b:106, colorGroup:"Reds", _index:"456", C:0, M:71, Y:48, K:0, L:65, A:57, B:30}, _ee6363:{name:"indianred2", r:238, g:99, b:99, colorGroup:"Reds", _index:"385", C:0, M:73, Y:52, K:0, L:61, A:54, B:28}, _cd5555:{name:"indianred3", r:205, g:85, b:85, colorGroup:"Reds", _index:"306", C:15, M:77, Y:59, K:4, L:53, A:48, B:25}, _8b3a3a:{name:"indianred4", r:139, g:58, b:58, colorGroup:"Reds", _index:"171", C:30, M:81, Y:65, K:33, L:36, A:35, B:18}, _ff8247:{name:"sienna1", r:255, g:130, b:71, colorGroup:"Oranges", _index:"462", C:0, M:60, Y:72, K:0, L:68, A:45, B:53}, _ee7942:{name:"sienna2", r:238, g:121, b:66, colorGroup:"Oranges", _index:"390", C:0, M:63, Y:77, K:0, L:64, A:43, B:50}, _cd6839:{name:"sienna3", r:205, g:104, b:57, colorGroup:"Oranges", _index:"312", C:16, M:67, Y:82, K:4, L:56, A:38, B:44}, _8b4726:{name:"sienna4", r:139, g:71, b:38, colorGroup:"Browns", _index:"176", C:31, M:72, Y:86, K:33, L:39, A:27, B:32}, _ffd39b:{name:"burlywood1", r:255, g:211, b:155, colorGroup:"Browns", _index:"478", C:0, M:21, Y:44, K:0, L:87, A:10, B:33}, _eec591:{name:"burlywood2", r:238, g:197, b:145, colorGroup:"Browns", _index:"404", C:7, M:25, Y:48, K:0, L:82, A:9, B:31}, _cdaa7d:{name:"burlywood3", r:205, g:170, b:125, colorGroup:"Browns", _index:"325", C:19, M:32, Y:53, K:6, L:72, A:8, B:28}, _8b7355:{name:"burlywood4", r:139, g:115, b:85, colorGroup:"Browns", _index:"189", C:37, M:44, Y:62, K:30, L:50, A:6, B:20}, _ffe7ba:{name:"wheat1", r:255, g:231, b:186, colorGroup:"Browns", _index:"486", C:0, M:10, Y:33, K:0, L:93, A:3, B:25}, _eed8ae:{name:"wheat2", r:238, g:216, b:174, colorGroup:"Browns", _index:"411", C:8, M:15, Y:37, K:0, L:87, A:3, B:23}, _cdba96:{name:"wheat3", r:205, g:186, b:150, colorGroup:"Browns", _index:"332", C:21, M:24, Y:43, K:5, L:76, A:2, B:20}, _8b7e66:{name:"wheat4", r:139, g:126, b:102, colorGroup:"Browns", _index:"196", C:41, M:39, Y:55, K:25, L:53, A:2, B:14}, _ffa54f:{name:"tan1", r:255, g:165, b:79, colorGroup:"Oranges", _index:"469", C:0, M:44, Y:72, K:0, L:76, A:28, B:57}, _ee9a49:{name:"tan2", r:238, g:154, b:73, colorGroup:"Oranges", _index:"397", C:3, M:47, Y:76, K:0, L:71, A:27, B:54}, _8b5a2b:{name:"tan4", r:139, g:90, b:43, colorGroup:"Browns", _index:"182", C:32, M:59, Y:85, K:34, L:43, A:17, B:34}, _ff7f24:{name:"chocolate1", r:255, g:127, b:36, colorGroup:"Oranges", _index:"460", C:0, M:60, Y:87, K:0, L:68, A:46, B:67}, _ee7621:{name:"chocolate2", r:238, g:118, b:33, colorGroup:"Oranges", _index:"389", C:0, M:63, Y:92, K:0, L:63, A:43, B:63}, _cd661d:{name:"chocolate3", r:205, g:102, b:29, colorGroup:"Oranges", _index:"311", C:16, M:68, Y:96, K:4, L:55, A:38, B:56}, _ff3030:{name:"firebrick1", r:255, g:48, b:48, colorGroup:"Reds", _index:"449", C:0, M:88, Y:75, K:0, L:57, A:74, B:53}, _ee2c2c:{name:"firebrick2", r:238, g:44, b:44, colorGroup:"Reds", _index:"379", C:0, M:91, Y:81, K:0, L:53, A:71, B:50}, _cd2626:{name:"firebrick3", r:205, g:38, b:38, colorGroup:"Reds", _index:"300", C:13, M:95, Y:89, K:3, L:46, A:63, B:44}, _8b1a1a:{name:"firebrick4", r:139, g:26, b:26, colorGroup:"Reds", _index:"165", C:28, M:99, Y:92, K:33, L:31, A:46, B:31}, _ff4040:{name:"brown1", r:255, g:64, b:64, colorGroup:"Reds", _index:"452", C:0, M:84, Y:68, K:0, L:58, A:71, B:46}, _ee3b3b:{name:"brown2", r:238, g:59, b:59, colorGroup:"Reds", _index:"382", C:0, M:87, Y:73, K:0, L:54, A:67, B:44}, _cd3333:{name:"brown3", r:205, g:51, b:51, colorGroup:"Reds", _index:"303", C:13, M:91, Y:80, K:3, L:47, A:59, B:38}, _8b2323:{name:"brown4", r:139, g:35, b:35, colorGroup:"Reds", _index:"168", C:28, M:95, Y:82, K:33, L:32, A:43, B:27}, _ff8c69:{name:"salmon1", r:255, g:140, b:105, colorGroup:"Reds", _index:"466", C:0, M:57, Y:56, K:0, L:71, A:42, B:38}, _ee8262:{name:"salmon2", r:238, g:130, b:98, colorGroup:"Reds", _index:"393", C:1, M:60, Y:60, K:0, L:66, A:40, B:36}, _cd7054:{name:"salmon3", r:205, g:112, b:84, colorGroup:"Oranges", _index:"315", C:17, M:64, Y:66, K:5, L:58, A:35, B:32}, _8b4c39:{name:"salmon4", r:139, g:76, b:57, colorGroup:"Browns", _index:"179", C:31, M:69, Y:71, K:33, L:40, A:25, B:23}, _ee9572:{name:"lightsalmon2", r:238, g:149, b:114, colorGroup:"Reds", _index:"395", C:3, M:51, Y:55, K:0, L:71, A:31, B:33}, _cd8162:{name:"lightsalmon3", r:205, g:129, b:98, colorGroup:"Oranges", _index:"316", C:17, M:55, Y:61, K:5, L:62, A:27, B:29}, _8b5742:{name:"lightsalmon4", r:139, g:87, b:66, colorGroup:"Browns", _index:"180", C:32, M:62, Y:67, K:34, L:43, A:20, B:21}, _ee9a00:{name:"orange2", r:238, g:154, b:0, colorGroup:"Oranges", _index:"396", C:4, M:45, Y:98, K:0, L:71, A:25, B:74}, _cd8500:{name:"orange3", r:205, g:133, b:0, colorGroup:"Oranges", _index:"317", C:17, M:50, Y:100, K:6, L:62, A:22, B:67}, _8b5a00:{name:"orange4", r:139, g:90, b:0, colorGroup:"Browns", _index:"181", C:31, M:57, Y:100, K:34, L:43, A:16, B:50}, _ff7f00:{name:"darkorange1", r:255, g:127, b:0, colorGroup:"Oranges", _index:"459", C:0, M:60, Y:94, K:0, L:68, A:45, B:74}, _ee7600:{name:"darkorange2", r:238, g:118, b:0, colorGroup:"Oranges", _index:"388", C:0, M:63, Y:99, K:0, L:63, A:43, B:70}, _cd6600:{name:"darkorange3", r:205, g:102, b:0, colorGroup:"Oranges", _index:"310", C:15, M:67, Y:100, K:5, L:55, A:38, B:63}, _8b4500:{name:"darkorange4", r:139, g:69, b:0, colorGroup:"Browns", _index:"174", C:30, M:72, Y:100, K:34, L:38, A:27, B:47}, _ff7256:{name:"coral1", r:255, g:114, b:86, colorGroup:"Reds", _index:"458", C:0, M:67, Y:62, K:0, L:66, A:53, B:42}, _ee6a50:{name:"coral2", r:238, g:106, b:80, colorGroup:"Reds", _index:"386", C:0, M:70, Y:67, K:0, L:62, A:50, B:40}, _cd5b45:{name:"coral3", r:205, g:91, b:69, colorGroup:"Reds", _index:"307", C:15, M:74, Y:72, K:4, L:53, A:44, B:35}, _8b3e2f:{name:"coral4", r:139, g:62, b:47, colorGroup:"Browns", _index:"173", C:30, M:78, Y:76, K:33, L:37, A:32, B:25}, _ee5c42:{name:"tomato2", r:238, g:92, b:66, colorGroup:"Reds", _index:"384", C:0, M:75, Y:73, K:0, L:59, A:56, B:45}, _cd4f39:{name:"tomato3", r:205, g:79, b:57, colorGroup:"Reds", _index:"305", C:14, M:79, Y:79, K:4, L:51, A:49, B:39}, _8b3626:{name:"tomato4", r:139, g:54, b:38, colorGroup:"Browns", _index:"170", C:30, M:83, Y:83, K:33, L:35, A:36, B:29}, _ee4000:{name:"orangered2", r:238, g:64, b:0, colorGroup:"Reds", _index:"383", C:0, M:84, Y:100, K:0, L:55, A:65, B:67}, _cd3700:{name:"orangered3", r:205, g:55, b:0, colorGroup:"Reds", _index:"304", C:13, M:88, Y:100, K:4, L:47, A:57, B:59}, _8b2500:{name:"orangered4", r:139, g:37, b:0, colorGroup:"Reds", _index:"169", C:28, M:93, Y:100, K:33, L:32, A:42, B:44}, _ee0000:{name:"red2", r:238, g:0, b:0, colorGroup:"Reds", _index:"376", C:0, M:98, Y:99, K:0, L:51, A:76, B:66}, _cd0000:{name:"red3", r:205, g:0, b:0, colorGroup:"Reds", _index:"297", C:11, M:100, Y:100, K:4, L:44, A:68, B:59}, _8b0000:{name:"darkred", r:139, g:0, b:0, colorGroup:"Reds", _index:"162", C:27, M:100, Y:100, K:34, L:29, A:51, B:42}, _ee1289:{name:"deeppink2", r:238, g:18, b:137, colorGroup:"Magentas", _index:"378", C:0, M:93, Y:0, K:0, L:53, A:78, B:-4}, _cd1076:{name:"deeppink3", r:205, g:16, b:118, colorGroup:"Magentas", _index:"299", C:16, M:98, Y:12, K:1, L:46, A:70, B:-4}, _8b0a50:{name:"deeppink4", r:139, g:10, b:80, colorGroup:"Purples", _index:"164", C:34, M:100, Y:29, K:29, L:31, A:52, B:-4}, _ff6eb4:{name:"hotpink1", r:255, g:110, b:180, colorGroup:"Magentas", _index:"457", C:0, M:69, Y:0, K:0, L:67, A:60, B:-9}, _ee6aa7:{name:"hotpink2", r:238, g:106, b:167, colorGroup:"Magentas", _index:"387", C:1, M:71, Y:0, K:0, L:63, A:56, B:-7}, _cd6090:{name:"hotpink3", r:205, g:96, b:144, colorGroup:"Pinks", _index:"309", C:18, M:74, Y:15, K:1, L:56, A:47, B:-5}, _8b3a62:{name:"hotpink4", r:139, g:58, b:98, colorGroup:"Purples", _index:"172", C:41, M:84, Y:31, K:21, L:37, A:38, B:-6}, _ffb5c5:{name:"pink1", r:255, g:181, b:197, colorGroup:"Pinks", _index:"471", C:0, M:40, Y:10, K:0, L:81, A:29, B:3}, _eea9b8:{name:"pink2", r:238, g:169, b:184, colorGroup:"Pinks", _index:"399", C:4, M:44, Y:15, K:0, L:76, A:27, B:2}, _cd919e:{name:"pink3", r:205, g:145, b:158, colorGroup:"Pinks", _index:"320", C:19, M:49, Y:25, K:3, L:66, A:24, B:2}, _8b636c:{name:"pink4", r:139, g:99, b:108, colorGroup:"Purples", _index:"184", C:39, M:59, Y:38, K:26, L:46, A:17, B:1}, _ffaeb9:{name:"lightpink1", r:255, g:174, b:185, colorGroup:"Pinks", _index:"470", C:0, M:43, Y:15, K:0, L:79, A:31, B:7}, _eea2ad:{name:"lightpink2", r:238, g:162, b:173, colorGroup:"Pinks", _index:"398", C:3, M:47, Y:20, K:0, L:74, A:29, B:6}, _cd8c95:{name:"lightpink3", r:205, g:140, b:149, colorGroup:"Pinks", _index:"319", C:18, M:52, Y:29, K:4, L:65, A:26, B:5}, _8b5f65:{name:"lightpink4", r:139, g:95, b:101, colorGroup:"Purples", _index:"183", C:36, M:59, Y:41, K:29, L:45, A:19, B:4}, _ff82ab:{name:"palevioletred1", r:255, g:130, b:171, colorGroup:"Pinks", _index:"463", C:0, M:62, Y:7, K:0, L:70, A:51, B:1}, _ee799f:{name:"palevioletred2", r:238, g:121, b:159, colorGroup:"Pinks", _index:"391", C:0, M:65, Y:13, K:0, L:66, A:48, B:1}, _cd6889:{name:"palevioletred3", r:205, g:104, b:137, colorGroup:"Magentas", _index:"313", C:18, M:70, Y:25, K:3, L:57, A:43, B:1}, _8b475d:{name:"palevioletred4", r:139, g:71, b:93, colorGroup:"Purples", _index:"177", C:36, M:75, Y:38, K:28, L:39, A:31, B:0}, _ff34b3:{name:"maroon1", r:255, g:52, b:179, colorGroup:"Magentas", _index:"450", C:11, M:82, Y:0, K:0, L:59, A:80, B:-19}, _ee30a7:{name:"maroon2", r:238, g:48, b:167, colorGroup:"Magentas", _index:"380", C:14, M:84, Y:0, K:0, L:56, A:76, B:-18}, _cd2990:{name:"maroon3", r:205, g:41, b:144, colorGroup:"Reds", _index:"301", C:21, M:90, Y:0, K:0, L:48, A:67, B:-17}, _8b1c62:{name:"maroon4", r:139, g:28, b:98, colorGroup:"Purples", _index:"166", C:45, M:100, Y:23, K:16, L:33, A:50, B:-13}, _ff3e96:{name:"violetred1", r:255, g:62, b:150, colorGroup:"Magentas", _index:"451", C:0, M:84, Y:0, K:0, L:59, A:75, B:-2}, _ee3a8c:{name:"violetred2", r:238, g:58, b:140, colorGroup:"Magentas", _index:"381", C:0, M:87, Y:3, K:0, L:56, A:71, B:-2}, _cd3278:{name:"violetred3", r:205, g:50, b:120, colorGroup:"Reds", _index:"302", C:16, M:90, Y:18, K:2, L:48, A:63, B:-2}, _8b2252:{name:"violetred4", r:139, g:34, b:82, colorGroup:"Purples", _index:"167", C:34, M:95, Y:33, K:29, L:33, A:46, B:-2}, _ee00ee:{name:"magenta2", r:238, g:0, b:238, colorGroup:"Magentas", _index:"377", C:44, M:80, Y:0, K:0, L:56, A:88, B:-58}, _cd00cd:{name:"magenta3", r:205, g:0, b:205, colorGroup:"Magentas", _index:"298", C:48, M:84, Y:0, K:0, L:49, A:79, B:-52}, _8b008b:{name:"darkmagenta", r:139, g:0, b:139, colorGroup:"Purples", _index:"163", C:60, M:100, Y:0, K:0, L:33, A:59, B:-39}, _ff83fa:{name:"orchid1", r:255, g:131, b:250, colorGroup:"Purples", _index:"464", C:21, M:54, Y:0, K:0, L:72, A:59, B:-39}, _ee7ae9:{name:"orchid2", r:238, g:122, b:233, colorGroup:"Purples", _index:"392", C:25, M:58, Y:0, K:0, L:68, A:56, B:-37}, _cd69c9:{name:"orchid3", r:205, g:105, b:201, colorGroup:"Purples", _index:"314", C:33, M:66, Y:0, K:0, L:59, A:49, B:-33}, _8b4789:{name:"orchid4", r:139, g:71, b:137, colorGroup:"Purples", _index:"178", C:55, M:81, Y:12, K:1, L:41, A:36, B:-25}, _ffbbff:{name:"plum1", r:255, g:187, b:255, colorGroup:"Purples", _index:"474", C:10, M:33, Y:0, K:0, L:84, A:33, B:-24}, _eeaeee:{name:"plum2", r:238, g:174, b:238, colorGroup:"Purples", _index:"401", C:14, M:39, Y:0, K:0, L:79, A:31, B:-23}, _cd96cd:{name:"plum3", r:205, g:150, b:205, colorGroup:"Purples", _index:"322", C:23, M:49, Y:0, K:0, L:69, A:27, B:-20}, _8b668b:{name:"plum4", r:139, g:102, b:139, colorGroup:"Purples", _index:"186", C:51, M:63, Y:24, K:6, L:48, A:20, B:-15}, _e066ff:{name:"mediumorchid1", r:224, g:102, b:255, colorGroup:"Purples", _index:"364", C:40, M:62, Y:0, K:0, L:63, A:63, B:-56}, _d15fee:{name:"mediumorchid2", r:209, g:95, b:238, colorGroup:"Purples", _index:"346", C:44, M:66, Y:0, K:0, L:59, A:60, B:-53}, _b452cd:{name:"mediumorchid3", r:180, g:82, b:205, colorGroup:"Purples", _index:"265", C:51, M:73, Y:0, K:0, L:52, A:53, B:-47}, _7a378b:{name:"mediumorchid4", r:122, g:55, b:139, colorGroup:"Purples", _index:"135", C:64, M:89, Y:1, K:0, L:35, A:39, B:-35}, _bf3eff:{name:"darkorchid1", r:191, g:62, b:255, colorGroup:"Purples", _index:"281", C:60, M:75, Y:0, K:0, L:53, A:71, B:-73}, _b23aee:{name:"darkorchid2", r:178, g:58, b:238, colorGroup:"Purples", _index:"261", C:63, M:78, Y:0, K:0, L:50, A:67, B:-69}, _9a32cd:{name:"darkorchid3", r:154, g:50, b:205, colorGroup:"Purples", _index:"227", C:66, M:82, Y:0, K:0, L:43, A:60, B:-61}, _68228b:{name:"darkorchid4", r:104, g:34, b:139, colorGroup:"Purples", _index:"112", C:75, M:98, Y:0, K:0, L:29, A:43, B:-45}, _9b30ff:{name:"purple1", r:155, g:48, b:255, colorGroup:"Purples", _index:"231", C:73, M:78, Y:0, K:0, L:46, A:69, B:-84}, _912cee:{name:"purple2", r:145, g:44, b:238, colorGroup:"Purples", _index:"215", C:73, M:80, Y:0, K:0, L:43, A:65, B:-80}, _7d26cd:{name:"purple3", r:125, g:38, b:205, colorGroup:"Purples", _index:"143", C:75, M:83, Y:0, K:0, L:37, A:58, B:-71}, _551a8b:{name:"purple4", r:85, g:26, b:139, colorGroup:"Purples", _index:"094", C:85, M:100, Y:0, K:0, L:25, A:42, B:-52}, _ab82ff:{name:"mediumpurple1", r:171, g:130, b:255, colorGroup:"Purples", _index:"248", C:51, M:52, Y:0, K:0, L:63, A:35, B:-58}, _9f79ee:{name:"mediumpurple2", r:159, g:121, b:238, colorGroup:"Purples", _index:"235", C:55, M:56, Y:0, K:0, L:59, A:33, B:-55}, _8968cd:{name:"mediumpurple3", r:137, g:104, b:205, colorGroup:"Purples", _index:"159", C:61, M:64, Y:0, K:0, L:51, A:30, B:-49}, _5d478b:{name:"mediumpurple4", r:93, g:71, b:139, colorGroup:"Purples", _index:"100", C:76, M:79, Y:12, K:1, L:35, A:21, B:-35}, _ffe1ff:{name:"thistle1", r:255, g:225, b:255, colorGroup:"Purples", _index:"482", C:2, M:16, Y:0, K:0, L:93, A:14, B:-11}, _eed2ee:{name:"thistle2", r:238, g:210, b:238, colorGroup:"Purples", _index:"408", C:7, M:23, Y:0, K:0, L:87, A:13, B:-11}, _cdb5cd:{name:"thistle3", r:205, g:181, b:205, colorGroup:"Purples", _index:"329", C:22, M:32, Y:9, K:0, L:76, A:11, B:-9}, _8b7b8b:{name:"thistle4", r:139, g:123, b:139, colorGroup:"Pinks", _index:"193", C:47, M:48, Y:30, K:13, L:53, A:8, B:-7}, _030303:{name:"gray1", r:3, g:3, b:3, colorGroup:"Blacks And Darks Grays", _index:"029", C:89, M:77, Y:62, K:96, L:1, A:0, B:0}, _050505:{name:"gray2", r:5, g:5, b:5, colorGroup:"Blacks And Darks Grays", _index:"030", C:87, M:76, Y:62, K:95, L:1, A:0, B:0}, _080808:{name:"gray3", r:8, g:8, b:8, colorGroup:"Blacks And Darks Grays", _index:"031", C:85, M:74, Y:62, K:93, L:2, A:0, B:0}, _0a0a0a:{name:"gray4", r:10, g:10, b:10, colorGroup:"Blacks And Darks Grays", _index:"032", C:84, M:73, Y:62, K:92, L:3, A:0, B:0}, _0d0d0d:{name:"gray5", r:13, g:13, b:13, colorGroup:"Blacks And Darks Grays", _index:"033", C:82, M:72, Y:62, K:91, L:4, A:0, B:0}, _0f0f0f:{name:"gray6", r:15, g:15, b:15, colorGroup:"Blacks And Darks Grays", _index:"034", C:81, M:71, Y:62, K:90, L:4, A:0, B:0}, _121212:{name:"gray7", r:18, g:18, b:18, colorGroup:"Blacks And Darks Grays", _index:"036", C:79, M:70, Y:61, K:88, L:5, A:0, B:0}, _141414:{name:"gray8", r:20, g:20, b:20, colorGroup:"Blacks And Darks Grays", _index:"037", C:78, M:69, Y:61, K:87, L:6, A:0, B:0}, _171717:{name:"gray9", r:23, g:23, b:23, colorGroup:"Blacks And Darks Grays", _index:"038", C:77, M:68, Y:61, K:85, L:8, A:0, B:0}, _1a1a1a:{name:"gray10", r:26, g:26, b:26, colorGroup:"Blacks And Darks Grays", _index:"041", C:76, M:67, Y:61, K:83, L:9, A:0, B:0}, _1c1c1c:{name:"gray11", r:28, g:28, b:28, colorGroup:"Blacks And Darks Grays", _index:"042", C:75, M:66, Y:60, K:81, L:10, A:0, B:0}, _1f1f1f:{name:"gray12", r:31, g:31, b:31, colorGroup:"Blacks And Darks Grays", _index:"045", C:75, M:65, Y:60, K:80, L:12, A:0, B:0}, _212121:{name:"gray13", r:33, g:33, b:33, colorGroup:"Blacks And Darks Grays", _index:"047", C:74, M:65, Y:60, K:79, L:13, A:0, B:0}, _242424:{name:"gray14", r:36, g:36, b:36, colorGroup:"Blacks And Darks Grays", _index:"049", C:73, M:64, Y:59, K:76, L:14, A:0, B:0}, _262626:{name:"gray15", r:38, g:38, b:38, colorGroup:"Blacks And Darks Grays", _index:"050", C:73, M:63, Y:59, K:75, L:15, A:0, B:0}, _292929:{name:"gray16", r:41, g:41, b:41, colorGroup:"Blacks And Darks Grays", _index:"052", C:72, M:62, Y:58, K:73, L:17, A:0, B:0}, _2b2b2b:{name:"gray17", r:43, g:43, b:43, colorGroup:"Blacks And Darks Grays", _index:"053", C:71, M:62, Y:58, K:71, L:18, A:0, B:0}, _2e2e2e:{name:"gray18", r:46, g:46, b:46, colorGroup:"Blacks And Darks Grays", _index:"054", C:70, M:61, Y:57, K:69, L:19, A:0, B:0}, _303030:{name:"gray19", r:48, g:48, b:48, colorGroup:"Blacks And Darks Grays", _index:"057", C:70, M:60, Y:56, K:67, L:20, A:0, B:0}, _333333:{name:"gray20", r:51, g:51, b:51, colorGroup:"Blacks And Darks Grays", _index:"059", C:69, M:60, Y:56, K:66, L:21, A:0, B:0}, _363636:{name:"gray21", r:54, g:54, b:54, colorGroup:"Blacks And Darks Grays", _index:"060", C:68, M:59, Y:56, K:64, L:23, A:0, B:0}, _383838:{name:"gray22", r:56, g:56, b:56, colorGroup:"Blacks And Darks Grays", _index:"062", C:68, M:58, Y:55, K:63, L:24, A:0, B:0}, _3b3b3b:{name:"gray23", r:59, g:59, b:59, colorGroup:"Blacks And Darks Grays", _index:"064", C:67, M:57, Y:54, K:60, L:25, A:0, B:0}, _3d3d3d:{name:"gray24", r:61, g:61, b:61, colorGroup:"Blacks And Darks Grays", _index:"066", C:67, M:57, Y:54, K:59, L:26, A:0, B:0}, _404040:{name:"gray25", r:64, g:64, b:64, colorGroup:"Blacks And Darks Grays", _index:"067", C:66, M:56, Y:53, K:57, L:27, A:0, B:0}, _424242:{name:"gray26", r:66, g:66, b:66, colorGroup:"Blacks And Darks Grays", _index:"070", C:65, M:55, Y:53, K:55, L:28, A:0, B:0}, _454545:{name:"gray27", r:69, g:69, b:69, colorGroup:"Blacks And Darks Grays", _index:"073", C:64, M:55, Y:52, K:53, L:29, A:0, B:0}, _474747:{name:"gray28", r:71, g:71, b:71, colorGroup:"Blacks And Darks Grays", _index:"078", C:64, M:54, Y:52, K:52, L:30, A:0, B:0}, _4a4a4a:{name:"gray29", r:74, g:74, b:74, colorGroup:"Blacks And Darks Grays", _index:"082", C:63, M:53, Y:51, K:50, L:31, A:0, B:0}, _4d4d4d:{name:"gray30", r:77, g:77, b:77, colorGroup:"Blacks And Darks Grays", _index:"084", C:62, M:52, Y:50, K:48, L:33, A:0, B:0}, _4f4f4f:{name:"gray31", r:79, g:79, b:79, colorGroup:"Medium Grays", _index:"086", C:62, M:52, Y:50, K:47, L:34, A:0, B:0}, _525252:{name:"gray32", r:82, g:82, b:82, colorGroup:"Medium Grays", _index:"088", C:61, M:51, Y:49, K:45, L:35, A:0, B:0}, _545454:{name:"gray33", r:84, g:84, b:84, colorGroup:"Medium Grays", _index:"091", C:60, M:50, Y:49, K:43, L:36, A:0, B:0}, _575757:{name:"gray34", r:87, g:87, b:87, colorGroup:"Medium Grays", _index:"096", C:60, M:50, Y:48, K:41, L:37, A:0, B:0}, _595959:{name:"gray35", r:89, g:89, b:89, colorGroup:"Medium Grays", _index:"097", C:59, M:49, Y:48, K:40, L:38, A:0, B:0}, _5c5c5c:{name:"gray36", r:92, g:92, b:92, colorGroup:"Medium Grays", _index:"098", C:58, M:48, Y:47, K:38, L:39, A:0, B:0}, _5e5e5e:{name:"gray37", r:94, g:94, b:94, colorGroup:"Medium Grays", _index:"101", C:58, M:48, Y:47, K:37, L:40, A:0, B:0}, _616161:{name:"gray38", r:97, g:97, b:97, colorGroup:"Medium Grays", _index:"104", C:57, M:47, Y:46, K:36, L:41, A:0, B:0}, _636363:{name:"gray39", r:99, g:99, b:99, colorGroup:"Medium Grays", _index:"105", C:57, M:46, Y:46, K:34, L:42, A:0, B:0}, _666666:{name:"gray40", r:102, g:102, b:102, colorGroup:"Medium Grays", _index:"108", C:56, M:45, Y:45, K:33, L:43, A:0, B:0}, _6b6b6b:{name:"gray42", r:107, g:107, b:107, colorGroup:"Medium Grays", _index:"119", C:55, M:44, Y:44, K:30, L:45, A:0, B:0}, _6e6e6e:{name:"gray43", r:110, g:110, b:110, colorGroup:"Medium Grays", _index:"123", C:54, M:43, Y:43, K:28, L:46, A:0, B:0}, _707070:{name:"gray44", r:112, g:112, b:112, colorGroup:"Medium Grays", _index:"126", C:53, M:43, Y:42, K:28, L:47, A:0, B:0}, _737373:{name:"gray45", r:115, g:115, b:115, colorGroup:"Medium Grays", _index:"128", C:53, M:42, Y:42, K:26, L:48, A:0, B:0}, _757575:{name:"gray46", r:117, g:117, b:117, colorGroup:"Medium Grays", _index:"129", C:52, M:42, Y:41, K:25, L:49, A:0, B:0}, _787878:{name:"gray47", r:120, g:120, b:120, colorGroup:"Medium Grays", _index:"133", C:51, M:41, Y:41, K:24, L:50, A:0, B:0}, _7a7a7a:{name:"gray48", r:122, g:122, b:122, colorGroup:"Medium Grays", _index:"137", C:51, M:41, Y:40, K:23, L:51, A:0, B:0}, _7d7d7d:{name:"gray49", r:125, g:125, b:125, colorGroup:"Medium Grays", _index:"144", C:50, M:40, Y:39, K:21, L:52, A:0, B:0}, _7f7f7f:{name:"gray50", r:127, g:127, b:127, colorGroup:"Medium Grays", _index:"146", C:50, M:39, Y:39, K:21, L:53, A:0, B:0}, _828282:{name:"gray51", r:130, g:130, b:130, colorGroup:"Medium Grays", _index:"149", C:49, M:38, Y:38, K:19, L:54, A:0, B:0}, _858585:{name:"gray52", r:133, g:133, b:133, colorGroup:"Medium Grays", _index:"154", C:48, M:37, Y:37, K:18, L:56, A:0, B:0}, _878787:{name:"gray53", r:135, g:135, b:135, colorGroup:"Medium Grays", _index:"155", C:47, M:37, Y:37, K:17, L:56, A:0, B:0}, _8a8a8a:{name:"gray54", r:138, g:138, b:138, colorGroup:"Medium Grays", _index:"161", C:46, M:36, Y:36, K:16, L:57, A:0, B:0}, _8c8c8c:{name:"gray55", r:140, g:140, b:140, colorGroup:"Medium Grays", _index:"208", C:46, M:36, Y:36, K:16, L:58, A:0, B:0}, _8f8f8f:{name:"gray56", r:143, g:143, b:143, colorGroup:"Medium Grays", _index:"212", C:45, M:35, Y:35, K:14, L:59, A:0, B:0}, _919191:{name:"gray57", r:145, g:145, b:145, colorGroup:"Medium Grays", _index:"216", C:44, M:35, Y:35, K:14, L:60, A:0, B:0}, _949494:{name:"gray58", r:148, g:148, b:148, colorGroup:"Medium Grays", _index:"219", C:43, M:34, Y:34, K:13, L:61, A:0, B:0}, _969696:{name:"gray59", r:150, g:150, b:150, colorGroup:"Medium Grays", _index:"220", C:42, M:33, Y:33, K:12, L:62, A:0, B:0}, _999999:{name:"gray60", r:153, g:153, b:153, colorGroup:"Medium Grays", _index:"226", C:41, M:32, Y:32, K:11, L:63, A:0, B:0}, _9c9c9c:{name:"gray61", r:156, g:156, b:156, colorGroup:"Medium Grays", _index:"233", C:40, M:31, Y:32, K:10, L:64, A:0, B:0}, _9e9e9e:{name:"gray62", r:158, g:158, b:158, colorGroup:"Medium Grays", _index:"234", C:39, M:31, Y:31, K:10, L:65, A:0, B:0}, _a1a1a1:{name:"gray63", r:161, g:161, b:161, colorGroup:"Light Grays and Whites", _index:"239", C:39, M:30, Y:31, K:9, L:66, A:0, B:0}, _a3a3a3:{name:"gray64", r:163, g:163, b:163, colorGroup:"Light Grays and Whites", _index:"242", C:38, M:30, Y:30, K:8, L:67, A:0, B:0}, _a6a6a6:{name:"gray65", r:166, g:166, b:166, colorGroup:"Light Grays and Whites", _index:"245", C:37, M:29, Y:29, K:8, L:68, A:0, B:0}, _a8a8a8:{name:"gray66", r:168, g:168, b:168, colorGroup:"Light Grays and Whites", _index:"246", C:37, M:28, Y:29, K:7, L:69, A:0, B:0}, _ababab:{name:"gray67", r:171, g:171, b:171, colorGroup:"Light Grays and Whites", _index:"249", C:36, M:27, Y:28, K:6, L:70, A:0, B:0}, _adadad:{name:"gray68", r:173, g:173, b:173, colorGroup:"Light Grays and Whites", _index:"250", C:35, M:26, Y:27, K:6, L:71, A:0, B:0}, _b0b0b0:{name:"gray69", r:176, g:176, b:176, colorGroup:"Light Grays and Whites", _index:"256", C:34, M:25, Y:26, K:5, L:72, A:0, B:0}, _b3b3b3:{name:"gray70", r:179, g:179, b:179, colorGroup:"Light Grays and Whites", _index:"263", C:33, M:24, Y:26, K:4, L:73, A:0, B:0}, _b5b5b5:{name:"gray71", r:181, g:181, b:181, colorGroup:"Light Grays and Whites", _index:"268", C:32, M:24, Y:25, K:4, L:74, A:0, B:0}, _b8b8b8:{name:"gray72", r:184, g:184, b:184, colorGroup:"Light Grays and Whites", _index:"270", C:31, M:23, Y:24, K:4, L:75, A:0, B:0}, _bababa:{name:"gray73", r:186, g:186, b:186, colorGroup:"Light Grays and Whites", _index:"273", C:30, M:23, Y:24, K:3, L:76, A:0, B:0}, _bdbdbd:{name:"gray74", r:189, g:189, b:189, colorGroup:"Light Grays and Whites", _index:"279", C:29, M:22, Y:23, K:3, L:77, A:0, B:0}, _bfbfbf:{name:"gray75", r:191, g:191, b:191, colorGroup:"Light Grays and Whites", _index:"282", C:28, M:21, Y:22, K:3, L:77, A:0, B:0}, _c2c2c2:{name:"gray76", r:194, g:194, b:194, colorGroup:"Light Grays and Whites", _index:"288", C:27, M:20, Y:21, K:2, L:78, A:0, B:0}, _c4c4c4:{name:"gray77", r:196, g:196, b:196, colorGroup:"Light Grays and Whites", _index:"289", C:26, M:19, Y:20, K:2, L:79, A:0, B:0}, _c7c7c7:{name:"gray78", r:199, g:199, b:199, colorGroup:"Light Grays and Whites", _index:"292", C:25, M:18, Y:19, K:1, L:80, A:0, B:0}, _c9c9c9:{name:"gray79", r:201, g:201, b:201, colorGroup:"Light Grays and Whites", _index:"293", C:24, M:18, Y:19, K:1, L:81, A:0, B:0}, _cccccc:{name:"gray80", r:204, g:204, b:204, colorGroup:"Light Grays and Whites", _index:"296", C:23, M:17, Y:18, K:1, L:82, A:0, B:0}, _cfcfcf:{name:"gray81", r:207, g:207, b:207, colorGroup:"Light Grays and Whites", _index:"344", C:22, M:16, Y:17, K:1, L:83, A:0, B:0}, _d1d1d1:{name:"gray82", r:209, g:209, b:209, colorGroup:"Light Grays and Whites", _index:"347", C:21, M:15, Y:16, K:1, L:84, A:0, B:0}, _d4d4d4:{name:"gray83", r:212, g:212, b:212, colorGroup:"Light Grays and Whites", _index:"352", C:20, M:14, Y:15, K:0, L:85, A:0, B:0}, _d6d6d6:{name:"gray84", r:214, g:214, b:214, colorGroup:"Light Grays and Whites", _index:"353", C:19, M:13, Y:14, K:0, L:86, A:0, B:0}, _d9d9d9:{name:"gray85", r:217, g:217, b:217, colorGroup:"Light Grays and Whites", _index:"355", C:18, M:12, Y:14, K:0, L:87, A:0, B:0}, _dbdbdb:{name:"gray86", r:219, g:219, b:219, colorGroup:"Light Grays and Whites", _index:"359", C:17, M:12, Y:13, K:0, L:87, A:0, B:0}, _dedede:{name:"gray87", r:222, g:222, b:222, colorGroup:"Light Grays and Whites", _index:"363", C:16, M:11, Y:12, K:0, L:88, A:0, B:0}, _e0e0e0:{name:"gray88", r:224, g:224, b:224, colorGroup:"Light Grays and Whites", _index:"365", C:15, M:10, Y:12, K:0, L:89, A:0, B:0}, _e3e3e3:{name:"gray89", r:227, g:227, b:227, colorGroup:"Light Grays and Whites", _index:"369", C:13, M:9, Y:11, K:0, L:90, A:0, B:0}, _e5e5e5:{name:"gray90", r:229, g:229, b:229, colorGroup:"Light Grays and Whites", _index:"370", C:12, M:9, Y:10, K:0, L:91, A:0, B:0}, _e8e8e8:{name:"gray91", r:232, g:232, b:232, colorGroup:"Light Grays and Whites", _index:"372", C:11, M:7, Y:8, K:0, L:92, A:0, B:0}, _ebebeb:{name:"gray92", r:235, g:235, b:235, colorGroup:"Light Grays and Whites", _index:"374", C:9, M:6, Y:7, K:0, L:93, A:0, B:0}, _ededed:{name:"gray93", r:237, g:237, b:237, colorGroup:"Light Grays and Whites", _index:"375", C:8, M:6, Y:7, K:0, L:94, A:0, B:0}, _f0f0f0:{name:"gray94", r:240, g:240, b:240, colorGroup:"Light Grays and Whites", _index:"427", C:7, M:5, Y:6, K:0, L:95, A:0, B:0}, _f2f2f2:{name:"gray95", r:242, g:242, b:242, colorGroup:"Light Grays and Whites", _index:"431", C:6, M:4, Y:5, K:0, L:95, A:0, B:0}, _f7f7f7:{name:"gray97", r:247, g:247, b:247, colorGroup:"Light Grays and Whites", _index:"437", C:4, M:3, Y:3, K:0, L:97, A:0, B:0}, _fafafa:{name:"gray98", r:250, g:250, b:250, colorGroup:"Light Grays and Whites", _index:"443", C:2, M:1, Y:2, K:0, L:98, A:0, B:0}, _fcfcfc:{name:"gray99", r:252, g:252, b:252, colorGroup:"Light Grays and Whites", _index:"444", C:1, M:1, Y:1, K:0, L:99, A:0, B:0}, _a9a9a9:{name:"darkgray", r:169, g:169, b:169, colorGroup:"Grey Shades", _index:"247", C:36, M:28, Y:28, K:7, L:69, A:0, B:0}
}
function indexByCSS(colorValues /* Array of Color Values */, space) {
var closestKey, closestValue, key, keys, delta;
/*
+ColorSpace.RGB
Result: 1666336578
+ColorSpace.CMYK
Result: 1129142603
+ColorSpace.LAB
Result: 1665941826
*/
// Associate the swatches to their closest match in the cssColors dictionary object
// Calculate the closest match by using very primitive delta values
// Return an array of the index value + the delta value for the purpose of sorting the colors and the color group for placing in the correct color groups
// Made this function verbose to make it easier to understand
if (space === 1666336578) { // RGB
var r, g, b, R, G, B;
r = colorValues[0];
g = colorValues[1];
b = colorValues[2];
// convert the [10, 0, 255] format into _0a00ff format
key = "_" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
// check if the key is in our index if so just return the keys index and the 0000 delta
if (key in cssColors) return [cssColors[key]._index + "0000", cssColors[key].colorGroup];
// Drat no direct match so we have to work for it
closestKey = "_";
closestValue = 1e10;
for (keys in cssColors) {
R = cssColors[keys].r;
G = cssColors[keys].g;
B = cssColors[keys].b;
//delta = (R - r) * (R - r) + (G - g) * (G - g) + (B - b) * (B - b);
delta = Math.abs(R - r) + .75 * Math.abs(G - g) + Math.abs(B - b);
if (delta < closestValue) {
closestKey = keys;
closestValue = delta;
}
}
closestValue = ("0000" + closestValue.toString(16)).substr(-4);
return [cssColors[closestKey]._index + closestValue, cssColors[closestKey].colorGroup];
} else if (space === 1665941826) { // Lab
var L, A, B, l, a, b;
l = colorValues[0];
a = colorValues[1];
b = colorValues[2];
// No exact key match possible for Lab or CMYK values
closestKey = "_";
closestValue = 1e10;
for (keys in cssColors) {
L = cssColors[keys].L;
A = cssColors[keys].A;
B = cssColors[keys].B;
delta = ((L - l) * (L - l) + (A - a) * (A - a) + (B - b) * (B - b)); // CIE76 (without the sqrt) use the quickest comparison even if it's the most pathetic
if (delta < closestValue) {
closestKey = keys;
closestValue = delta;
}
}
closestValue = ("0000" + closestValue.toString(16)).substr(-4);
return [cssColors[closestKey]._index + closestValue, cssColors[closestKey].colorGroup];
} else if (space === 1129142603) { // CMYK
var C, M, Y, K, c, m, y, k;
c = colorValues[0];
m = colorValues[1];
y = colorValues[2];
k = colorValues[3];
// No exact key match possible for Lab or CMYK values
closestKey = "_";
closestValue = 1e10;
for (keys in cssColors) {
C = cssColors[keys].C;
M = cssColors[keys].M;
Y = cssColors[keys].Y;
K = cssColors[keys].K;
delta = ((C - c) * (C - c) + (M - m) * (M - m) + (Y - y) * (Y - y) + (K - k) * (K - k)); // CIE76 (without the sqrt) use the quickest comparison even if it's the most pathetic
if (delta < closestValue) {
closestKey = keys;
closestValue = delta;
}
}
closestValue = ("0000" + closestValue.toString(16)).substr(-4);
return [cssColors[closestKey]._index + closestValue, cssColors[closestKey].colorGroup];
}
} // end of indexByCSS
var start = new Date;
app.panels.itemByName('$ID/Swatches').visible = false;
// app.scriptPreferences.userInteractionLevel = +UserInteractionLevels.INTERACT_WITH_ALL;
app.doScript (sortSwatches, undefined, undefined, UndoModes.FAST_ENTIRE_SCRIPT);
app.panels.itemByName('$ID/Swatches').visible = true;
// $.writeln("took " + (new Date - start) / 1000 + " seconds");
})(); // run the wrapper
Regards Trevor
Copy link to clipboard
Copied
My method also does some bad categorization so given the difference in the efficiency of the methods I guess mine can go in the trash, oh well that's how it goes some times!
Copy link to clipboard
Copied
Thank you for all your efforts!
Copy link to clipboard
Copied
Thanks, that is awesome.
Sorry I didn't reply sooner. I actually didn't see your answer until today, and not sure why. I thought I was subscribed to updates on this thread, but did not see any until now. Maybe they were getting grouped in my inbox and bumped out of order. I was also out of the office for about 5 days.
Anyway, that is a great start. I will try it out and report back.
Copy link to clipboard
Copied
Hi Marc,
Are you interested in developing this further? Would you be OK with posting it to GitHub for community development? I can do that, or you can, whichever you prefer.
Regards,
Michael
Copy link to clipboard
Copied
Here is an updated, but still not functional script:
// Description: SortSwatches v. 0.6. Script to sort InDesign swatches by color value
// Written by Michael Prewitt.
// This script is provided "as-is" and the author takes no responsibility whatsoever for results of its use.
// For reference, see http://jongware.mit.edu/idcs5js/index_Color%20Suite.html
(function(){
sortSwatches();
});
function sortSwatches(){
// Alert: Script will convert RGB to CMYK ... OK or cancel
// Alert: Does not currently support custom mixed ink swatches or custom registration swatches
// Load current swatches into arrays (RGB/CMYK, spot, gradient)
var oldSwatches = app.activeDocument.swatches.everyItem();
// Don't sort None, Registration, Paper, Black
// var defaultSwatches = oldSwatches.slice(0,4);
oldSwatches.splice(0,4);
var newSwatches = new Array();
var arraySpot = new Array();
var arrayCMYK = new Array();
var arrayGradient = new Array();
var arrayMagentas = new Array();
var arrayReds = new Array();
var arrayOranges = new Array();
var arrayYellows = new Array();
var arrayWarmGreens = new Array();
var arrayCoolGreens = new Array();
var arrayCyans = new Array();
var arrayBlues = new Array();
var arrayPurples = new Array();
var arrayGraysC = new Array();
var arrayGraysM = new Array();
var arrayGraysY = new Array();
var arrayGraysK = new Array();
var arrayDarksC = new Array();
var arrayDarksM = new Array();
var arrayDarksY = new Array();
var arrayPastelsC = new Array();
var arrayPastelsM = new Array();
var arrayPastelsY = new Array();
var arrayAssortedC = new Array();
var arrayAssortedM = new Array();
var arrayAssortedY = new Array();
var color, c, m, y, k, avgValue;
// Main
for (i=0; i<oldSwatches.length; i++) {
if ( oldSwatches instanceof Swatch.Color ) {
switch ( oldSwatches.model ) {
case model.SPOT:
arraySpot[arraySpot.length] = oldSwatches;
break;
case model.PROCESS:
arrayCMYK[arrayCMYK.length] = oldSwatches;
break;
}
} else if ( oldSwatches instanceof Swatch.Gradient ) {
arrayGradient[arrayGradient.length] = oldSwatches;
}
/*
else if ( oldSwatches instanceof Swatch.MixedInk ) { }
else if ( oldSwatches instanceof Swatch.MixedInkGroup ) { }
*/
}
// Sort spot array by name
arraySpot.sort(byProperty("name")); // Each item is an object, sort by 'name'
// Sort CMYK array by color
for (i=0; i<arrayCMYK.length; i++) {
color = arrayCMYK;
color.space = ColorSpace.CMYK; // Convert RGB to CMYK in the process ??? may not be necessary
c = color.colorValue[0];
m = color.colorValue[1];
y = color.colorValue[2];
k = color.colorValue[3];
// Determine the density value
color.density = c*0.49 + m*0.6 + y*0.07 + k*0.91;
// Determine the average value of CMY
avgValue = (c+m+y)/3;
// Sort all colors into arrays such as magentas, blues, grays
if ( m>50 && c<25 && y<25 && k<25 ) arrayMagentas[arrayMagentas.length] = color;
else if ( m>50 && y>50 && c<25 && k<25 && m>=y ) arrayReds[arrayReds.length] = color;
else if ( m>50 && y>50 && c<25 && k<25 && y>m ) arrayOranges[arrayOranges.length] = color;
else if ( y>50 && c<25 && m<25 && k<25 ) arrayYellows[arrayYellows.length] = color;
else if ( c>50 && y>50 && m<25 && k<25 && c>=y ) arrayWarmGreens[arrayWarmGreens.length] = color;
else if ( c>50 && y>50 && m<25 && k<25 && y>c ) arrayCoolGreens[arrayCoolGreens.length] = color;
else if ( c>50 && m<25 && y<25 && k<25 ) arrayCyans[arrayCyans.length] = color;
else if ( c>50 && m>50 && y<25 && k<25 && c>=m ) arrayBlues[arrayBlues.length] = color;
else if ( c>50 && m>50 && y<25 && k<25 && m>c ) arrayPurples[arrayPurples.length] = color;
else if ( c==0 && m==0 && y==0 ) arrayGraysK[arrayGraysK.length] = color;
else if ( Math.abs(c-avgValue)<=10 && Math.abs(m-avgValue)<=10 && Math.abs(y-avgValue)<=10 ) {
if ( c>m && c>y ) arrayGraysC[arrayGraysC.length] = color;
else if ( m>c && m>y ) arrayGraysM[arrayGraysM.length] = color;
else arrayGraysY[arrayGraysY.length] = color;
}
else if ( color.density >= 85 ) {
if ( c>m && c>y ) arrayDarksC[arrayDarksC.length] = color;
else if ( m>c && m>y ) arrayDarksM[arrayDarksM.length] = color;
else arrayDarksY[arrayDarksY.length] = color;
}
else if ( color.density <= 15 ) {
if ( c>m && c>y ) arrayPastelsC[arrayPastelsC.length] = color;
else if ( m>c && m>y ) arrayPastelsM[arrayPastelsM.length] = color;
else arrayPastelsY[arrayPastelsY.length] = color;
}
else {
if ( c>m && c>y ) arrayAssortedC[arrayAssortedC.length] = color;
else if ( m>c && m>y ) arrayAssortedM[arrayAssortedM.length] = color;
else arrayAssortedY[arrayAssortedY.length] = color;
}
}
arrayMagentas.sort(byProperty("density")); // Each item is an object, sort by 'density'
arrayReds.sort(byProperty("density"));
arrayOranges.sort(byProperty("density"));
arrayYellows.sort(byProperty("density"));
arrayWarmGreens.sort(byProperty("density"));
arrayCoolGreens.sort(byProperty("density"));
arrayCyans.sort(byProperty("density"));
arrayBlues.sort(byProperty("density"));
arrayPurples.sort(byProperty("density"));
arrayGraysC.sort(byProperty("density"));
arrayGraysM.sort(byProperty("density"));
arrayGraysY.sort(byProperty("density"));
arrayGraysK.sort(byProperty("density"));
arrayDarksC.sort(byProperty("density"));
arrayDarksM.sort(byProperty("density"));
arrayDarksY.sort(byProperty("density"));
arrayPastelsC.sort(byProperty("density"));
arrayPastelsM.sort(byProperty("density"));
arrayPastelsY.sort(byProperty("density"));
arrayAssortedC.sort(byProperty("density"));
arrayAssortedM.sort(byProperty("density"));
arrayAssortedY.sort(byProperty("density"));
// Sort gradient array by name
arrayGradient.sort(byProperty("name")); // Each item is an object, sort by 'name'
// Stick it all together: spot, CMYK, gradient values
newSwatches = newSwatches.concat(arraySpot,arrayMagentas,arrayReds,arrayOranges,arrayYellows,arrayWarmGreens,arrayCoolGreens,arrayCyans,arrayBlues,arrayPurples,arrayGraysC,arrayGraysM,arrayGraysY,arrayGraysK,arrayDarksC,arrayDarksM,arrayDarksY,arrayPastelsC,arrayPastelsM,arrayPastelsY,arrayAssortedC,arrayAssortedM,arrayAssortedY,arrayGradient);
// Dump back into the palette ... skipping None, Registration, Paper, Black
for (i=0; i<oldSwatches.length; i++) {
app.activeDocument.swatches[i+4] = newSwatches;
}
}
// Custom sorter
var byProperty = function(prop) {
return function(a,b) {
if (typeof a[prop] == "number") {
return (a[prop] - b[prop]);
} else {
return ((a[prop] < b[prop]) ? -1 : ((a[prop] > b[prop]) ? 1 : 0));
}
};
};
Copy link to clipboard
Copied
I just tested Marc's script. It works great, but I will try some tweaks (see comments below).
Turns out I had more colors than I thought. In this one magazine I would have guessed 50-60 colors, but there was actually 128. I use the list view, and there are more colors than there seemed to be.
I found I got much better results, with far fewer 'other' colors, using these values:
INK_MIN = 25,
INK_MAX = 60,
GRAY_VAR = 20,
DARK_MIN = 70,
PASTEL_MAX = 30;
The main remaining issues with the auto-sorting seems to be with ink density.
I will keep experimenting.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now