-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcolorLists.cpp
1789 lines (1733 loc) · 92.9 KB
/
colorLists.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Copyright 2010, 2011 Tom Klein.
//
// This file is part of cstitch.
//
// cstitch is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#include "colorLists.h"
#include <QtCore/QDebug>
#include "imageProcessing.h"
#include "triC.h"
#include "utility.h"
#include "versionProcessing.h"
#include "windowManager.h"
extern const int D_MAX;
bool useNewDmcColorList();
QVector<floss> initializePre0_9_5_30DMC();
QVector<floss> initializePost0_9_5_29DMC();
QHash<colorOrder, QVector<iColor> > colorMatcher::dmcColorsHash_ =
QHash<colorOrder, QVector<iColor> >();
QHash<colorOrder, QVector<iColor> > colorMatcher::anchorColorsHash_ =
QHash<colorOrder, QVector<iColor> >();
QHash<colorOrder, int> colorMatcher::dmcIntensitySpreads_ =
QHash<colorOrder, int>();
QHash<colorOrder, int> colorMatcher::anchorIntensitySpreads_ =
QHash<colorOrder, int>();
void colorMatcher::resetDataSources() {
// (I'm not certain that old projects would recreate the same colors if we mess
// with these, so I guess we need to set them based on version)
if (useNewDmcColorList()) {
dmcIntensitySpreads_[O_GRAY] = 99;
dmcIntensitySpreads_[O_RGB] = 100;
dmcIntensitySpreads_[O_RBG] = 139;
dmcIntensitySpreads_[O_GRB] = 175;
dmcIntensitySpreads_[O_GBR] = 174;
dmcIntensitySpreads_[O_BGR] = 164;
dmcIntensitySpreads_[O_BRG] = 275;
}
else { // old dmc color list spreads
dmcIntensitySpreads_[O_GRAY] = 120;
dmcIntensitySpreads_[O_RGB] = 103;
dmcIntensitySpreads_[O_RBG] = 156;
dmcIntensitySpreads_[O_GRB] = 215;
dmcIntensitySpreads_[O_GBR] = 231;
dmcIntensitySpreads_[O_BGR] = 269;
dmcIntensitySpreads_[O_BRG] = 209;
}
// int minIntensityDistance = 0;
// const QVector<triC> anchors = loadAnchor();
// brgComparator comparator;
// QVector<triC> colors;
// for (int i = 0, size = anchors.size(); i < size; ++i) {
// if (comparator(anchors[i])) {
// qDebug() << ::ctos(anchors[i]);
// colors.push_back(anchors[i]);
// }
// }
// const int size = colors.size();
// for (int b = 0; b < 256; ++b) {
// for (int g = 0; g < 256; ++g) {
// for (int r = 0; r < 256; ++r) {
// const triC thisColor(r, g, b);
// if (comparator(thisColor)) {
// // find the closest match on colors
// int min = D_MAX;
// int chosenIndex = 0;
// for (int i = 0; i < size; ++i) {
// const int thisD = ::ds(thisColor, colors[i]);
// if (thisD < min) {
// min = thisD;
// chosenIndex = i;
// }
// }
// const int thisMinIntensityDistance =
// qAbs(thisColor.intensity() - colors[chosenIndex].intensity());
// if (thisMinIntensityDistance > minIntensityDistance) {
// minIntensityDistance = thisMinIntensityDistance;
// }
// }
// }
// }
// }
// qDebug() << "min intensity distance" << minIntensityDistance;
anchorIntensitySpreads_[O_GRAY] = 104;
anchorIntensitySpreads_[O_RGB] = 96;
anchorIntensitySpreads_[O_RBG] = 173;
anchorIntensitySpreads_[O_GRB] = 175;
anchorIntensitySpreads_[O_GBR] = 175;
anchorIntensitySpreads_[O_BGR] = 175;
anchorIntensitySpreads_[O_BRG] = 263;
dmcColorsHash_.clear();
anchorColorsHash_.clear();
}
bool useNewDmcColorList() {
const CVersion curProjectVersion =
windowManager::getWindowManager()->getProjectVersion();
if (curProjectVersion > "0.9.5.29") {
return true;
}
else {
return false;
}
}
QVector<triC> loadDMC() {
static QVector<triC> dmcPre0_9_5_30Colors;
static QVector<triC> dmcPost0_9_5_29Colors;
if (useNewDmcColorList()) {
if (dmcPost0_9_5_29Colors.isEmpty()) {
dmcPost0_9_5_29Colors.reserve(DMC_POST_0_9_5_29_COUNT);
const QVector<floss> dmcFloss = initializePost0_9_5_29DMC();
for (QVector<floss>::const_iterator it = dmcFloss.begin(),
end = dmcFloss.end(); it != end; ++it) {
dmcPost0_9_5_29Colors.push_back((*it).color());
}
}
return dmcPost0_9_5_29Colors;
}
else { // use old dmc color list
if (dmcPre0_9_5_30Colors.isEmpty()) {
dmcPre0_9_5_30Colors.reserve(DMC_PRE_0_9_5_30_COUNT);
const QVector<floss> dmcFloss = initializePre0_9_5_30DMC();
for (QVector<floss>::const_iterator it = dmcFloss.begin(),
end = dmcFloss.end(); it != end; ++it) {
dmcPre0_9_5_30Colors.push_back((*it).color());
}
}
return dmcPre0_9_5_30Colors;
}
}
QVector<triC> loadAnchor() {
static QVector<triC> anchorColors;
if (anchorColors.isEmpty()) {
anchorColors.reserve(ANCHOR_COUNT);
const QVector<floss> anchorFloss = initializeAnchor();
for (int i = 0, size = anchorFloss.size(); i < size; ++i) {
anchorColors.push_back(anchorFloss[i].color());
}
}
return anchorColors;
}
bool colorIsDmc(const triC& color) {
return loadDMC().contains(color);
}
bool colorsAreDmc(const QVector<triC>& colors) {
QVector<triC> dmcColors = loadDMC();
for (int i = 0, size = colors.size(); i < size; ++i) {
if (!dmcColors.contains(colors[i])) {
return false;
}
}
return true;
}
QVector<triC> rgbToDmc(const QVector<triC>& colors, bool noDups) {
colorTransformer* transformer = new dmcTransformer();
return rgbToColorList(colors, colorTransformerPtr(transformer), noDups);
}
QVector<triC> rgbToAnchor(const QVector<triC>& colors, bool noDups) {
colorTransformer* transformer = new anchorTransformer();
return rgbToColorList(colors, colorTransformerPtr(transformer), noDups);
}
QVector<triC> rgbToColorList(const QVector<triC>& rgbColors,
const colorTransformerPtr& transformer,
bool noDups) {
QVector<triC> returnColors;
returnColors.reserve(rgbColors.size());
for (int i = 0, size = rgbColors.size(); i < size; ++i) {
const triC newColor = transformer->transform(rgbColors[i]);
if (!noDups || !returnColors.contains(newColor)) {
returnColors.push_back(newColor);
}
}
return returnColors;
}
triC rgbToDmc(const triC& color) {
const colorMatcher matcher(flossDMC, color);
return matcher.closestMatch();
}
triC rgbToAnchor(const triC& color) {
const colorMatcher matcher(flossAnchor, color);
return matcher.closestMatch();
}
colorMatcher::colorMatcher(flossType type, const triC& color)
: color_(color) {
const colorOrder order = getColorOrder(color);
orderComparator* comparator = NULL;
switch (order) {
case O_RGB:
comparator = new rgbComparator();
break;
case O_RBG:
comparator = new rbgComparator();
break;
case O_GRB:
comparator = new grbComparator();
break;
case O_GBR:
comparator = new gbrComparator();
break;
case O_BGR:
comparator = new bgrComparator();
break;
case O_BRG:
comparator = new brgComparator();
break;
case O_GRAY:
comparator = new grayComparator();
break;
}
switch (type.value()) {
case flossDMC:
colorList_ = dmcColorsHash_[order];
if (colorList_.isEmpty()) {
QVector<iColor> newList;
loadColorList(comparator, loadDMC(), &newList);
dmcColorsHash_[order] = newList;
colorList_ = newList;
}
intensitySpread_ = dmcIntensitySpreads_[order];
break;
case flossAnchor:
colorList_ = anchorColorsHash_[order];
if (colorList_.isEmpty()) {
QVector<iColor> newList;
loadColorList(comparator, loadAnchor(), &newList);
anchorColorsHash_[order] = newList;
colorList_ = anchorColorsHash_[order];
}
intensitySpread_ = anchorIntensitySpreads_[order];
break;
default:
qWarning() << "Unknown floss type in colorMatcher" << type.value();
colorList_ = dmcColorsHash_[order];
if (colorList_.isEmpty()) {
QVector<iColor> newList;
loadColorList(comparator, loadDMC(), &newList);
dmcColorsHash_[order] = newList;
colorList_ = dmcColorsHash_[order];
}
intensitySpread_ = dmcIntensitySpreads_[order];
break;
}
delete comparator;
}
void colorMatcher::loadColorList(const orderComparator* comparator,
const QVector<triC>& colors,
QVector<iColor>* newList) const {
for (int i = 0, size = colors.size(); i < size; ++i) {
const triC thisColor(colors[i]);
if ((*comparator)(thisColor)) {
newList->push_back(iColor(thisColor));
}
}
std::sort(newList->begin(), newList->end());
}
triC colorMatcher::closestMatch() const {
const int inputIntensity = color_.intensity();
const int lowerIBound = inputIntensity - intensitySpread_;
const int upperIBound = inputIntensity + intensitySpread_;
const int lastIndex = colorList_.size() - 1;
Q_ASSERT_X(lowerIBound <= colorList_[lastIndex].intensity(),
"closestMatch",
QString("lowerIBound too large: " +
::itoqs(lowerIBound) + QString(", ") +
::itoqs(colorList_[lastIndex].intensity())).
toStdString().c_str());
Q_ASSERT_X(upperIBound >= colorList_[0].intensity(),
"closestMatch",
QString("upperIBound too small: " +
::itoqs(upperIBound) + ", " +
::itoqs(colorList_[0].intensity())).toStdString().c_str());
// find out where to start looking (modified binary search)
int startIndex = 0;
int step = lastIndex/2;
while (step > 0) {
// [I assume the compiler only computes (startIndex + step) once here]
while ((startIndex + step <= lastIndex) &&
(colorList_[startIndex + step].intensity() < lowerIBound)) {
startIndex = startIndex + step;
}
step = step/2;
}
// find out where to stop looking
int endIndex = lastIndex;
step = lastIndex/2;
while (step > 0) {
while ((endIndex - step >= 0) &&
(colorList_[endIndex - step].intensity() > upperIBound)) {
endIndex = endIndex - step;
}
step = step/2;
}
int min = D_MAX;
int chosenIndex = 0;
for (int i = startIndex; i <= endIndex; ++i) {
const int thisD = ::ds(color_, colorList_[i].color());
if (thisD < min) {
min = thisD;
chosenIndex = i;
}
}
return colorList_[chosenIndex].color();
}
QRgb closestMatch(const triC& color, const QList<QRgb>& colorList) {
const colorOrder desiredOrder = ::getColorOrder(color);
QList<triC> triColorList;
for (int i = 0, size = colorList.size(); i < size; ++i) {
triColorList.push_back(colorList[i]);
}
// first look for a color with the same order that's within a min
// distance of the input color
int min = 100;
int chosenIndex = -1;
for (int i = 0, size = triColorList.size(); i < size; ++i) {
if (::getColorOrder(triColorList[i]) == desiredOrder) {
const int thisD = ::ds(color, triColorList[i]);
if (thisD < min) {
min = thisD;
chosenIndex = i;
}
}
}
if (chosenIndex == -1) {
// no good order match, so just choose the closest color
min = D_MAX;
chosenIndex = 0;
for (int i = 0, size = triColorList.size(); i < size; ++i) {
const int thisD = ::ds(color, triColorList[i]);
if (thisD < min) {
min = thisD;
chosenIndex = i;
}
}
}
return colorList[chosenIndex];
}
QVector<int> rgbToCode(const QVector<flossColor>& colors) {
QVector<int> returnCodes;
returnCodes.reserve(colors.size());
QVector<floss> dmcColors;
QVector<floss> anchorColors;
for (int i = 0, size = colors.size(); i < size; ++i) {
const flossColor thisColor = colors[i];
switch (thisColor.type().value()) {
case flossDMC: {
if (dmcColors.isEmpty()) {
dmcColors = ::initializeDMC();
}
const int index = dmcColors.indexOf(floss(thisColor.color()));
const int code = index == -1 ? -1 : dmcColors[index].code();
returnCodes.push_back(code);
break;
}
case flossAnchor: {
if (anchorColors.isEmpty()) {
anchorColors = ::initializeAnchor();
}
const int index = anchorColors.indexOf(floss(thisColor.color()));
const int code = index == -1 ? -1 : anchorColors[index].code();
returnCodes.push_back(code);
break;
}
case flossVariable:
returnCodes.push_back(-1);
break;
}
}
return returnCodes;
}
QVector<floss> initializeDMC() {
return useNewDmcColorList() ?
initializePost0_9_5_29DMC() : initializePre0_9_5_30DMC();
}
QVector<floss> initializePost0_9_5_29DMC() {
QVector<floss> dmc;
dmc.reserve(DMC_POST_0_9_5_29_COUNT);
//Produced with python3 xmlFlossToCpp.py
dmc.push_back(floss(WHITE_CODE, "White", triC(252,251,248)));
dmc.push_back(floss(SNOW_WHITE_CODE, "Snow White", triC(255,255,255)));
dmc.push_back(floss(ECRU_CODE, "Ecru", triC(240,234,218)));
dmc.push_back(floss(150, "Dusty Rose Ult Vy Dk", triC(171,2,73)));
dmc.push_back(floss(151, "Dusty Rose Vry Lt", triC(240,206,212)));
dmc.push_back(floss(152, "Shell Pink Med Light", triC(226,160,153)));
dmc.push_back(floss(153, "Violet Very Light", triC(230,204,217)));
dmc.push_back(floss(154, "Grape Very Dark", triC(87,36,51)));
dmc.push_back(floss(155, "Blue Violet Med Dark", triC(152,145,182)));
dmc.push_back(floss(156, "Blue Violet Med Lt", triC(163,174,209)));
dmc.push_back(floss(157, "Cornflower Blue Vy Lt", triC(187,195,217)));
dmc.push_back(floss(158, "Cornflower Blu M V D", triC(76,82,110)));
dmc.push_back(floss(159, "Blue Gray Light", triC(199,202,215)));
dmc.push_back(floss(160, "Blue Gray Medium", triC(153,159,183)));
dmc.push_back(floss(161, "Blue Gray", triC(120,128,164)));
dmc.push_back(floss(162, "Blue Ultra Very Light", triC(219,236,245)));
dmc.push_back(floss(163, "Celadon Green Md", triC(77,131,97)));
dmc.push_back(floss(164, "Forest Green Lt", triC(200,216,184)));
dmc.push_back(floss(165, "Moss Green Vy Lt", triC(239,244,164)));
dmc.push_back(floss(166, "Moss Green Md Lt", triC(192,200,64)));
dmc.push_back(floss(167, "Yellow Beige V Dk", triC(167,124,73)));
dmc.push_back(floss(168, "Pewter Very Light", triC(209,209,209)));
dmc.push_back(floss(169, "Pewter Light", triC(132,132,132)));
dmc.push_back(floss(208, "Lavender Very Dark", triC(131,91,139)));
dmc.push_back(floss(209, "Lavender Dark", triC(163,123,167)));
dmc.push_back(floss(210, "Lavender Medium", triC(195,159,195)));
dmc.push_back(floss(211, "Lavender Light", triC(227,203,227)));
dmc.push_back(floss(221, "Shell Pink Vy Dk", triC(136,62,67)));
dmc.push_back(floss(223, "Shell Pink Light", triC(204,132,124)));
dmc.push_back(floss(224, "Shell Pink Very Light", triC(235,183,175)));
dmc.push_back(floss(225, "Shell Pink Ult Vy Lt", triC(255,223,213)));
dmc.push_back(floss(300, "Mahogany Vy Dk", triC(111,47,0)));
dmc.push_back(floss(301, "Mahogany Med", triC(179,95,43)));
dmc.push_back(floss(304, "Red Medium", triC(183,31,51)));
dmc.push_back(floss(307, "Lemon", triC(253,237,84)));
dmc.push_back(floss(309, "Rose Dark", triC(186,74,74)));
dmc.push_back(floss(310, "Black", triC(0,0,0)));
dmc.push_back(floss(311, "Wedgewood Ult VyDk", triC(28,80,102)));
dmc.push_back(floss(312, "Baby Blue Very Dark", triC(53,102,139)));
dmc.push_back(floss(315, "Antique Mauve Md Dk", triC(129,73,82)));
dmc.push_back(floss(316, "Antique Mauve Med", triC(183,115,127)));
dmc.push_back(floss(317, "Pewter Gray", triC(108,108,108)));
dmc.push_back(floss(318, "Steel Gray Lt", triC(171,171,171)));
dmc.push_back(floss(319, "Pistachio Grn Vy Dk", triC(32,95,46)));
dmc.push_back(floss(320, "Pistachio Green Med", triC(105,136,90)));
dmc.push_back(floss(321, "Red", triC(199,43,59)));
dmc.push_back(floss(322, "Baby Blue Dark", triC(90,143,184)));
dmc.push_back(floss(326, "Rose Very Dark", triC(179,59,75)));
dmc.push_back(floss(327, "Violet Dark", triC(99,54,102)));
dmc.push_back(floss(333, "Blue Violet Very Dark", triC(92,84,120)));
dmc.push_back(floss(334, "Baby Blue Medium", triC(115,159,193)));
dmc.push_back(floss(335, "Rose", triC(238,84,110)));
dmc.push_back(floss(336, "Navy Blue", triC(37,59,115)));
dmc.push_back(floss(340, "Blue Violet Medium", triC(173,167,199)));
dmc.push_back(floss(341, "Blue Violet Light", triC(183,191,221)));
dmc.push_back(floss(347, "Salmon Very Dark", triC(191,45,45)));
dmc.push_back(floss(349, "Coral Dark", triC(210,16,53)));
dmc.push_back(floss(350, "Coral Medium", triC(224,72,72)));
dmc.push_back(floss(351, "Coral", triC(233,106,103)));
dmc.push_back(floss(352, "Coral Light", triC(253,156,151)));
dmc.push_back(floss(353, "Peach", triC(254,215,204)));
dmc.push_back(floss(355, "Terra Cotta Dark", triC(152,68,54)));
dmc.push_back(floss(356, "Terra Cotta Med", triC(197,106,91)));
dmc.push_back(floss(367, "Pistachio Green Dk", triC(97,122,82)));
dmc.push_back(floss(368, "Pistachio Green Lt", triC(166,194,152)));
dmc.push_back(floss(369, "Pistachio Green Vy Lt", triC(215,237,204)));
dmc.push_back(floss(370, "Mustard Medium", triC(184,157,100)));
dmc.push_back(floss(371, "Mustard", triC(191,166,113)));
dmc.push_back(floss(372, "Mustard Lt", triC(204,183,132)));
dmc.push_back(floss(400, "Mahogany Dark", triC(143,67,15)));
dmc.push_back(floss(402, "Mahogany Vy Lt", triC(247,167,119)));
dmc.push_back(floss(407, "Desert Sand Med", triC(187,129,97)));
dmc.push_back(floss(413, "Pewter Gray Dark", triC(86,86,86)));
dmc.push_back(floss(414, "Steel Gray Dk", triC(140,140,140)));
dmc.push_back(floss(415, "Pearl Gray", triC(211,211,214)));
dmc.push_back(floss(420, "Hazelnut Brown Dk", triC(160,112,66)));
dmc.push_back(floss(422, "Hazelnut Brown Lt", triC(198,159,123)));
dmc.push_back(floss(433, "Brown Med", triC(122,69,31)));
dmc.push_back(floss(434, "Brown Light", triC(152,94,51)));
dmc.push_back(floss(435, "Brown Very Light", triC(184,119,72)));
dmc.push_back(floss(436, "Tan", triC(203,144,81)));
dmc.push_back(floss(437, "Tan Light", triC(228,187,142)));
dmc.push_back(floss(444, "Lemon Dark", triC(255,214,0)));
dmc.push_back(floss(445, "Lemon Light", triC(255,251,139)));
dmc.push_back(floss(451, "Shell Gray Dark", triC(145,123,115)));
dmc.push_back(floss(452, "Shell Gray Med", triC(192,179,174)));
dmc.push_back(floss(453, "Shell Gray Light", triC(215,206,203)));
dmc.push_back(floss(469, "Avocado Green", triC(114,132,60)));
dmc.push_back(floss(470, "Avocado Grn Lt", triC(148,171,79)));
dmc.push_back(floss(471, "Avocado Grn V Lt", triC(174,191,121)));
dmc.push_back(floss(472, "Avocado Grn U Lt", triC(216,228,152)));
dmc.push_back(floss(498, "Red Dark", triC(167,19,43)));
dmc.push_back(floss(500, "Blue Green Vy Dk", triC(4,77,51)));
dmc.push_back(floss(501, "Blue Green Dark", triC(57,111,82)));
dmc.push_back(floss(502, "Blue Green", triC(91,144,113)));
dmc.push_back(floss(503, "Blue Green Med", triC(123,172,148)));
dmc.push_back(floss(504, "Blue Green Vy Lt", triC(196,222,204)));
dmc.push_back(floss(505, "Jade Green", triC(51,131,98)));
dmc.push_back(floss(517, "Wedgewood Dark", triC(59,118,143)));
dmc.push_back(floss(518, "Wedgewood Light", triC(79,147,167)));
dmc.push_back(floss(519, "Sky Blue", triC(126,177,200)));
dmc.push_back(floss(520, "Fern Green Dark", triC(102,109,79)));
dmc.push_back(floss(522, "Fern Green", triC(150,158,126)));
dmc.push_back(floss(523, "Fern Green Lt", triC(171,177,151)));
dmc.push_back(floss(524, "Fern Green Vy Lt", triC(196,205,172)));
dmc.push_back(floss(535, "Ash Gray Vy Lt", triC(99,100,88)));
dmc.push_back(floss(543, "Beige Brown Ult Vy Lt", triC(242,227,206)));
dmc.push_back(floss(550, "Violet Very Dark", triC(92,24,78)));
dmc.push_back(floss(552, "Violet Medium", triC(128,58,107)));
dmc.push_back(floss(553, "Violet", triC(163,99,139)));
dmc.push_back(floss(554, "Violet Light", triC(219,179,203)));
dmc.push_back(floss(561, "Celadon Green VD", triC(44,106,69)));
dmc.push_back(floss(562, "Jade Medium", triC(83,151,106)));
dmc.push_back(floss(563, "Jade Light", triC(143,192,152)));
dmc.push_back(floss(564, "Jade Very Light", triC(167,205,175)));
dmc.push_back(floss(580, "Moss Green Dk", triC(136,141,51)));
dmc.push_back(floss(581, "Moss Green", triC(167,174,56)));
dmc.push_back(floss(597, "Turquoise", triC(91,163,179)));
dmc.push_back(floss(598, "Turquoise Light", triC(144,195,204)));
dmc.push_back(floss(600, "Cranberry Very Dark", triC(205,47,99)));
dmc.push_back(floss(601, "Cranberry Dark", triC(209,40,106)));
dmc.push_back(floss(602, "Cranberry Medium", triC(226,72,116)));
dmc.push_back(floss(603, "Cranberry", triC(255,164,190)));
dmc.push_back(floss(604, "Cranberry Light", triC(255,176,190)));
dmc.push_back(floss(605, "Cranberry Very Light", triC(255,192,205)));
dmc.push_back(floss(606, "Orange-Red Bright", triC(250,50,3)));
dmc.push_back(floss(608, "Burnt Orange Bright", triC(253,93,53)));
dmc.push_back(floss(610, "Drab Brown Dk", triC(121,96,71)));
dmc.push_back(floss(611, "Drab Brown", triC(150,118,86)));
dmc.push_back(floss(612, "Drab Brown Lt", triC(188,154,120)));
dmc.push_back(floss(613, "Drab Brown V Lt", triC(220,196,170)));
dmc.push_back(floss(632, "Desert Sand Ult Vy Dk", triC(135,85,57)));
dmc.push_back(floss(640, "Beige Gray Vy Dk", triC(133,123,97)));
dmc.push_back(floss(642, "Beige Gray Dark", triC(164,152,120)));
dmc.push_back(floss(644, "Beige Gray Med", triC(221,216,203)));
dmc.push_back(floss(645, "Beaver Gray Vy Dk", triC(110,101,92)));
dmc.push_back(floss(646, "Beaver Gray Dk", triC(135,125,115)));
dmc.push_back(floss(647, "Beaver Gray Med", triC(176,166,156)));
dmc.push_back(floss(648, "Beaver Gray Lt", triC(188,180,172)));
dmc.push_back(floss(666, "Bright Red", triC(227,29,66)));
dmc.push_back(floss(676, "Old Gold Lt", triC(229,206,151)));
dmc.push_back(floss(677, "Old Gold Vy Lt", triC(245,236,203)));
dmc.push_back(floss(680, "Old Gold Dark", triC(188,141,14)));
dmc.push_back(floss(699, "Green", triC(5,101,23)));
dmc.push_back(floss(700, "Green Bright", triC(7,115,27)));
dmc.push_back(floss(701, "Green Light", triC(63,143,41)));
dmc.push_back(floss(702, "Kelly Green", triC(71,167,47)));
dmc.push_back(floss(703, "Chartreuse", triC(123,181,71)));
dmc.push_back(floss(704, "Chartreuse Bright", triC(158,207,52)));
dmc.push_back(floss(712, "Cream", triC(255,251,239)));
dmc.push_back(floss(718, "Plum", triC(156,36,98)));
dmc.push_back(floss(720, "Orange Spice Dark", triC(229,92,31)));
dmc.push_back(floss(721, "Orange Spice Med", triC(242,120,66)));
dmc.push_back(floss(722, "Orange Spice Light", triC(247,151,111)));
dmc.push_back(floss(725, "Topaz Med Lt", triC(255,200,64)));
dmc.push_back(floss(726, "Topaz Light", triC(253,215,85)));
dmc.push_back(floss(727, "Topaz Vy Lt", triC(255,241,175)));
dmc.push_back(floss(728, "Topaz", triC(228,180,104)));
dmc.push_back(floss(729, "Old Gold Medium", triC(208,165,62)));
dmc.push_back(floss(730, "Olive Green V Dk", triC(130,123,48)));
dmc.push_back(floss(731, "Olive Green Dk", triC(147,139,55)));
dmc.push_back(floss(732, "Olive Green", triC(148,140,54)));
dmc.push_back(floss(733, "Olive Green Md", triC(188,179,76)));
dmc.push_back(floss(734, "Olive Green Lt", triC(199,192,119)));
dmc.push_back(floss(738, "Tan Very Light", triC(236,204,158)));
dmc.push_back(floss(739, "Tan Ult Vy Lt", triC(248,228,200)));
dmc.push_back(floss(740, "Tangerine", triC(255,139,0)));
dmc.push_back(floss(741, "Tangerine Med", triC(255,163,43)));
dmc.push_back(floss(742, "Tangerine Light", triC(255,191,87)));
dmc.push_back(floss(743, "Yellow Med", triC(254,211,118)));
dmc.push_back(floss(744, "Yellow Pale", triC(255,231,147)));
dmc.push_back(floss(745, "Yellow Pale Light", triC(255,233,173)));
dmc.push_back(floss(746, "Off White", triC(252,252,238)));
dmc.push_back(floss(747, "Peacock Blue Vy Lt", triC(229,252,253)));
dmc.push_back(floss(754, "Peach Light", triC(247,203,191)));
dmc.push_back(floss(758, "Terra Cotta Vy Lt", triC(238,170,155)));
dmc.push_back(floss(760, "Salmon", triC(245,173,173)));
dmc.push_back(floss(761, "Salmon Light", triC(255,201,201)));
dmc.push_back(floss(762, "Pearl Gray Vy Lt", triC(236,236,236)));
dmc.push_back(floss(772, "Yellow Green Vy Lt", triC(228,236,212)));
dmc.push_back(floss(775, "Baby Blue Very Light", triC(217,235,241)));
dmc.push_back(floss(776, "Pink Medium", triC(252,176,185)));
dmc.push_back(floss(777, "Raspberry Very Dark", triC(145,53,70)));
dmc.push_back(floss(778, "Antique Mauve Vy Lt", triC(223,179,187)));
dmc.push_back(floss(779, "Cocoa Dark", triC(98,75,69)));
dmc.push_back(floss(780, "Topaz Ultra Vy Dk", triC(148,99,26)));
dmc.push_back(floss(781, "Topaz Very Dark", triC(162,109,32)));
dmc.push_back(floss(782, "Topaz Dark", triC(174,119,32)));
dmc.push_back(floss(783, "Topaz Medium", triC(206,145,36)));
dmc.push_back(floss(791, "Cornflower Blue V D", triC(70,69,99)));
dmc.push_back(floss(792, "Cornflower Blue Dark", triC(85,91,123)));
dmc.push_back(floss(793, "Cornflower Blue Med", triC(112,125,162)));
dmc.push_back(floss(794, "Cornflower Blue Light", triC(143,156,193)));
dmc.push_back(floss(796, "Royal Blue Dark", triC(17,65,109)));
dmc.push_back(floss(797, "Royal Blue", triC(19,71,125)));
dmc.push_back(floss(798, "Delft Blue Dark", triC(70,106,142)));
dmc.push_back(floss(799, "Delft Blue Medium", triC(116,142,182)));
dmc.push_back(floss(800, "Delft Blue Pale", triC(192,204,222)));
dmc.push_back(floss(801, "Coffee Brown Dk", triC(101,57,25)));
dmc.push_back(floss(803, "Baby Blue Ult Vy Dk", triC(44,89,124)));
dmc.push_back(floss(806, "Peacock Blue Dark", triC(61,149,165)));
dmc.push_back(floss(807, "Peacock Blue", triC(100,171,186)));
dmc.push_back(floss(809, "Delft Blue", triC(148,168,198)));
dmc.push_back(floss(813, "Blue Light", triC(161,194,215)));
dmc.push_back(floss(814, "Garnet Dark", triC(123,0,27)));
dmc.push_back(floss(815, "Garnet Medium", triC(135,7,31)));
dmc.push_back(floss(816, "Garnet", triC(151,11,35)));
dmc.push_back(floss(817, "Coral Red Very Dark", triC(187,5,31)));
dmc.push_back(floss(818, "Baby Pink", triC(255,223,217)));
dmc.push_back(floss(819, "Baby Pink Light", triC(255,238,235)));
dmc.push_back(floss(820, "Royal Blue Very Dark", triC(14,54,92)));
dmc.push_back(floss(822, "Beige Gray Light", triC(231,226,211)));
dmc.push_back(floss(823, "Navy Blue Dark", triC(33,48,99)));
dmc.push_back(floss(824, "Blue Very Dark", triC(57,105,135)));
dmc.push_back(floss(825, "Blue Dark", triC(71,129,165)));
dmc.push_back(floss(826, "Blue Medium", triC(107,158,191)));
dmc.push_back(floss(827, "Blue Very Light", triC(189,221,237)));
dmc.push_back(floss(828, "Sky Blue Vy Lt", triC(197,232,237)));
dmc.push_back(floss(829, "Golden Olive Vy Dk", triC(126,107,66)));
dmc.push_back(floss(830, "Golden Olive Dk", triC(141,120,75)));
dmc.push_back(floss(831, "Golden Olive Md", triC(170,143,86)));
dmc.push_back(floss(832, "Golden Olive", triC(189,155,81)));
dmc.push_back(floss(833, "Golden Olive Lt", triC(200,171,108)));
dmc.push_back(floss(834, "Golden Olive Vy Lt", triC(219,190,127)));
dmc.push_back(floss(838, "Beige Brown Vy Dk", triC(89,73,55)));
dmc.push_back(floss(839, "Beige Brown Dk", triC(103,85,65)));
dmc.push_back(floss(840, "Beige Brown Med", triC(154,124,92)));
dmc.push_back(floss(841, "Beige Brown Lt", triC(182,155,126)));
dmc.push_back(floss(842, "Beige Brown Vy Lt", triC(209,186,161)));
dmc.push_back(floss(844, "Beaver Gray Ult Dk", triC(72,72,72)));
dmc.push_back(floss(869, "Hazelnut Brown V Dk", triC(131,94,57)));
dmc.push_back(floss(890, "Pistachio Grn Ult V D", triC(23,73,35)));
dmc.push_back(floss(891, "Carnation Dark", triC(255,87,115)));
dmc.push_back(floss(892, "Carnation Medium", triC(255,121,140)));
dmc.push_back(floss(893, "Carnation Light", triC(252,144,162)));
dmc.push_back(floss(894, "Carnation Very Light", triC(255,178,187)));
dmc.push_back(floss(895, "Hunter Green Vy Dk", triC(27,83,0)));
dmc.push_back(floss(898, "Coffee Brown Vy Dk", triC(73,42,19)));
dmc.push_back(floss(899, "Rose Medium", triC(242,118,136)));
dmc.push_back(floss(900, "Burnt Orange Dark", triC(209,88,7)));
dmc.push_back(floss(902, "Garnet Very Dark", triC(130,38,55)));
dmc.push_back(floss(904, "Parrot Green V Dk", triC(85,120,34)));
dmc.push_back(floss(905, "Parrot Green Dk", triC(98,138,40)));
dmc.push_back(floss(906, "Parrot Green Md", triC(127,179,53)));
dmc.push_back(floss(907, "Parrot Green Lt", triC(199,230,102)));
dmc.push_back(floss(909, "Emerald Green Vy Dk", triC(21,111,73)));
dmc.push_back(floss(910, "Emerald Green Dark", triC(24,126,86)));
dmc.push_back(floss(911, "Emerald Green Med", triC(24,144,101)));
dmc.push_back(floss(912, "Emerald Green Lt", triC(27,157,107)));
dmc.push_back(floss(913, "Nile Green Med", triC(109,171,119)));
dmc.push_back(floss(915, "Plum Dark", triC(130,0,67)));
dmc.push_back(floss(917, "Plum Medium", triC(155,19,89)));
dmc.push_back(floss(918, "Red‑Copper Dark", triC(130,52,10)));
dmc.push_back(floss(919, "Red‑Copper", triC(166,69,16)));
dmc.push_back(floss(920, "Copper Med", triC(172,84,20)));
dmc.push_back(floss(921, "Copper", triC(198,98,24)));
dmc.push_back(floss(922, "Copper Light", triC(226,115,35)));
dmc.push_back(floss(924, "Gray Green Vy Dark", triC(86,106,106)));
dmc.push_back(floss(926, "Gray Green Med", triC(152,174,174)));
dmc.push_back(floss(927, "Gray Green Light", triC(189,203,203)));
dmc.push_back(floss(928, "Gray Green Vy Lt", triC(221,227,227)));
dmc.push_back(floss(930, "Antique Blue Dark", triC(69,92,113)));
dmc.push_back(floss(931, "Antique Blue Medium", triC(106,133,158)));
dmc.push_back(floss(932, "Antique Blue Light", triC(162,181,198)));
dmc.push_back(floss(934, "Avocado Grn Black", triC(49,57,25)));
dmc.push_back(floss(935, "Avocado Green Dk", triC(66,77,33)));
dmc.push_back(floss(936, "Avocado Grn V Dk", triC(76,88,38)));
dmc.push_back(floss(937, "Avocado Green Md", triC(98,113,51)));
dmc.push_back(floss(938, "Coffee Brown Ult Dk", triC(54,31,14)));
dmc.push_back(floss(939, "Navy Blue Very Dark", triC(27,40,83)));
dmc.push_back(floss(943, "Green Bright Md", triC(61,147,132)));
dmc.push_back(floss(945, "Tawny", triC(251,213,187)));
dmc.push_back(floss(946, "Burnt Orange Med", triC(235,99,7)));
dmc.push_back(floss(947, "Burnt Orange", triC(255,123,77)));
dmc.push_back(floss(948, "Peach Very Light", triC(254,231,218)));
dmc.push_back(floss(950, "Desert Sand Light", triC(238,211,196)));
dmc.push_back(floss(951, "Tawny Light", triC(255,226,207)));
dmc.push_back(floss(954, "Nile Green", triC(136,186,145)));
dmc.push_back(floss(955, "Nile Green Light", triC(162,214,173)));
dmc.push_back(floss(956, "Geranium", triC(255,145,145)));
dmc.push_back(floss(957, "Geranium Pale", triC(253,181,181)));
dmc.push_back(floss(958, "Sea Green Dark", triC(62,182,161)));
dmc.push_back(floss(959, "Sea Green Med", triC(89,199,180)));
dmc.push_back(floss(961, "Dusty Rose Dark", triC(207,115,115)));
dmc.push_back(floss(962, "Dusty Rose Medium", triC(230,138,138)));
dmc.push_back(floss(963, "Dusty Rose Ult Vy Lt", triC(255,215,215)));
dmc.push_back(floss(964, "Sea Green Light", triC(169,226,216)));
dmc.push_back(floss(966, "Jade Ultra Vy Lt", triC(185,215,192)));
dmc.push_back(floss(967, "Apricot Very Light", triC(255,222,213)));
dmc.push_back(floss(970, "Pumpkin Light", triC(247,139,19)));
dmc.push_back(floss(971, "Pumpkin", triC(246,127,0)));
dmc.push_back(floss(972, "Canary Deep", triC(255,181,21)));
dmc.push_back(floss(973, "Canary Bright", triC(255,227,0)));
dmc.push_back(floss(975, "Golden Brown Dk", triC(145,79,18)));
dmc.push_back(floss(976, "Golden Brown Med", triC(194,129,66)));
dmc.push_back(floss(977, "Golden Brown Light", triC(220,156,86)));
dmc.push_back(floss(986, "Forest Green Vy Dk", triC(64,82,48)));
dmc.push_back(floss(987, "Forest Green Dk", triC(88,113,65)));
dmc.push_back(floss(988, "Forest Green Med", triC(115,139,91)));
dmc.push_back(floss(989, "Forest Green", triC(141,166,117)));
dmc.push_back(floss(991, "Aquamarine Dk", triC(71,123,110)));
dmc.push_back(floss(992, "Aquamarine Lt", triC(111,174,159)));
dmc.push_back(floss(993, "Aquamarine Vy Lt", triC(144,192,180)));
dmc.push_back(floss(995, "Electric Blue Dark", triC(38,150,182)));
dmc.push_back(floss(996, "Electric Blue Medium", triC(48,194,236)));
dmc.push_back(floss(3011, "Khaki Green Dk", triC(137,138,88)));
dmc.push_back(floss(3012, "Khaki Green Md", triC(166,167,93)));
dmc.push_back(floss(3013, "Khaki Green Lt", triC(185,185,130)));
dmc.push_back(floss(3021, "Brown Gray Vy Dk", triC(79,75,65)));
dmc.push_back(floss(3022, "Brown Gray Med", triC(142,144,120)));
dmc.push_back(floss(3023, "Brown Gray Light", triC(177,170,151)));
dmc.push_back(floss(3024, "Brown Gray Vy Lt", triC(235,234,231)));
dmc.push_back(floss(3031, "Mocha Brown Vy Dk", triC(75,60,42)));
dmc.push_back(floss(3032, "Mocha Brown Med", triC(179,159,139)));
dmc.push_back(floss(3033, "Mocha Brown Vy Lt", triC(227,216,204)));
dmc.push_back(floss(3041, "Antique Violet Medium", triC(149,111,124)));
dmc.push_back(floss(3042, "Antique Violet Light", triC(183,157,167)));
dmc.push_back(floss(3045, "Yellow Beige Dk", triC(188,150,106)));
dmc.push_back(floss(3046, "Yellow Beige Md", triC(216,188,154)));
dmc.push_back(floss(3047, "Yellow Beige Lt", triC(231,214,193)));
dmc.push_back(floss(3051, "Green Gray Dk", triC(95,102,72)));
dmc.push_back(floss(3052, "Green Gray Md", triC(136,146,104)));
dmc.push_back(floss(3053, "Green Gray", triC(156,164,130)));
dmc.push_back(floss(3064, "Desert Sand", triC(196,142,112)));
dmc.push_back(floss(3072, "Beaver Gray Vy Lt", triC(230,232,232)));
dmc.push_back(floss(3078, "Golden Yellow Vy Lt", triC(253,249,205)));
dmc.push_back(floss(3325, "Baby Blue Light", triC(184,210,230)));
dmc.push_back(floss(3326, "Rose Light", triC(251,173,180)));
dmc.push_back(floss(3328, "Salmon Dark", triC(227,109,109)));
dmc.push_back(floss(3340, "Apricot Med", triC(255,131,111)));
dmc.push_back(floss(3341, "Apricot", triC(252,171,152)));
dmc.push_back(floss(3345, "Hunter Green Dk", triC(27,89,21)));
dmc.push_back(floss(3346, "Hunter Green", triC(64,106,58)));
dmc.push_back(floss(3347, "Yellow Green Med", triC(113,147,92)));
dmc.push_back(floss(3348, "Yellow Green Lt", triC(204,217,177)));
dmc.push_back(floss(3350, "Dusty Rose Ultra Dark", triC(188,67,101)));
dmc.push_back(floss(3354, "Dusty Rose Light", triC(228,166,172)));
dmc.push_back(floss(3362, "Pine Green Dk", triC(94,107,71)));
dmc.push_back(floss(3363, "Pine Green Md", triC(114,130,86)));
dmc.push_back(floss(3364, "Pine Green", triC(131,151,95)));
dmc.push_back(floss(3371, "Black Brown", triC(30,17,8)));
dmc.push_back(floss(3607, "Plum Light", triC(197,73,137)));
dmc.push_back(floss(3608, "Plum Very Light", triC(234,156,196)));
dmc.push_back(floss(3609, "Plum Ultra Light", triC(244,174,213)));
dmc.push_back(floss(3685, "Mauve Very Dark", triC(136,21,49)));
dmc.push_back(floss(3687, "Mauve", triC(201,107,112)));
dmc.push_back(floss(3688, "Mauve Medium", triC(231,169,172)));
dmc.push_back(floss(3689, "Mauve Light", triC(251,191,194)));
dmc.push_back(floss(3705, "Melon Dark", triC(255,121,146)));
dmc.push_back(floss(3706, "Melon Medium", triC(255,173,188)));
dmc.push_back(floss(3708, "Melon Light", triC(255,203,213)));
dmc.push_back(floss(3712, "Salmon Medium", triC(241,135,135)));
dmc.push_back(floss(3713, "Salmon Very Light", triC(255,226,226)));
dmc.push_back(floss(3716, "Dusty Rose Med Vy Lt", triC(255,189,189)));
dmc.push_back(floss(3721, "Shell Pink Dark", triC(161,75,81)));
dmc.push_back(floss(3722, "Shell Pink Med", triC(188,108,100)));
dmc.push_back(floss(3726, "Antique Mauve Dark", triC(155,91,102)));
dmc.push_back(floss(3727, "Antique Mauve Light", triC(219,169,178)));
dmc.push_back(floss(3731, "Dusty Rose Very Dark", triC(218,103,131)));
dmc.push_back(floss(3733, "Dusty Rose", triC(232,135,155)));
dmc.push_back(floss(3740, "Antique Violet Dark", triC(120,87,98)));
dmc.push_back(floss(3743, "Antique Violet Vy Lt", triC(215,203,211)));
dmc.push_back(floss(3746, "Blue Violet Dark", triC(119,107,152)));
dmc.push_back(floss(3747, "Blue Violet Vy Lt", triC(211,215,237)));
dmc.push_back(floss(3750, "Antique Blue Very Dk", triC(56,76,94)));
dmc.push_back(floss(3752, "Antique Blue Very Lt", triC(199,209,219)));
dmc.push_back(floss(3753, "Antique Blue Ult Vy Lt", triC(219,226,233)));
dmc.push_back(floss(3755, "Baby Blue", triC(147,180,206)));
dmc.push_back(floss(3756, "Baby Blue Ult Vy Lt", triC(238,252,252)));
dmc.push_back(floss(3760, "Wedgewood Med", triC(62,133,162)));
dmc.push_back(floss(3761, "Sky Blue Light", triC(172,216,226)));
dmc.push_back(floss(3765, "Peacock Blue Vy Dk", triC(52,127,140)));
dmc.push_back(floss(3766, "Peacock Blue Light", triC(153,207,217)));
dmc.push_back(floss(3768, "Gray Green Dark", triC(101,127,127)));
dmc.push_back(floss(3770, "Tawny Vy Light", triC(255,238,227)));
dmc.push_back(floss(3771, "Terra Cotta Ult Vy Lt", triC(244,187,169)));
dmc.push_back(floss(3772, "Desert Sand Vy Dk", triC(160,108,80)));
dmc.push_back(floss(3773, "Desert Sand Dark", triC(182,117,82)));
dmc.push_back(floss(3774, "Desert Sand Vy Lt", triC(243,225,215)));
dmc.push_back(floss(3776, "Mahogany Light", triC(207,121,57)));
dmc.push_back(floss(3777, "Terra Cotta Vy Dk", triC(134,48,34)));
dmc.push_back(floss(3778, "Terra Cotta Light", triC(217,137,120)));
dmc.push_back(floss(3779, "Rosewood Ult Vy Lt", triC(248,202,200)));
dmc.push_back(floss(3781, "Mocha Brown Dk", triC(107,87,67)));
dmc.push_back(floss(3782, "Mocha Brown Lt", triC(210,188,166)));
dmc.push_back(floss(3787, "Brown Gray Dark", triC(98,93,80)));
dmc.push_back(floss(3790, "Beige Gray Ult Dk", triC(127,106,85)));
dmc.push_back(floss(3799, "Pewter Gray Vy Dk", triC(66,66,66)));
dmc.push_back(floss(3801, "Melon Very Dark", triC(231,73,103)));
dmc.push_back(floss(3802, "Antique Mauve Vy Dk", triC(113,65,73)));
dmc.push_back(floss(3803, "Mauve Dark", triC(171,51,87)));
dmc.push_back(floss(3804, "Cyclamen Pink Dark", triC(224,40,118)));
dmc.push_back(floss(3805, "Cyclamen Pink", triC(243,71,139)));
dmc.push_back(floss(3806, "Cyclamen Pink Light", triC(255,140,174)));
dmc.push_back(floss(3807, "Cornflower Blue", triC(96,103,140)));
dmc.push_back(floss(3808, "Turquoise Ult Vy Dk", triC(54,105,112)));
dmc.push_back(floss(3809, "Turquoise Vy Dark", triC(63,124,133)));
dmc.push_back(floss(3810, "Turquoise Dark", triC(72,142,154)));
dmc.push_back(floss(3811, "Turquoise Very Light", triC(188,227,230)));
dmc.push_back(floss(3812, "Sea Green Vy Dk", triC(47,140,132)));
dmc.push_back(floss(3813, "Blue Green Lt", triC(178,212,189)));
dmc.push_back(floss(3814, "Aquamarine", triC(80,139,125)));
dmc.push_back(floss(3815, "Celadon Green Dk", triC(71,119,89)));
dmc.push_back(floss(3816, "Celadon Green", triC(101,165,125)));
dmc.push_back(floss(3817, "Celadon Green Lt", triC(153,195,170)));
dmc.push_back(floss(3818, "Emerald Grn Ult V Dk", triC(17,90,59)));
dmc.push_back(floss(3819, "Moss Green Lt", triC(224,232,104)));
dmc.push_back(floss(3820, "Straw Dark", triC(223,182,95)));
dmc.push_back(floss(3821, "Straw", triC(243,206,117)));
dmc.push_back(floss(3822, "Straw Light", triC(246,220,152)));
dmc.push_back(floss(3823, "Yellow Ultra Pale", triC(255,253,227)));
dmc.push_back(floss(3824, "Apricot Light", triC(254,205,194)));
dmc.push_back(floss(3825, "Pumpkin Pale", triC(253,189,150)));
dmc.push_back(floss(3826, "Golden Brown", triC(173,114,57)));
dmc.push_back(floss(3827, "Golden Brown Pale", triC(247,187,119)));
dmc.push_back(floss(3828, "Hazelnut Brown", triC(183,139,97)));
dmc.push_back(floss(3829, "Old Gold Vy Dark", triC(169,130,4)));
dmc.push_back(floss(3830, "Terra Cotta", triC(185,85,68)));
dmc.push_back(floss(3831, "Raspberry Dark", triC(179,47,72)));
dmc.push_back(floss(3832, "Raspberry Medium", triC(219,85,110)));
dmc.push_back(floss(3833, "Raspberry Light", triC(234,134,153)));
dmc.push_back(floss(3834, "Grape Dark", triC(114,55,93)));
dmc.push_back(floss(3835, "Grape Medium", triC(148,96,131)));
dmc.push_back(floss(3836, "Grape Light", triC(186,145,170)));
dmc.push_back(floss(3837, "Lavender Ultra Dark", triC(108,58,110)));
dmc.push_back(floss(3838, "Lavender Blue Dark", triC(92,114,148)));
dmc.push_back(floss(3839, "Lavender Blue Med", triC(123,142,171)));
dmc.push_back(floss(3840, "Lavender Blue Light", triC(176,192,218)));
dmc.push_back(floss(3841, "Baby Blue Pale", triC(205,223,237)));
dmc.push_back(floss(3842, "Wedgewood Vry Dk", triC(50,102,124)));
dmc.push_back(floss(3843, "Electric Blue", triC(20,170,208)));
dmc.push_back(floss(3844, "Turquoise Bright Dark", triC(18,174,186)));
dmc.push_back(floss(3845, "Turquoise Bright Med", triC(4,196,202)));
dmc.push_back(floss(3846, "Turquoise Bright Light", triC(6,227,230)));
dmc.push_back(floss(3847, "Teal Green Dark", triC(52,125,117)));
dmc.push_back(floss(3848, "Teal Green Med", triC(85,147,146)));
dmc.push_back(floss(3849, "Teal Green Light", triC(82,179,164)));
dmc.push_back(floss(3850, "Green Bright Dk", triC(55,132,119)));
dmc.push_back(floss(3851, "Green Bright Lt", triC(73,179,161)));
dmc.push_back(floss(3852, "Straw Very Dark", triC(205,157,55)));
dmc.push_back(floss(3853, "Autumn Gold Dk", triC(242,151,70)));
dmc.push_back(floss(3854, "Autumn Gold Med", triC(242,175,104)));
dmc.push_back(floss(3855, "Autumn Gold Lt", triC(250,211,150)));
dmc.push_back(floss(3856, "Mahogany Ult Vy Lt", triC(255,211,181)));
dmc.push_back(floss(3857, "Rosewood Dark", triC(104,37,26)));
dmc.push_back(floss(3858, "Rosewood Med", triC(150,74,63)));
dmc.push_back(floss(3859, "Rosewood Light", triC(186,139,124)));
dmc.push_back(floss(3860, "Cocoa", triC(125,93,87)));
dmc.push_back(floss(3861, "Cocoa Light", triC(166,136,129)));
dmc.push_back(floss(3862, "Mocha Beige Dark", triC(138,110,78)));
dmc.push_back(floss(3863, "Mocha Beige Med", triC(164,131,92)));
dmc.push_back(floss(3864, "Mocha Beige Light", triC(203,182,156)));
dmc.push_back(floss(3865, "Winter White", triC(249,247,241)));
dmc.push_back(floss(3866, "Mocha Brn Ult Vy Lt", triC(250,246,240)));
return dmc;
}
QVector<floss> initializePre0_9_5_30DMC() {
QVector<floss> dmc;
dmc.reserve(DMC_PRE_0_9_5_30_COUNT);
/*produced with
cat dmc_color_list.txt| perl -e '{while(<>) {($c,$n,$r,$g,$b,$h) = \
m/^(-?[0-9]+)(?: |\t)+([a-zA-Z -.]+)(?: |\t)+([0-9]+)(?: |\t)+([0-9]+)(?: |\t)+([0-9]+)/; \
print " dmc.push_back(floss($c, \"$n\", triC($r,$g,$b)));\n";}}' > out
// cat dmc_color_list.txt| perl -e \
// '{while(<>) {($c,$n,$r,$g,$b,$h) = split(/\t/,$_); \
// print " dmc.push_back(floss($c, \"$n\", triC($r,$g,$b)));\n";}}' > out
*/
dmc.push_back(floss(WHITE_CODE, "White", triC(252,251,248)));
dmc.push_back(floss(ECRU_CODE, "Ecru", triC(240,234,218)));
dmc.push_back(floss(000, "Blanc White", triC(255,255,255)));
dmc.push_back(floss(208, "Lavender-VY DK", triC(148,91,128)));
dmc.push_back(floss(209, "Lavender-DK", triC(206,148,186)));
dmc.push_back(floss(210, "Lavender-MD", triC(236,207,225)));
dmc.push_back(floss(211, "Lavender-LT", triC(243,218,228)));
dmc.push_back(floss(221, "Shell Pink-VY DK", triC(156,41,74)));
dmc.push_back(floss(223, "Shell Pink-LT", triC(219,128,115)));
dmc.push_back(floss(224, "Shell Pink-VY LT", triC(255,199,176)));
dmc.push_back(floss(225, "Shell Pink-ULT VY L", triC(255,240,228)));
dmc.push_back(floss(300, "Mahogany-VY DK", triC(143,57,38)));
dmc.push_back(floss(301, "Mahogany-MD", triC(209,102,84)));
dmc.push_back(floss(304, "Christmas Red-MD", triC(188,0,97)));
dmc.push_back(floss(307, "Lemon", triC(255,231,109)));
dmc.push_back(floss(309, "Rose-DP", triC(214,43,91)));
dmc.push_back(floss(310, "Black", triC(0,0,0)));
dmc.push_back(floss(311, "Navy Blue-MD", triC(0,79,97)));
dmc.push_back(floss(312, "Navy Blue-LT", triC(58,84,103)));
dmc.push_back(floss(315, "Antique Mauve-VY DK", triC(163,90,91)));
dmc.push_back(floss(316, "Antique Mauve-MD", triC(220,141,141)));
dmc.push_back(floss(317, "Pewter Grey", triC(167,139,136)));
dmc.push_back(floss(318, "Steel Grey-LT", triC(197,198,190)));
dmc.push_back(floss(319, "Pistachio Grn-VY DK", triC(85,95,82)));
dmc.push_back(floss(320, "Pistachio Green-MD", triC(138,153,120)));
dmc.push_back(floss(321, "Christmas Red", triC(231,18,97)));
dmc.push_back(floss(322, "Navy Blue-VY LT", triC(81,109,135)));
dmc.push_back(floss(326, "Rose-VY DP", triC(188,22,65)));
dmc.push_back(floss(327, "Violet-DK", triC(61,0,103)));
dmc.push_back(floss(333, "Blue Violet-VY DK", triC(127,84,130)));
dmc.push_back(floss(334, "Baby Blue-MD", triC(115,140,170)));
dmc.push_back(floss(335, "Rose", triC(219,36,79)));
dmc.push_back(floss(336, "Navy Blue", triC(36,73,103)));
dmc.push_back(floss(340, "Blue Violet-MD", triC(162,121,164)));
dmc.push_back(floss(341, "Blue Violet-LT", triC(145,180,197)));
dmc.push_back(floss(347, "Salmon-VY DK", triC(194,36,67)));
dmc.push_back(floss(349, "Coral-DK", triC(220,61,91)));
dmc.push_back(floss(350, "Coral-MD", triC(237,69,90)));
dmc.push_back(floss(351, "Coral", triC(255,128,135)));
dmc.push_back(floss(352, "Coral-LT", triC(255,157,144)));
dmc.push_back(floss(353, "Peach Flesh", triC(255,196,184)));
dmc.push_back(floss(355, "Terra Cotta-DK", triC(189,73,47)));
dmc.push_back(floss(356, "Terra Cotta-MD", triC(226,114,91)));
dmc.push_back(floss(367, "Pistachio Green-DK", triC(95,112,91)));
dmc.push_back(floss(368, "Pistachio Green-LT", triC(181,206,162)));
dmc.push_back(floss(369, "Pistachio Grn-VY LT", triC(243,250,209)));
dmc.push_back(floss(370, "Mustard-MD", triC(184,138,87)));
dmc.push_back(floss(371, "Mustard", triC(196,155,100)));
dmc.push_back(floss(372, "Mustard-LT", triC(203,162,107)));
dmc.push_back(floss(400, "Mahogany-DK", triC(157,60,39)));
dmc.push_back(floss(402, "Mahogany-VY LT", triC(255,190,164)));
dmc.push_back(floss(407, "Sportsman Flsh-VY D", triC(194,101,76)));
dmc.push_back(floss(413, "Pewter Grey-DK", triC(109,95,95)));
dmc.push_back(floss(414, "Steel Grey-DK", triC(167,139,136)));
dmc.push_back(floss(415, "Pearl Grey", triC(221,221,218)));
dmc.push_back(floss(420, "Hazel Nut Brown-DK", triC(140,91,43)));
dmc.push_back(floss(422, "Hazel Nut Brown-LT", triC(237,172,123)));
dmc.push_back(floss(433, "Brown-MD", triC(151,84,20)));
dmc.push_back(floss(434, "Brown-LT", triC(178,103,70)));
dmc.push_back(floss(435, "Brown-VY LT", triC(187,107,57)));
dmc.push_back(floss(436, "Tan", triC(231,152,115)));
dmc.push_back(floss(437, "Tan-LT", triC(238,171,121)));
dmc.push_back(floss(444, "Lemon-DK", triC(255,176,0)));
dmc.push_back(floss(445, "Lemon-LT", triC(255,255,190)));
dmc.push_back(floss(451, "Shell Grey-DK", triC(179,151,143)));
dmc.push_back(floss(452, "Shell Grey-MD", triC(210,185,175)));
dmc.push_back(floss(453, "Shell Grey-LT", triC(235,207,185)));
dmc.push_back(floss(469, "Avocado Green", triC(116,114,92)));
dmc.push_back(floss(470, "Avocado Green-LT", triC(133,143,108)));
dmc.push_back(floss(471, "Avocado Green-VY LT", triC(176,187,140)));
dmc.push_back(floss(472, "Avocado Green-ULT L", triC(238,255,182)));
dmc.push_back(floss(498, "Christmas Red-LT", triC(187,0,97)));
dmc.push_back(floss(500, "Blue Green-VY DK", triC(43,57,41)));
dmc.push_back(floss(501, "Blue Green-DK", triC(67,85,73)));
dmc.push_back(floss(502, "Blue Green", triC(134,158,134)));
dmc.push_back(floss(503, "Blue Green-MD", triC(195,206,183)));
dmc.push_back(floss(504, "Blue Green-LT", triC(206,221,193)));
dmc.push_back(floss(517, "Wedgewood-MD", triC(16,127,135)));
dmc.push_back(floss(518, "Wedgewood-LT", triC(102,148,154)));
dmc.push_back(floss(519, "Sky Blue", triC(194,209,207)));
dmc.push_back(floss(520, "Fern Green-DK", triC(55,73,18)));
dmc.push_back(floss(522, "Fern Green", triC(159,169,142)));
dmc.push_back(floss(523, "Fern Green-LT", triC(172,183,142)));
dmc.push_back(floss(524, "Fern Green-VY LT", triC(205,182,158)));
dmc.push_back(floss(535, "Ash Grey-VY LT", triC(85,85,89)));
dmc.push_back(floss(543, "Beige Brown-UL VY L", triC(239,214,188)));
dmc.push_back(floss(550, "Violet-VY LT", triC(109,18,97)));
dmc.push_back(floss(552, "Violet-MD", triC(146,85,130)));
dmc.push_back(floss(553, "Violet", triC(160,100,146)));
dmc.push_back(floss(554, "Violet-LT", triC(243,206,225)));
dmc.push_back(floss(561, "Jade-VY DK", triC(59,96,76)));
dmc.push_back(floss(562, "Jade-MD", triC(97,134,97)));
dmc.push_back(floss(563, "Jade-LT", triC(182,212,180)));
dmc.push_back(floss(564, "Jade-VY LT", triC(214,230,204)));