voice.js 116 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065
  1. /**
  2. * Copyright (c) 2006-2015, JGraph Ltd
  3. * Copyright (c) 2006-2015, Gaudenz Alder
  4. */
  5. /**
  6. * Voice plugin for draw.io
  7. *
  8. * Documentation:
  9. *
  10. * https://support.draw.io/questions/9666655/how-to-use-the-voice-plugin
  11. *
  12. * TODO: Use grammer https://msdn.microsoft.com/en-us/library/ee800145.aspx
  13. */
  14. Draw.loadPlugin(function(ui) {
  15. var micImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA5UlEQVR4Xr3SMYrCQBTGcSfIQiAgRIS9hOANBCurPUAuIAp7A7FVsFkIbLGYA9gKtoKNYG3jll5AFNKG518YMD6SISD4wY9J4MvkMYwRkZqOMSZkifGFe1b4pnvW3TqK8oMo14twxUgXPRSlDxU7TcUNPqATlG7wCi93cA2Iq2x7l7IJsgofB6UTiEjKklFqsabQSdFA5jqDAzrYQGeNNv5d9yDBEAME6NreFmP8Yuma4A8hFpiLSFNAYYYYn0jwCIUnxMcER4h1whS+7hseXKcu9ifGeQ+qeO8GjN7DPve+Q6+oewPhmE63Qfsb6AAAAABJRU5ErkJggg==';
  16. // Speech recognition never supported without synthesis
  17. if (!('speechSynthesis' in window))
  18. {
  19. ui.showError('Error', 'Speech output not supported in this browser.', 'OK');
  20. return;
  21. }
  22. else
  23. {
  24. // Triggers loading of voices
  25. speechSynthesis.getVoices();
  26. }
  27. // Do no use in chromeless mode
  28. if (ui.editor.chromeless || ui.menubar == null)
  29. {
  30. return;
  31. }
  32. // Mic PNG image
  33. var outputImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2J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oglaSZOR/0DvRssIVUOQKjEASsxoGoQDmjT/oDUaOdRUzbkASrsMdzMIwSe2cBASXIjtQpyvHYQvzGeLQDkOwDG8w8p2A4GJEJre5Vk5DFBbZ7yG6D+PYL3oW0WwCgh/Re4i4t8PEE2QOxqikDN2AbuwQKr4WU4E4S3wOfw1CWtktFEI5ZDTu5y34DMvPIQl24dTHL9f2CRfQAB/wAFXwlE3gOO990Im95GmcLmQGEpyHTB6AI2xJKL4r7xYmYdX1betpT0kzoT1yhdhyY71aeW4rcyNySJswTVWXWkklcq5N1AETsCAuqkn9+hZ09RXoh1e4hm2CR//7mJqlB8xjCgXyHzXaDzETLONLgAEAxwd5e6Mz+S4AAAAASUVORK5CYII=';
  34. // True if we're on ChromOs
  35. var chromeOs = /\bCrOS\b/.test(navigator.userAgent);
  36. // Maximum length of message to speak
  37. var maxMessageLength = 50;
  38. // Maximum length of the label before the cell
  39. // is called by its shapename
  40. var maxLabelLength = 15;
  41. // Maximum length of output queue.
  42. var maxQueueLength = 3;
  43. // Specifies if speech output is enabled.
  44. var speechOutputEnabled = true;
  45. // Specifies if speech output is enabled.
  46. var speechInputEnabled = true;
  47. // Last message is never repeated
  48. var lastMessage = null;
  49. // Timestamp of last message
  50. var lastMessageTimestamp = null;
  51. // Sets global recognition language
  52. var lang = 'en-US';
  53. // Caches action names
  54. var actions = null;
  55. var actionList = null;
  56. // Caches shape names
  57. var shapeList = null;
  58. // Last inserted cell
  59. var lastInserted = null;
  60. // Current voice
  61. var currentVoice = 10;
  62. // Current recognition thread
  63. var recognizing = null;
  64. // Adds menu
  65. mxResources.parse('voiceType=Voice Type');
  66. mxResources.parse('speechOutput=Speech Output');
  67. mxResources.parse('speechListen=Listen');
  68. mxResources.parse('speechInstalled=Start with draw.io');
  69. mxResources.parse('speechListenContinuous=Start/Stop Listen');
  70. mxResources.parse('speechHint=Hint');
  71. mxResources.parse('speechHelp=Help');
  72. mxResources.parse('speechQuit=Quit');
  73. // Installs footer click handler
  74. function getOrCreateVoiceButton(ui)
  75. {
  76. if (ui.voiceButton == null)
  77. {
  78. ui.voiceButton = document.createElement('div');
  79. ui.voiceButton.className = 'geBtn';
  80. ui.voiceButton.style.width = '140px';
  81. ui.voiceButton.style.minWidth = '140px';
  82. ui.voiceButton.style.textOverflow = 'ellipsis';
  83. ui.voiceButton.style.overflowX = 'hidden';
  84. ui.voiceButton.style.fontWeight = 'bold';
  85. ui.voiceButton.style.textAlign = 'center';
  86. ui.voiceButton.style.display = 'inline-block';
  87. ui.voiceButton.style.padding = '0 10px 0 10px';
  88. ui.voiceButton.style.marginTop = '-4px';
  89. ui.voiceButton.style.height = '28px';
  90. ui.voiceButton.style.lineHeight = '28px';
  91. ui.voiceButton.style.color = '#235695';
  92. if (ui.buttonContainer.firstChild != null)
  93. {
  94. ui.buttonContainer.insertBefore(ui.voiceButton, ui.buttonContainer.firstChild);
  95. }
  96. else
  97. {
  98. ui.buttonContainer.appendChild(ui.voiceButton);
  99. }
  100. }
  101. return ui.voiceButton;
  102. };
  103. var td = getOrCreateVoiceButton(ui);
  104. if (td != null)
  105. {
  106. // Installs listener for start/stop listen
  107. mxEvent.addListener(td, 'click', function(evt)
  108. {
  109. App.listen(true);
  110. });
  111. }
  112. function setPluginInstalled(value)
  113. {
  114. if (mxSettings != null)
  115. {
  116. var plugins = mxSettings.getPlugins();
  117. var installed = mxUtils.indexOf(plugins, '/plugins/voice.js') >= 0;
  118. if (value != installed)
  119. {
  120. if (installed)
  121. {
  122. mxUtils.remove('/plugins/voice.js', plugins);
  123. }
  124. else
  125. {
  126. plugins.push('/plugins/voice.js');
  127. }
  128. mxSettings.setPlugins(plugins);
  129. mxSettings.save();
  130. }
  131. }
  132. };
  133. // Shows initial status message if only output is enable
  134. if (!('webkitSpeechRecognition' in window))
  135. {
  136. if (td != null)
  137. {
  138. td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + outputImage + '"/> Ready';
  139. td.style.color = '#235695';
  140. }
  141. }
  142. function updateStatusMessage()
  143. {
  144. if ('webkitSpeechRecognition' in window)
  145. {
  146. if (td != null)
  147. {
  148. if (recognizing != null)
  149. {
  150. td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage + '"/> Listening...';
  151. td.setAttribute('title', 'Click to Stop (Ctrl+O)');
  152. td.style.color = 'darkGray';
  153. }
  154. else
  155. {
  156. td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage + '"/> Click to Speak';
  157. td.setAttribute('title', 'Click to Speak (Ctrl+O)');
  158. td.style.color = '#235695';
  159. }
  160. }
  161. }
  162. };
  163. updateStatusMessage();
  164. var action = ui.actions.addAction('speechOutput', function()
  165. {
  166. speechOutputEnabled = !speechOutputEnabled;
  167. }, null, null, 'Ctrl/AltGr+Shift+Esc');
  168. action.setToggleAction(true);
  169. action.setSelectedCallback(function() { return speechOutputEnabled; });
  170. var action = ui.actions.addAction('speechInstalled', function()
  171. {
  172. setPluginInstalled();
  173. });
  174. action.setToggleAction(true);
  175. action.setSelectedCallback(function() { return mxUtils.indexOf(mxSettings.getPlugins(), '/plugins/voice.js') >= 0; });
  176. ui.actions.addAction('speechListen', function()
  177. {
  178. App.listen();
  179. }, null, null, 'Ctrl/AltGr+Esc');
  180. ui.actions.addAction('speechListenContinuous', function()
  181. {
  182. App.listen(true);
  183. }, null, null, 'Ctrl+O');
  184. ui.actions.addAction('speechHint', function()
  185. {
  186. App.sayHint();
  187. }, null, null, 'Shift+Esc');
  188. ui.actions.addAction('speechHelp', function()
  189. {
  190. window.open('https://support.draw.io/questions/9666655/how-to-use-the-voice-plugin');
  191. });
  192. // Hijacks the settings for storing current voice
  193. if (mxSettings != null)
  194. {
  195. var tmp = mxSettings.settings.voice;
  196. if (tmp != null)
  197. {
  198. currentVoice = parseInt(tmp);
  199. }
  200. }
  201. ui.menus.put('voiceType', new Menu(mxUtils.bind(this, function(menu, parent)
  202. {
  203. var voices = speechSynthesis.getVoices();
  204. if (voices.length == 0)
  205. {
  206. menu.addItem('Loading...', null, function() {}, parent, null, false);
  207. }
  208. else
  209. {
  210. for (var i = 0; i < voices.length; i++)
  211. {
  212. (function(index)
  213. {
  214. var item = menu.addItem(voices[index].name + ' (' + voices[i].lang + ')', null, function()
  215. {
  216. currentVoice = index;
  217. App.say('hello');
  218. if (mxSettings != null)
  219. {
  220. mxSettings.settings.voice = currentVoice;
  221. mxSettings.save();
  222. }
  223. }, parent);
  224. if (index == currentVoice)
  225. {
  226. menu.addCheckmark(item, Editor.checkmarkImage);
  227. }
  228. })(i);
  229. }
  230. if (!mxClient.IS_QUIRKS)
  231. {
  232. parent.div.style.overflowX = 'hidden';
  233. parent.div.style.overflowY = 'auto';
  234. parent.div.style.maxHeight = '100%';
  235. // Workaround for document scrollbars with 100% max height in Chrome
  236. parent.div.style.marginBottom = '-20px';
  237. }
  238. }
  239. })));
  240. ui.actions.addAction('speechQuit', function()
  241. {
  242. // Hides UI
  243. speechOutputEnabled = false;
  244. menu.style.display = 'none';
  245. td.style.display = 'none';
  246. });
  247. var menu = ui.menubar.addMenu('Voice', function(menu, parent)
  248. {
  249. ui.menus.addSubmenu('voiceType', menu, parent);
  250. ui.menus.addMenuItems(menu, ['-', 'speechOutput', 'speechHint', '-', 'speechListen',
  251. 'speechListenContinuous', '-', 'speechInstalled',
  252. 'speechHelp', '-', 'speechQuit']);
  253. });
  254. // Inserts voice menu before help menu
  255. var menu = menu.parentNode.insertBefore(menu, menu.previousSibling.previousSibling.previousSibling);
  256. function insertShape(shape, done)
  257. {
  258. var searchTerm = mxUtils.trim(shape);
  259. ui.sidebar.searchEntries(searchTerm, 1, 0, function(results, len, more)
  260. {
  261. if (results.length > 0)
  262. {
  263. var elt = results[0]();
  264. // Click is blocked, must use mousedown/-up sequence
  265. // LATER: Use touchstart or pointerEvents depending on system
  266. dispatchEvent(elt, mouseEvent('mousedown', 1, 50, 1, 50));
  267. dispatchEvent(document.body, mouseEvent('mouseup', 1, 50, 1, 50));
  268. }
  269. else
  270. {
  271. App.say('{1} not found', [searchTerm]);
  272. }
  273. if (done != null)
  274. {
  275. done();
  276. }
  277. });
  278. };
  279. // http://stackoverflow.com/questions/11919065/sort-an-array-by-the-levenshtein-distance-with-best-performance-in-javascript
  280. //http://www.merriampark.com/ld.htm, http://www.mgilleland.com/ld/ldjavascript.htm, Damerau–Levenshtein distance (Wikipedia)
  281. var levenshteinDist = function(s, t) {
  282. var d = []; //2d matrix
  283. // Step 1
  284. var n = s.length;
  285. var m = t.length;
  286. if (n == 0) return m;
  287. if (m == 0) return n;
  288. //Create an array of arrays in javascript (a descending loop is quicker)
  289. for (var i = n; i >= 0; i--) d[i] = [];
  290. // Step 2
  291. for (var i = n; i >= 0; i--) d[i][0] = i;
  292. for (var j = m; j >= 0; j--) d[0][j] = j;
  293. // Step 3
  294. for (var i = 1; i <= n; i++) {
  295. var s_i = s.charAt(i - 1);
  296. // Step 4
  297. for (var j = 1; j <= m; j++) {
  298. //Check the jagged ld total so far
  299. if (i == j && d[i][j] > 4) return n;
  300. var t_j = t.charAt(j - 1);
  301. var cost = (s_i == t_j) ? 0 : 1; // Step 5
  302. //Calculate the minimum
  303. var mi = d[i - 1][j] + 1;
  304. var b = d[i][j - 1] + 1;
  305. var c = d[i - 1][j - 1] + cost;
  306. if (b < mi) mi = b;
  307. if (c < mi) mi = c;
  308. d[i][j] = mi; // Step 6
  309. //Damerau transposition
  310. if (i > 1 && j > 1 && s_i == t.charAt(j - 2) && s.charAt(i - 2) == t_j) {
  311. d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
  312. }
  313. }
  314. }
  315. // Step 7
  316. return d[n][m];
  317. }
  318. function naiveHammingDistance(str1, str2) {
  319. var dist = 0;
  320. str1 = str1.toLowerCase();
  321. str2 = str2.toLowerCase();
  322. for(var i = 0; i < str1.length; i++)
  323. {
  324. if (str2[i] && str2[i] !== str1[i])
  325. {
  326. dist += Math.abs(str1.charCodeAt(i) - str2.charCodeAt(i)) + Math.abs(str2.indexOf( str1[i] )) * 2;
  327. }
  328. else if (!str2[i])
  329. {
  330. // If there's no letter in the comparing string
  331. dist += dist;
  332. }
  333. }
  334. return dist;
  335. };
  336. function getBestWord(str1, words, useLevenshteinDist)
  337. {
  338. useLevenshteinDist = (useLevenshteinDist != null) ? useLevenshteinDist : true;
  339. var bestWord = words[0];
  340. var minDist = ((useLevenshteinDist) ? levenshteinDist(str1, bestWord) :
  341. naiveHammingDistance(str1, bestWord));
  342. for (var i = 1; i < words.length; i++)
  343. {
  344. var tmp = ((useLevenshteinDist) ? levenshteinDist(str1, words[i]) :
  345. ((str1 == words[i]) ? 0 : naiveHammingDistance(str1, words[i])));
  346. if (tmp < minDist || (tmp == minDist &&
  347. str1.length > bestWord.length &&
  348. bestWord.length < words[i].length))
  349. {
  350. bestWord = words[i];
  351. minDist = tmp;
  352. }
  353. if (bestWord == str1)
  354. {
  355. break;
  356. }
  357. }
  358. return bestWord;
  359. }
  360. function mouseEvent(type, sx, sy, cx, cy, shift)
  361. {
  362. var evt;
  363. var e = {
  364. bubbles: true,
  365. cancelable: (type != "mousemove"),
  366. view: window,
  367. detail: 0,
  368. screenX: sx,
  369. screenY: sy,
  370. clientX: cx,
  371. clientY: cy,
  372. ctrlKey: false,
  373. altKey: false,
  374. shiftKey: (shift != null) ? shift : false,
  375. metaKey: false,
  376. button: 0,
  377. relatedTarget: undefined
  378. };
  379. if (typeof( document.createEvent ) == "function")
  380. {
  381. evt = document.createEvent("MouseEvents");
  382. evt.initMouseEvent(type,
  383. e.bubbles, e.cancelable, e.view, e.detail,
  384. e.screenX, e.screenY, e.clientX, e.clientY,
  385. e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
  386. e.button, document.body.parentNode);
  387. }
  388. else if (document.createEventObject)
  389. {
  390. evt = document.createEventObject();
  391. for (prop in e)
  392. {
  393. evt[prop] = e[prop];
  394. }
  395. evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
  396. }
  397. return evt;
  398. };
  399. function dispatchEvent (el, evt)
  400. {
  401. if (el.dispatchEvent)
  402. {
  403. el.dispatchEvent(evt);
  404. }
  405. else if (el.fireEvent)
  406. {
  407. el.fireEvent('on' + type, evt);
  408. }
  409. return evt;
  410. };
  411. var keyHandlerEscape = ui.keyHandler.escape;
  412. ui.keyHandler.escape = function(evt)
  413. {
  414. if ((!mxClient.IS_MAC && mxEvent.isAltDown(evt)) ||
  415. ((mxClient.IS_MAC || chromeOs) && mxEvent.isControlDown(evt)))
  416. {
  417. if (speechOutputEnabled)
  418. {
  419. App.say('Speech output disabled');
  420. }
  421. speechOutputEnabled = !speechOutputEnabled;
  422. if (speechOutputEnabled)
  423. {
  424. App.say('Speech output enabled');
  425. }
  426. mxEvent.consume(evt);
  427. }
  428. else if (mxEvent.isShiftDown(evt))
  429. {
  430. App.sayHint();
  431. mxEvent.consume(evt);
  432. }
  433. else
  434. {
  435. keyHandlerEscape.apply(this, arguments);
  436. }
  437. };
  438. ui.keyHandler.bindAction(32, true, 'speechListen'); // Ctrl+SPACE
  439. ui.keyHandler.bindAction(79, true, 'speechListenContinuous'); // Ctrl+O
  440. /**
  441. * Plays a beep.
  442. */
  443. var beep = new Audio('data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67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xEhBQMRU8j/12UIRhzSaUdQ+rQU5kGeFxm+hb1oh6pWWmv3uvmReDl0UnvtapVaIzo1jZbf/pD6ElLqSX+rUmOQNpJFa/r+sa4e/pBlAABoAAAAA3CUgShLdGIxsY7AUABPRrgCABdDuQ5GC7DqPQCgbbJUAoRSUj+NIEig0YfyWUho1VBBBA//uQZB4ABZx5zfMakeAAAAmwAAAAF5F3P0w9GtAAACfAAAAAwLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZTGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Kf/X/8g/8P+Ov7l/a39UP2O/ev9S/7X/iH/Xv+7/0MAmgDRAC4BsAEUAkQCoQLAArICgwIqArQBOAEKAbcARwC//5H/RP/0/sX+bf4p/gD+AP4k/lL+gf4M/17/jP+6/zkAlgDFAPMAZgHQAf4BLQJAAjUCBwLYAX8B+wDNAH4AIQDF/5T/MP+3/on+Wv4Y/sP98v0g/mv+9v4s/1r/mP8jAGQAkwDFAFABngHNAfsBUwJnAjkCCgKUAS0B/gChAEUA9f/G/5j/Uv/7/sz+nv5w/kH+bv6d/tb+M/9o/63/BAAyAGEAnwD8ACwBWwGTAfABAALrAbkBXAEfAfEAwgBoACYA+P/K/3b/Lf/+/tD+gv5A/kD+a/6y/gj/Nv9l/6b/AQAvAF0AjAC6AOkAFwFGAXQBgAFuAUABEQHjALQAhgBXACkA/P/N/5//cP9C/xP/5f7A/sD+Dv9A/0T/c//C/wAAAAArAHQAwADAAOUAKAGAAYABgAFkAQcBAAHmALAAUwBAACwA/v+h/4D/dP9F/0D/QP9A/0D/ZP+A/4H/r//e/wAAAAAoAFYAgACAAKIA0AD/AAAB4wDAAMAAmABqAEAAQAAeAPH/w//A/6b/gP+A/1r/QP9E/3L/gP+P/73/7P8AAAgANgBlAIAAgQCwAN4AAAEAAQAB5wDAAMAAnABtAEAAQAAiAAAAAAAAAOn/wP/A/8D/wP/A/8D/wP/L//r/AAAAAAQAMwBAAEAAQABsAIAAgACAAIAAgACAAIAAXwBAAEAAQAAlAAAAAAAAAO3/wP/A/8D/wP/A/8D/2f8AAAAAAAASAEAAQABAADMABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACM');
  445. App.beep = function(wav)
  446. {
  447. wav = (wav != null) ? wav : beep;
  448. wav.play();
  449. };
  450. // Thread to reset the label
  451. var resetStatus = null;
  452. /**
  453. *
  454. * Static method for speech output.
  455. */
  456. App.say = function(message, params)
  457. {
  458. if ('speechSynthesis' in window && message != null)
  459. {
  460. var text = mxResources.replacePlaceholders(message, params || []);
  461. lastMessageTimestamp = null;
  462. lastMessage = text;
  463. if (text != null && text.length > 0)
  464. {
  465. if (td != null)
  466. {
  467. var tmp = text;
  468. // Capitalize string
  469. if (tmp != null && tmp.length > 1)
  470. {
  471. tmp = tmp.charAt(0).toUpperCase() + tmp.slice(1);
  472. }
  473. td.innerHTML = ((speechOutputEnabled) ? '<img style="margin-right:4px;" align="absmiddle" border="0" src="' +
  474. outputImage + '"/>' : '') + ' ' + tmp;
  475. td.style.color = '#235695';
  476. if (resetStatus != null)
  477. {
  478. window.clearTimeout(resetStatus);
  479. resetStatus = null;
  480. }
  481. resetStatus = window.setTimeout(function()
  482. {
  483. updateStatusMessage();
  484. }, (recognizing != null) ? 1000 : 3000);
  485. }
  486. // Workaround for talking too much
  487. if (speechOutputEnabled && (!speechSynthesis.speaking || !speechSynthesis.pending))
  488. {
  489. if (text.length < maxMessageLength)
  490. {
  491. var msg = new SpeechSynthesisUtterance();
  492. // Picks random voice with same main locale
  493. var voices = speechSynthesis.getVoices();
  494. // Say "again" for same last message except more than 10 secs ago or shorter than again
  495. if (lastMessageTimestamp != null && text == lastMessage && text != null &&
  496. text.length > 5 && lastMessage != 'again')
  497. {
  498. if (lastMessageTimestamp != null &&
  499. new Date().getTime() - lastMessageTimestamp.getTime() < 10000)
  500. {
  501. text = 'repeat';
  502. }
  503. }
  504. msg.voice = voices[currentVoice];
  505. msg.voiceURI = 'native';
  506. //msg.lang = lang;
  507. msg.text = text;
  508. console.log('App.say speak:', msg.text);
  509. speechSynthesis.speak(msg);
  510. lastMessageTimestamp = new Date();
  511. }
  512. else
  513. {
  514. console.log('App.say ignored:', text);
  515. }
  516. }
  517. else
  518. {
  519. console.log('App.say skipped:', message);
  520. }
  521. }
  522. }
  523. };
  524. /**
  525. * Static method for speech output.
  526. */
  527. App.listen = function(continuous)
  528. {
  529. if ('webkitSpeechRecognition' in window && speechInputEnabled)
  530. {
  531. if (recognizing != null)
  532. {
  533. recognizing.stop();
  534. }
  535. else
  536. {
  537. var recognition = new webkitSpeechRecognition();
  538. recognition.interimResults = true;
  539. // TODO: Should use grammar instead of trying more alternatives
  540. recognition.maxAlternatives = 5;
  541. recognition.lang = lang;
  542. if (continuous != null)
  543. {
  544. recognition.continuous = continuous;
  545. }
  546. recognition.onstart = function(event)
  547. {
  548. updateStatusMessage();
  549. App.beep();
  550. };
  551. recognition.onresult = function(event)
  552. {
  553. for (var i = event.resultIndex; i < event.results.length; ++i)
  554. {
  555. if (td != null)
  556. {
  557. td.innerHTML = '<img style="margin-right:4px;" align="absmiddle" border="0" src="' + micImage +
  558. '"/> ' + event.results[i][0].transcript;
  559. td.style.color = (event.results[i].isFinal) ? '#235695' : 'darkGray';
  560. }
  561. if (event.results[i].isFinal)
  562. {
  563. var ok = false;
  564. for (var j = 0; j < event.results[i].length; j++)
  565. {
  566. if (App.executeVoiceCommand(event.results[i][j].transcript, recognition))
  567. {
  568. ok = true;
  569. break;
  570. }
  571. }
  572. if (!ok)
  573. {
  574. App.say('{1} not found', [event.results[i][0].transcript]);
  575. }
  576. if (td != null)
  577. {
  578. if (resetStatus != null)
  579. {
  580. window.clearTimeout(resetStatus);
  581. resetStatus = null;
  582. }
  583. resetStatus = window.setTimeout(function()
  584. {
  585. updateStatusMessage();
  586. }, 1000);
  587. }
  588. }
  589. }
  590. };
  591. recognition.onend = function(event)
  592. {
  593. // Overrides footer
  594. recognizing = null;
  595. updateStatusMessage();
  596. App.beep(beep2);
  597. };
  598. recognition.start();
  599. recognizing = recognition;
  600. }
  601. }
  602. else
  603. {
  604. speechOutputEnabled = !speechOutputEnabled;
  605. lastMessageTimestamp = null;
  606. App.say(lastMessage || 'Ready');
  607. lastMessageTimestamp = null;
  608. }
  609. };
  610. /**
  611. * Executes the given voice command.
  612. */
  613. App.executeVoiceCommand = function(command, recognition)
  614. {
  615. console.log('App.execute:', mxUtils.trim(command));
  616. var tokens = mxUtils.trim(command).split(' ');
  617. if (tokens.length > 0 && graph.isEnabled())
  618. {
  619. // Ask for Mic permissions
  620. // FIXME: Dialog seems to be hidden until tab is changed
  621. function resolveStylename(token, styles)
  622. {
  623. var tmp = token.toLowerCase().replace(/ /g, '');
  624. var style = null;
  625. for (var i = 0; i < styles.length; i++)
  626. {
  627. if (styles[i].toLowerCase() == tmp)
  628. {
  629. style = styles[i];
  630. break;
  631. }
  632. }
  633. return style;
  634. };
  635. // Main command
  636. tokens[0] = tokens[0].toLowerCase();
  637. // TODO: Use hamming distance for best match command but include all possible actions
  638. // which might be too slow
  639. // console.log('connect', naiveHammingDistance(tokens[0], 'connect'), naiveHammingDistance('disable', 'connect'), naiveHammingDistance('change', 'connect'));
  640. if (graph.isEditing())
  641. {
  642. if (tokens.length == 1 && tokens[0] == 'apply')
  643. {
  644. graph.stopEditing();
  645. }
  646. else if (tokens.length == 1 && tokens[0] == 'undo')
  647. {
  648. document.execCommand('undo', false, null);
  649. }
  650. else if (tokens.length == 1 && tokens[0] == 'redo')
  651. {
  652. document.execCommand('redo', false, null);
  653. }
  654. else
  655. {
  656. document.execCommand('insertHTML', false, command);
  657. }
  658. return true;
  659. }
  660. else if (tokens[0] == 'edit' && tokens[1] == 'text')
  661. {
  662. var cells = graph.getSelectionCells();
  663. if (cells.length == 1)
  664. {
  665. graph.startEditingAtCell(cells[0]);
  666. }
  667. return true;
  668. }
  669. else if (tokens[0] == 'hello' || tokens[0] == 'hi')
  670. {
  671. App.say('Hello! Try "Help", "Help Topic" or "Quick Start".');
  672. return true;
  673. }
  674. else if (tokens[0] == 'help')
  675. {
  676. var wnd = window.open('https://support.draw.io/questions/9666655/how-to-use-the-voice-plugin');
  677. if (wnd == null)
  678. {
  679. App.say('Popup blocked');
  680. }
  681. else if (tokens.length > 1)
  682. {
  683. // Just used to check if popup windows are allowed
  684. wnd.close();
  685. var searchTerm = mxUtils.trim(command.substring(tokens[0].length));
  686. if (searchTerm != null && searchTerm.length > 0)
  687. {
  688. var form = document.createElement('div');
  689. form.style.display = 'inline';
  690. form.innerHTML = ':<form style="display:inline;margin-left:8px;" id="rw_search_form"' +
  691. 'target="_blank" method="get" action="https://support.draw.io/dosearchsite.action">' +
  692. '<input id="rw_search_query" type="text" name="queryString" size="25"></form>';
  693. var realForm = form.getElementsByTagName('form')[0]
  694. var input = form.getElementsByTagName('input')[0];
  695. input.setAttribute('value', searchTerm);
  696. realForm.submit();
  697. App.say(command);
  698. }
  699. }
  700. else
  701. {
  702. App.say('help');
  703. }
  704. return true;
  705. }
  706. else if ((tokens[0] == 'info' && tokens.length == 1) || mxUtils.trim(command).toLowerCase() == 'what\'s this')
  707. {
  708. App.sayHint();
  709. return true;
  710. }
  711. else if (tokens[0] == 'install' && tokens.length == 1)
  712. {
  713. setPluginInstalled(true);
  714. App.say('Installed');
  715. return true;
  716. }
  717. else if (tokens[0] == 'uninstall' && tokens.length == 1)
  718. {
  719. setPluginInstalled(false);
  720. App.say('Uninstalled');
  721. return true;
  722. }
  723. else if (tokens[0] == 'quick' && tokens.length > 0 && tokens[1].toLowerCase() == 'start')
  724. {
  725. var wnd = window.open('https://youtu.be/8OaMWa4R1SE?t=1');
  726. if (wnd == null)
  727. {
  728. App.say('Popup blocked');
  729. }
  730. return true;
  731. }
  732. else if (tokens[0] == 'search' && tokens.length > 1)
  733. {
  734. var searchToken = tokens.slice(1, tokens.length).join(' ').toLowerCase();
  735. var wnd = window.open('https://www.google.ch/search?q=' + encodeURIComponent(searchToken) + '&tbm=isch', 'voicePluginSearchResult');
  736. if (wnd == null)
  737. {
  738. App.say('Popup blocked');
  739. }
  740. return true;
  741. }
  742. else if (tokens[0] == 'shrink')
  743. {
  744. var cell = graph.getSelectionCell();
  745. var geo = graph.getCellGeometry(cell);
  746. if (graph.getModel().isVertex(cell) && geo != null)
  747. {
  748. geo = geo.clone();
  749. if (tokens.length == 1 || tokens[1] == 'height')
  750. {
  751. geo.height = graph.snap(Math.round(geo.height * 0.5));
  752. }
  753. if (tokens.length == 1 || tokens[1] != 'height')
  754. {
  755. geo.width = graph.snap(Math.round(geo.width * 0.5));
  756. }
  757. if (geo.width > graph.tolerance && geo.height > graph.tolerance)
  758. {
  759. graph.getModel().setGeometry(cell, geo);
  760. App.say('Resized');
  761. }
  762. else
  763. {
  764. App.say('Too small');
  765. }
  766. }
  767. else
  768. {
  769. App.say('No cell to resize');
  770. }
  771. return true;
  772. }
  773. else if (tokens[0] == 'double')
  774. {
  775. var cell = graph.getSelectionCell();
  776. var geo = graph.getCellGeometry(cell);
  777. if (graph.getModel().isVertex(cell) && geo != null)
  778. {
  779. geo = geo.clone();
  780. if (tokens.length == 1 || tokens[1] == 'height')
  781. {
  782. geo.height *= 2;
  783. }
  784. if (tokens.length == 1 || tokens[1] != 'height')
  785. {
  786. geo.width *= 2;
  787. }
  788. if (geo.width > graph.tolerance && geo.height > graph.tolerance)
  789. {
  790. graph.getModel().setGeometry(cell, geo);
  791. App.say('Resized');
  792. }
  793. else
  794. {
  795. App.say('Too small');
  796. }
  797. }
  798. else
  799. {
  800. App.say('No cell to resize');
  801. }
  802. return true;
  803. }
  804. else if (tokens[0] == 'width' || tokens[0] == 'with' || tokens[0] == 'height')
  805. {
  806. // Try numeric stylename if last token is numeric
  807. var lastToken = tokens[tokens.length - 1].toLowerCase();
  808. // Fixes some special cases for recoginition of short phrases
  809. // like "stroke width 2" where it tries to be clever
  810. if (lastToken == 'tool' || lastToken == 'tune' || lastToken == 'tomb' || lastToken == 'tube')
  811. {
  812. lastToken = '2';
  813. }
  814. else if (lastToken == 'd3')
  815. {
  816. lastToken = '3';
  817. }
  818. else if (lastToken == 'v')
  819. {
  820. lastToken = '5';
  821. }
  822. else
  823. {
  824. // Converts numeric words to numbers (system only seems to return written numbers for <= 4)
  825. var numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
  826. var tmpIndex = mxUtils.indexOf(numbers, lastToken);
  827. if (tmpIndex >= 0)
  828. {
  829. lastToken = tmpIndex;
  830. }
  831. }
  832. var lastValue = parseFloat(tokens[1].toLowerCase());
  833. if (tokens.length >= 2 && !isNaN(lastValue))
  834. {
  835. var cell = graph.getSelectionCell();
  836. var geo = graph.getCellGeometry(cell);
  837. if (graph.getModel().isVertex(cell) && geo != null)
  838. {
  839. geo = geo.clone();
  840. if (tokens[0] == 'height')
  841. {
  842. geo.height = lastValue;
  843. }
  844. else
  845. {
  846. geo.width = lastValue;
  847. }
  848. graph.getModel().setGeometry(cell, geo);
  849. App.say('Resized');
  850. }
  851. else
  852. {
  853. App.say('No cell to resize');
  854. }
  855. }
  856. return true;
  857. }
  858. else if (tokens[0] == 'insert' && tokens.length > 1)
  859. {
  860. // Fixes some common mistakes
  861. if (tokens[1].toLowerCase() == 'edits')
  862. {
  863. tokens[1] = 'ellipse';
  864. }
  865. var searchTerm = mxUtils.trim(tokens.slice(1, tokens.length).join(' '));
  866. var current = graph.getSelectionCell();
  867. // Clears selection to disable built-in connecting
  868. graph.clearSelection();
  869. insertShape(searchTerm, function()
  870. {
  871. var cell = graph.getSelectionCell();
  872. // Connects dangling edge of previously selected edge and moves cell
  873. if (graph.model.isVertex(cell) && graph.model.isEdge(current) &&
  874. (graph.model.getTerminal(current, true) == null ||
  875. graph.model.getTerminal(current, false) == null))
  876. {
  877. var edgeState = graph.view.getState(current);
  878. var vertexState = graph.view.getState(cell);
  879. if (vertexState != null && edgeState != null && edgeState.absolutePoints != null &&
  880. edgeState.absolutePoints.length > 1)
  881. {
  882. var source = graph.model.getTerminal(current, true) == null;
  883. var pts = edgeState.absolutePoints;
  884. var pt = pts[(source) ? 0 : pts.length - 1];
  885. var loc = new mxPoint(vertexState.getCenterX(), vertexState.getCenterY());
  886. if (loc != null && edgeState != null)
  887. {
  888. var s = graph.view.scale;
  889. var dx = pt.x - loc.x;
  890. var dy = pt.y - loc.y;
  891. // TODO: Should add insert to transaction but need absolute position
  892. graph.model.beginUpdate();
  893. try
  894. {
  895. graph.moveCells(graph.getSelectionCells(), dx / s, dy / s);
  896. graph.model.setTerminal(current, cell, source);
  897. }
  898. finally
  899. {
  900. graph.model.endUpdate();
  901. }
  902. }
  903. }
  904. }
  905. });
  906. return true;
  907. }
  908. else if (tokens[0] == 'connect' || tokens[0] == 'kinect' || (tokens[0] == 'clone' && tokens.length > 1))
  909. {
  910. var cell = graph.getSelectionCell();
  911. if (graph.getModel().isVertex(cell))
  912. {
  913. // Uses east direction if token not understood
  914. var direction = mxConstants.DIRECTION_EAST;
  915. if (tokens.length > 1)
  916. {
  917. tokens[1] = tokens[1].toLowerCase();
  918. // Guessing direction based on minimum hamming distance for given set
  919. var guess = getBestWord(tokens[1], ['up', 'left', 'down', 'right', 'north', 'south', 'east', 'west']);
  920. if (guess == 'up' || guess == mxConstants.DIRECTION_NORTH)
  921. {
  922. direction = mxConstants.DIRECTION_NORTH;
  923. }
  924. else if (guess == 'left' || guess == mxConstants.DIRECTION_WEST)
  925. {
  926. direction = mxConstants.DIRECTION_WEST;
  927. }
  928. else if (guess == 'down' || guess == mxConstants.DIRECTION_SOUTH)
  929. {
  930. direction = mxConstants.DIRECTION_SOUTH;
  931. }
  932. }
  933. var length = graph.defaultEdgeLength;
  934. var cloneSource = tokens[0] == 'clone';
  935. var evt = mouseEvent('click', 1, 50, 1, 50, !cloneSource);
  936. var cells = graph.connectVertex(cell, direction, length, evt);
  937. graph.selectCellsForConnectVertex(cells, evt, ui.hoverIcons);
  938. }
  939. return true;
  940. }
  941. // Fixes drive and ride common mistakes for right
  942. else if (mxUtils.indexOf(['and', 'drive', 'ride', 'move', 'up', 'left', 'down', 'right', 'north', 'south', 'east', 'west', 'downright'], tokens[0]) >= 0)
  943. {
  944. var cell = graph.getSelectionCell();
  945. if (!graph.isSelectionEmpty())
  946. {
  947. // Uses east direction if token not understood
  948. var dx = 0;
  949. var dy = 0;
  950. for (var i = 0; i < tokens.length; i++)
  951. {
  952. tokens[i] = tokens[i].toLowerCase();
  953. var direction = null;
  954. // Downright is a single word needs special handling
  955. if (tokens[i].toLowerCase() == 'downright')
  956. {
  957. dx += graph.defaultEdgeLength;
  958. dy += graph.defaultEdgeLength;
  959. }
  960. else
  961. {
  962. var guess = null;
  963. // Guessing direction based on minimum hamming distance for given set
  964. // Handle some common cases
  965. if (tokens[i] == 'drive' || tokens[i] == 'ride')
  966. {
  967. guess = 'right';
  968. }
  969. else
  970. {
  971. guess = getBestWord(tokens[i], ['move', 'and', 'up', 'left', 'right', 'north', 'south', 'east', 'west', 'down', 'downright']);
  972. }
  973. if (guess == 'up' || guess == mxConstants.DIRECTION_NORTH)
  974. {
  975. direction = mxConstants.DIRECTION_NORTH;
  976. }
  977. else if (guess == 'left' || guess == mxConstants.DIRECTION_WEST)
  978. {
  979. direction = mxConstants.DIRECTION_WEST;
  980. }
  981. else if (guess == 'down' || guess == mxConstants.DIRECTION_SOUTH)
  982. {
  983. direction = mxConstants.DIRECTION_SOUTH;
  984. }
  985. else if (guess == 'right' || guess == mxConstants.DIRECTION_EAST)
  986. {
  987. direction = mxConstants.DIRECTION_EAST;
  988. }
  989. if (direction != null)
  990. {
  991. if (direction == mxConstants.DIRECTION_NORTH)
  992. {
  993. dy += -graph.defaultEdgeLength;
  994. }
  995. else if (direction == mxConstants.DIRECTION_WEST)
  996. {
  997. dx += -graph.defaultEdgeLength;
  998. }
  999. else if (direction == mxConstants.DIRECTION_SOUTH)
  1000. {
  1001. dy += graph.defaultEdgeLength;
  1002. }
  1003. else if (direction == mxConstants.DIRECTION_EAST)
  1004. {
  1005. dx += graph.defaultEdgeLength;
  1006. }
  1007. }
  1008. }
  1009. }
  1010. if (dx != 0 || dy != null)
  1011. {
  1012. graph.moveCells(graph.getSelectionCells(), dx, dy);
  1013. App.say('Moved');
  1014. }
  1015. return true;
  1016. }
  1017. }
  1018. else if (tokens[0] == 'text')
  1019. {
  1020. var cells = graph.getSelectionCells();
  1021. if (cells.length == 0 && graph.model.contains(lastInserted))
  1022. {
  1023. cells = [lastInserted];
  1024. }
  1025. if (cells.length == 0)
  1026. {
  1027. App.say('No cell for text');
  1028. }
  1029. else if (tokens[0].length >= 2)
  1030. {
  1031. var value = tokens.slice(1, tokens.length).join(' ');
  1032. if (value.length > 0)
  1033. {
  1034. // Capitalize string
  1035. if (value.length > 1)
  1036. {
  1037. value = value.charAt(0).toUpperCase() + value.slice(1);
  1038. }
  1039. graph.labelChanged(cells[0], value);
  1040. }
  1041. }
  1042. return true;
  1043. }
  1044. else if (tokens[0] == 'disconnect' && tokens.length == 1)
  1045. {
  1046. var cells = graph.getAllEdges(graph.getSelectionCells());
  1047. if (cells.length == 0)
  1048. {
  1049. App.say('No cell to disconnect');
  1050. }
  1051. else
  1052. {
  1053. graph.removeCells(cells);
  1054. }
  1055. return true;
  1056. }
  1057. else if (tokens[0] == 'deselect' && tokens.length == 1)
  1058. {
  1059. graph.clearSelection();
  1060. return true;
  1061. }
  1062. else if (tokens[0] === 'select' && (tokens.length == 1 || mxUtils.indexOf(
  1063. ['vertices', 'edges', 'none', 'all'], tokens[1].toLowerCase()) < 0))
  1064. {
  1065. // Handles some other shortcuts
  1066. if (tokens.length == 1 || mxUtils.indexOf(['last'], tokens[1].toLowerCase()) >= 0)
  1067. {
  1068. if (graph.model.contains(lastInserted))
  1069. {
  1070. graph.setSelectionCell(lastInserted);
  1071. App.say('{1} selected', [graph.getWordForCell(lastInserted).replace(/([A-Z])/g, ' $1')]);
  1072. return true;
  1073. }
  1074. }
  1075. // Handles alternative cases of edges
  1076. else if (mxUtils.indexOf(['connection', 'connections', 'inches'], tokens[1].toLowerCase()) >= 0)
  1077. {
  1078. var edges = graph.getAllEdges(graph.getSelectionCells());
  1079. if (edges.length > 0)
  1080. {
  1081. graph.setSelectionCells(edges);
  1082. }
  1083. else
  1084. {
  1085. ui.actions.get('selectEdges').funct();
  1086. }
  1087. App.sayHint();
  1088. return true;
  1089. }
  1090. // Handles alternative version of vertices
  1091. else if (mxUtils.indexOf(['shapes'], tokens[1].toLowerCase()) >= 0)
  1092. {
  1093. ui.actions.get('selectVertices').funct();
  1094. App.sayHint();
  1095. return true;
  1096. }
  1097. else if (mxUtils.indexOf(['previous'], tokens[1].toLowerCase()) >= 0)
  1098. {
  1099. if (graph.isSelectionEmpty())
  1100. {
  1101. // Selects the first vertex
  1102. var parent = graph.getDefaultParent();
  1103. var childCount = graph.model.getChildCount(parent);
  1104. for (var i = childCount - 1; i >= 0; i--)
  1105. {
  1106. var child = graph.model.getChildAt(parent, i);
  1107. if (graph.model.isVertex(child))
  1108. {
  1109. graph.setSelectionCell(child);
  1110. App.say('{1} selected', [graph.getWordForCell(child).replace(/([A-Z])/g, ' $1')]);
  1111. return true;
  1112. }
  1113. }
  1114. }
  1115. else
  1116. {
  1117. var cell = graph.getSelectionCell();
  1118. var model = graph.getModel();
  1119. var index = model.getParent(cell).getIndex(cell);
  1120. var childCount = model.getChildCount(model.getParent(cell));
  1121. if (index >= 0)
  1122. {
  1123. var next = model.getParent(cell).getChildAt(((index == 0) ? childCount : index) - 1);
  1124. if (next != null)
  1125. {
  1126. graph.setSelectionCell(next);
  1127. App.say('{1} selected', [graph.getWordForCell(next)]);
  1128. return true;
  1129. }
  1130. }
  1131. App.say('Previous not found');
  1132. }
  1133. }
  1134. else if (mxUtils.indexOf(['source', 'target'], tokens[1].toLowerCase()) >= 0)
  1135. {
  1136. var cell = graph.getSelectionCell();
  1137. if (graph.model.isEdge(cell))
  1138. {
  1139. var terminal = graph.model.getTerminal(cell, tokens[1].toLowerCase() == 'source');
  1140. if (terminal != null)
  1141. {
  1142. graph.setSelectionCell(terminal);
  1143. return true;
  1144. }
  1145. }
  1146. }
  1147. else if (mxUtils.indexOf(['next'], tokens[1].toLowerCase()) >= 0)
  1148. {
  1149. if (graph.isSelectionEmpty())
  1150. {
  1151. // Selects the first vertex
  1152. var parent = graph.getDefaultParent();
  1153. var childCount = graph.model.getChildCount(parent);
  1154. for (var i = 0; i < childCount; i++)
  1155. {
  1156. var child = graph.model.getChildAt(parent, i);
  1157. if (graph.model.isVertex(child))
  1158. {
  1159. graph.setSelectionCell(child);
  1160. App.say('{1} selected', [graph.getWordForCell(child).replace(/([A-Z])/g, ' $1')]);
  1161. return true;
  1162. }
  1163. }
  1164. }
  1165. else
  1166. {
  1167. var cell = graph.getSelectionCell();
  1168. var model = graph.getModel();
  1169. var index = model.getParent(cell).getIndex(cell);
  1170. var childCount = model.getChildCount(model.getParent(cell));
  1171. if (index < childCount)
  1172. {
  1173. var next = model.getParent(cell).getChildAt(((index == childCount - 1) ? 0 : index + 1));
  1174. if (next != null)
  1175. {
  1176. graph.setSelectionCell(next);
  1177. App.say('{1} selected', [graph.getWordForCell(next).replace(/([A-Z])/g, ' $1')]);
  1178. return true;
  1179. }
  1180. }
  1181. }
  1182. }
  1183. else
  1184. {
  1185. var states = graph.view.states.getValues();
  1186. var token = tokens[1].toLowerCase();
  1187. var searchToken = tokens.slice(1, tokens.length).join('').toLowerCase();
  1188. for (var i = states.length - 1; i > 0; i--)
  1189. {
  1190. // Simple matching for shape name or label
  1191. if (!graph.isCellSelected(states[i].cell))
  1192. {
  1193. // Tries label search first
  1194. var lab = graph.getLabel(states[i].cell);
  1195. if (lab != null && lab.length > 0)
  1196. {
  1197. lab = lab.toLowerCase().replace(/ /g, '');
  1198. // Some common mistakes
  1199. if (lab.charAt(lab.length - 1) == '2' && tokens[tokens.length - 1].toLowerCase() == 'to')
  1200. {
  1201. lab = lab.substring(0, lab.length - 1) + 'to';
  1202. }
  1203. var min = Math.min(searchToken.length, lab.length);
  1204. if (searchToken.substring(0, min) == lab.substring(0, min))
  1205. {
  1206. graph.setSelectionCell(states[i].cell);
  1207. App.say('{1} selected', [graph.getWordForCell(states[i].cell)]);
  1208. return true;
  1209. }
  1210. }
  1211. // Then tries shapename search
  1212. if (tokens.length == 2)
  1213. {
  1214. // Some common names
  1215. if (mxUtils.indexOf(['circle'], token) >= 0)
  1216. {
  1217. searchToken = 'ellipse';
  1218. }
  1219. else if (mxUtils.indexOf(['condition', 'decision'], token) >= 0)
  1220. {
  1221. searchToken = 'rhombus';
  1222. }
  1223. else if (mxUtils.indexOf(['preparation'], token) >= 0)
  1224. {
  1225. searchToken = 'hexagon';
  1226. }
  1227. else if (mxUtils.indexOf(['trapez'], token) >= 0)
  1228. {
  1229. searchToken = 'parallelogram';
  1230. }
  1231. }
  1232. var wrd = graph.getWordForCell(states[i].cell, true);
  1233. var min = Math.min(wrd.length, searchToken.length);
  1234. if (searchToken.substring(0, min) == wrd.substring(0, min))
  1235. {
  1236. graph.setSelectionCell(states[i].cell);
  1237. App.say('{1} selected', [graph.getWordForCell(states[i].cell)]);
  1238. return true;
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. else if (tokens[0] === 'remove')
  1245. {
  1246. var cells = graph.getSelectionCells();
  1247. if (cells.length == 0 && graph.model.contains(lastInserted))
  1248. {
  1249. cells = [lastInserted];
  1250. }
  1251. if (cells.length == 0)
  1252. {
  1253. App.say('No cells');
  1254. }
  1255. else if (tokens[1].toLowerCase() == 'text')
  1256. {
  1257. graph.labelChanged(cells[0], '');
  1258. }
  1259. else
  1260. {
  1261. // Remove style
  1262. var styleToken = mxUtils.trim(tokens.slice(1, tokens.length).join(' ').toLowerCase());
  1263. // Fixes common recognition errors
  1264. styleToken = styleToken.replace(/a line/g, 'align')
  1265. // Merges to single word
  1266. styleToken = styleToken.replace(/ /g, '')
  1267. // Fixes common speech errors that make no sense in the context
  1268. var keys = [mxConstants.STYLE_FILLCOLOR, mxConstants.STYLE_GRADIENTCOLOR,
  1269. mxConstants.STYLE_STROKECOLOR, mxConstants.STYLE_FONTCOLOR,
  1270. mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, mxConstants.STYLE_LABEL_BORDERCOLOR,
  1271. mxConstants.STYLE_STROKEWIDTH, mxConstants.STYLE_FONTSIZE, mxConstants.STYLE_SPACING,
  1272. mxConstants.STYLE_SPACING_TOP, mxConstants.STYLE_SPACING_LEFT, mxConstants.STYLE_SPACING_RIGHT,
  1273. mxConstants.STYLE_SPACING_BOTTOM, mxConstants.STYLE_PERIMETER_SPACING,
  1274. mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, mxConstants.STYLE_OPACITY,
  1275. mxConstants.STYLE_TEXT_OPACITY, mxConstants.STYLE_ROTATION,
  1276. mxConstants.STYLE_ALIGN, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.STYLE_FONTFAMILY,
  1277. mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_VERTICAL_LABEL_POSITION,
  1278. mxConstants.STYLE_GRADIENT_DIRECTION];
  1279. // Guesses best word
  1280. var style = getBestWord(styleToken, keys);
  1281. if (style != null)
  1282. {
  1283. graph.setCellStyles(style, null, cells);
  1284. ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [null], 'cells', cells));
  1285. }
  1286. else
  1287. {
  1288. App.say('Unknown style {1}', [changeTokens[0]]);
  1289. }
  1290. }
  1291. return true;
  1292. }
  1293. else
  1294. {
  1295. var cells = graph.getSelectionCells();
  1296. if (cells.length == 0 && graph.model.contains(lastInserted))
  1297. {
  1298. cells = [lastInserted];
  1299. }
  1300. // Try numeric stylename if last token is numeric
  1301. var lastToken = tokens[tokens.length - 1].toLowerCase();
  1302. // Fixes some special cases for recoginition of short phrases
  1303. // like "stroke width 2" where it tries to be clever
  1304. if (lastToken == 'tool' || lastToken == 'tune' || lastToken == 'tomb' || lastToken == 'tube')
  1305. {
  1306. lastToken = '2';
  1307. }
  1308. else if (lastToken == 'd3')
  1309. {
  1310. lastToken = '3';
  1311. }
  1312. else if (lastToken == 'v')
  1313. {
  1314. lastToken = '5';
  1315. }
  1316. else
  1317. {
  1318. // Converts numeric words to numbers (system only seems to return written numbers for <= 4)
  1319. var numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
  1320. var tmpIndex = mxUtils.indexOf(numbers, lastToken);
  1321. if (tmpIndex >= 0)
  1322. {
  1323. lastToken = tmpIndex;
  1324. }
  1325. }
  1326. // If last token is numeric
  1327. var lastValue = parseFloat(lastToken);
  1328. if (tokens.length >= 2 && !isNaN(lastValue))
  1329. {
  1330. var styleToken = tokens.slice(0, tokens.length - 1).join('').toLowerCase();
  1331. // Numeric styles
  1332. var keys = [mxConstants.STYLE_STROKEWIDTH, mxConstants.STYLE_FONTSIZE, mxConstants.STYLE_SPACING,
  1333. mxConstants.STYLE_SPACING_TOP, mxConstants.STYLE_SPACING_LEFT, mxConstants.STYLE_SPACING_RIGHT,
  1334. mxConstants.STYLE_SPACING_BOTTOM, mxConstants.STYLE_PERIMETER_SPACING,
  1335. mxConstants.STYLE_STARTSIZE, mxConstants.STYLE_ENDSIZE, mxConstants.STYLE_OPACITY,
  1336. mxConstants.STYLE_TEXT_OPACITY, mxConstants.STYLE_ROTATION]
  1337. var style = null;
  1338. // Workaround for problem with "font size" is to say "size" ("font" is near "phone")
  1339. if (styleToken == 'size')
  1340. {
  1341. style = mxConstants.STYLE_FONTSIZE;
  1342. }
  1343. else
  1344. {
  1345. // Guesses best word
  1346. style = getBestWord(styleToken, keys);
  1347. }
  1348. if (style != null)
  1349. {
  1350. if (cells.length == 0)
  1351. {
  1352. App.say('No cell for {1}', [style]);
  1353. }
  1354. // Plausibility check
  1355. else if (lastValue <= 400)
  1356. {
  1357. graph.setCellStyles(style, lastValue, cells);
  1358. ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [lastValue], 'cells', cells));
  1359. }
  1360. else
  1361. {
  1362. App.say('{1} ignored', [lastValue]);
  1363. }
  1364. // Terminate
  1365. return true;
  1366. }
  1367. }
  1368. // If "color" appears in the command
  1369. if (tokens.length >= 2)
  1370. {
  1371. // Replaces GB spelling with US spelling for internal lookups
  1372. var colorCommand = mxUtils.trim(command.toLowerCase().replace(/colour/g, 'color'));
  1373. var colorIndex = colorCommand.indexOf('color');
  1374. // "Color" (word alone) matches to fill color
  1375. if (colorIndex >= 0)
  1376. {
  1377. // Text from first space after color* word
  1378. var colorToken = mxUtils.trim(colorCommand.substring(
  1379. colorCommand.indexOf(' ', colorIndex))).replace(/ /g, '');
  1380. var color = null;
  1381. // Checks for color code of token using ntc
  1382. for (var i = 0; i < ntc.names.length; i++)
  1383. {
  1384. if (ntc.names[i][1].toLowerCase().replace(/ /g, '') == colorToken)
  1385. {
  1386. color = '#' + ntc.names[i][0];
  1387. break;
  1388. }
  1389. }
  1390. // Color is known
  1391. if (color != null)
  1392. {
  1393. var styleToken = colorCommand.substring(0, colorIndex + 'color'.length).replace(/ /g, '');
  1394. keys = [mxConstants.STYLE_GRADIENTCOLOR,
  1395. mxConstants.STYLE_STROKECOLOR, mxConstants.STYLE_FONTCOLOR,
  1396. mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, mxConstants.STYLE_LABEL_BORDERCOLOR,
  1397. mxConstants.STYLE_FILLCOLOR];
  1398. var style = null;
  1399. // Handles some special cases
  1400. if (styleToken == 'thecolor' || styleToken == 'color')
  1401. {
  1402. if (graph.model.isEdge(graph.getSelectionCell()))
  1403. {
  1404. style = mxConstants.STYLE_STROKECOLOR;
  1405. }
  1406. else
  1407. {
  1408. style = mxConstants.STYLE_FILLCOLOR;
  1409. }
  1410. }
  1411. else
  1412. {
  1413. // Guesses best word
  1414. style = getBestWord(styleToken, keys);
  1415. }
  1416. if (style != null)
  1417. {
  1418. if (cells.length == 0)
  1419. {
  1420. App.say('No cell for {1}', [style]);
  1421. }
  1422. else
  1423. {
  1424. graph.setCellStyles(style, color, cells);
  1425. ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [color], 'cells', cells));
  1426. }
  1427. // Terminate
  1428. return true;
  1429. }
  1430. }
  1431. }
  1432. }
  1433. // If the first token is a general stylename
  1434. if (tokens.length >= 2)
  1435. {
  1436. var keys = [mxConstants.STYLE_ALIGN, mxConstants.STYLE_VERTICAL_ALIGN,
  1437. mxConstants.STYLE_FONTFAMILY, mxConstants.STYLE_LABEL_POSITION,
  1438. mxConstants.STYLE_VERTICAL_LABEL_POSITION,
  1439. mxConstants.STYLE_GRADIENT_DIRECTION];
  1440. var styleToken = mxUtils.trim(tokens.slice(0, tokens.length - 1).join(' ').toLowerCase());
  1441. // Fixes common recognition errors
  1442. styleToken = styleToken.replace(/a line/g, 'align')
  1443. // Merges to single word
  1444. styleToken = styleToken.replace(/ /g, '')
  1445. var style = resolveStylename(styleToken, keys);
  1446. var value = mxUtils.trim(tokens[tokens.length - 1].toLowerCase());
  1447. if (style != null && value != null && value.length > 0)
  1448. {
  1449. if (cells.length == 0)
  1450. {
  1451. App.say('No cell for {1}', [style]);
  1452. }
  1453. else
  1454. {
  1455. graph.setCellStyles(style, value, cells);
  1456. ui.fireEvent(new mxEventObject('styleChanged', 'keys', [style], 'values', [value], 'cells', cells));
  1457. }
  1458. // Terminate
  1459. return true;
  1460. }
  1461. }
  1462. // Checks if the command is a shape name
  1463. var vertices = [];
  1464. for (var i = 0; i < cells.length; i++)
  1465. {
  1466. var cell = cells[i];
  1467. if (graph.model.isVertex(cell))
  1468. {
  1469. vertices.push(cell);
  1470. }
  1471. }
  1472. var shapenameToken = mxUtils.trim(tokens.join('')).toLowerCase();
  1473. // Searches for registered shape names
  1474. // LATER: Using search like insert requires access to
  1475. // the cells of the search result items
  1476. if (shapeList == null)
  1477. {
  1478. shapeList = [];
  1479. for (var tmp in mxCellRenderer.prototype.defaultShapes)
  1480. {
  1481. shapeList.push(tmp.toLowerCase());
  1482. }
  1483. }
  1484. // Only exact matches allowed here
  1485. // LATER: Support rounded style
  1486. var shape = null;
  1487. // Some common mappings
  1488. if (mxUtils.indexOf(['cirlce', 'event', 'start', 'end'], shapenameToken) >= 0)
  1489. {
  1490. shapenameToken = shape = 'ellipse';
  1491. }
  1492. else if (mxUtils.indexOf(['condition', 'decision'], shapenameToken) >= 0)
  1493. {
  1494. shapenameToken = shape = 'rhombus';
  1495. }
  1496. else if (mxUtils.indexOf(['preparation'], shapenameToken) >= 0)
  1497. {
  1498. shapenameToken = shape = 'hexagon';
  1499. }
  1500. else if (mxUtils.indexOf(['trapez'], shapenameToken) >= 0)
  1501. {
  1502. shapenameToken = shape = 'parallelogram';
  1503. }
  1504. else
  1505. {
  1506. shape = getBestWord(shapenameToken, shapeList);
  1507. }
  1508. // LATER: Ignore all edge shapes
  1509. if (shape != null && shape.toLowerCase() == shapenameToken && shape != 'connector' &&
  1510. shape != 'arrow' && shape != 'flexarrow' && shape != 'arrowconnector' &&
  1511. shape != 'link')
  1512. {
  1513. if (cells.length == 0)
  1514. {
  1515. App.say('No cell for {1}', [shape]);
  1516. }
  1517. else if (vertices.length == 0)
  1518. {
  1519. App.say('Connections ignored');
  1520. }
  1521. else
  1522. {
  1523. // LATER: Add perimeter style etc
  1524. graph.setCellStyles(mxConstants.STYLE_SHAPE, shapenameToken, vertices);
  1525. ui.fireEvent(new mxEventObject('styleChanged', 'keys', [mxConstants.STYLE_SHAPE],
  1526. 'values', [shapenameToken], 'cells', vertices));
  1527. // Terminate
  1528. return true;
  1529. }
  1530. }
  1531. // Lazy creation of cache for action names
  1532. if (actions == null)
  1533. {
  1534. actions = {};
  1535. actionList = [];
  1536. for (var name in ui.actions.actions)
  1537. {
  1538. var shortname = mxUtils.trim(name).toLowerCase().replace(/ /g, '');
  1539. actions[shortname] = ui.actions.actions[name];
  1540. actionList.push(shortname);
  1541. }
  1542. }
  1543. var name = mxUtils.trim(command).toLowerCase().replace(/ /g, '');
  1544. if (urlParams['dev'] == '1')
  1545. {
  1546. var guess = getBestWord(name, actionList, true);
  1547. console.log('App.say guess:', name, '=>', guess, '(' +
  1548. naiveHammingDistance(name, guess) + ', ' +
  1549. levenshteinDist(name, guess) +
  1550. ')');
  1551. }
  1552. // Some common redirects and mistakes
  1553. if (tokens[0] == 'back')
  1554. {
  1555. command = name = 'undo';
  1556. }
  1557. else if (tokens[0] == 'restore')
  1558. {
  1559. command = name = 'redo';
  1560. }
  1561. else if (tokens[0] == 'clone')
  1562. {
  1563. command = name = 'duplicate';
  1564. }
  1565. else if (mxUtils.indexOf(['all', 'small', 'wall', 'call'], name) >= 0)
  1566. {
  1567. command = name = 'selectall';
  1568. }
  1569. else if (mxUtils.indexOf(['both', 'boat', 'phone', 'don\'t', 'food', 'bolt', 'bull'], tokens[0]) >= 0)
  1570. {
  1571. command = name = 'bold';
  1572. }
  1573. var action = actions[name];
  1574. if (action != null)
  1575. {
  1576. if (action.isEnabled())
  1577. {
  1578. App.say(name);
  1579. action.funct();
  1580. }
  1581. else
  1582. {
  1583. // Cannot use name here as it has no spaces
  1584. App.say('{1} disabled', [command]);
  1585. }
  1586. return true;
  1587. }
  1588. return false;
  1589. }
  1590. }
  1591. };
  1592. if ('speechSynthesis' in window)
  1593. {
  1594. // Shows dialog for mic access
  1595. if (navigator.webkitGetUserMedia)
  1596. {
  1597. window.addEventListener('load', function()
  1598. {
  1599. navigator.webkitGetUserMedia({audio:true}, function()
  1600. {
  1601. //console.log('access to mic ok');
  1602. }, function(e)
  1603. {
  1604. //alert('Error getting audio');
  1605. console.log(e);
  1606. });
  1607. });
  1608. }
  1609. // Installs helper methods and listeners for speech output
  1610. var graph = ui.editor.graph;
  1611. App.reloadVoicePlugin = function()
  1612. {
  1613. // Shows UI
  1614. speechOutputEnabled = true;
  1615. menu.style.display = '';
  1616. td.style.display = 'inline-block';
  1617. };
  1618. App.sayHint = function()
  1619. {
  1620. if (graph.getSelectionCount() == 0)
  1621. {
  1622. App.say('No cell selected.' + ((ui.isDiagramEmpty()) ? ' Diagram is empty.' : ''));
  1623. }
  1624. else if (graph.getSelectionCount() == 1)
  1625. {
  1626. var cell = graph.getSelectionCell();
  1627. if (graph.getModel().isVertex(cell))
  1628. {
  1629. var geo = graph.getCellGeometry(cell)
  1630. if (geo != null)
  1631. {
  1632. App.say('{1} at {2} and {3} is {4} times {5} pixels', [graph.getWordForCell(cell, true),
  1633. geo.x, geo.y, geo.width, geo.height]);
  1634. }
  1635. }
  1636. else
  1637. {
  1638. App.say('One connection selected');
  1639. }
  1640. var lab = mxUtils.trim(graph.getLabel(cell));
  1641. if (lab != null && lab.length > 0 && lab.length < 20)
  1642. {
  1643. App.say('Label is {1}', [lab]);
  1644. }
  1645. }
  1646. else
  1647. {
  1648. var cells = graph.getSelectionCells();
  1649. var vertexCount = 0;
  1650. var edgeCount = 0;
  1651. for (var i = 0; i < cells.length; i++)
  1652. {
  1653. var cell = cells[i];
  1654. if (graph.model.isEdge(cell))
  1655. {
  1656. edgeCount++;
  1657. }
  1658. else if (graph.model.isVertex(cell))
  1659. {
  1660. vertexCount++;
  1661. }
  1662. }
  1663. if (vertexCount > 0 && edgeCount > 0)
  1664. {
  1665. var tmp = '';
  1666. if (vertexCount == 1)
  1667. {
  1668. tmp += 'One shape';
  1669. }
  1670. else
  1671. {
  1672. tmp += '{1} shapes';
  1673. }
  1674. tmp += ' and ';
  1675. if (edgeCount == 1)
  1676. {
  1677. tmp += 'one connection';
  1678. }
  1679. else
  1680. {
  1681. tmp += '{2} connections';
  1682. }
  1683. App.say(tmp + ' selected', [vertexCount, edgeCount]);
  1684. }
  1685. else if (vertexCount > 0)
  1686. {
  1687. App.say('{1} shapes selected', [vertexCount]);
  1688. }
  1689. else
  1690. {
  1691. App.say('{1} connections selected', [edgeCount]);
  1692. }
  1693. }
  1694. };
  1695. // Can return more than first word
  1696. function firstWord(value)
  1697. {
  1698. // TODO Use regex
  1699. if (value != null && value.length > maxLabelLength)
  1700. {
  1701. var space = value.indexOf(' ');
  1702. // Add second word if label is short
  1703. var tmp = value.indexOf(' ', space + 1);
  1704. if (tmp >= 0 && tmp <= maxLabelLength)
  1705. {
  1706. space = tmp;
  1707. // Add third word if label is short
  1708. var tmp = value.indexOf(' ', space + 1);
  1709. if (tmp >= 0 && tmp <= maxLabelLength)
  1710. {
  1711. space = tmp;
  1712. }
  1713. }
  1714. if (space >= 0)
  1715. {
  1716. value = value.substring(0, space);
  1717. }
  1718. }
  1719. return value;
  1720. };
  1721. graph.getWordForCell = function(cell, ignoreLabel)
  1722. {
  1723. var label = 'no';
  1724. if (cell != null)
  1725. {
  1726. label = (ignoreLabel) ? null : firstWord(this.getLabel(cell));
  1727. if (label == null || label.length == 0 || label.length > maxLabelLength || mxUtils.isNumeric(label))
  1728. {
  1729. var state = this.view.getState(cell);
  1730. var style = (state != null) ? state.style : this.getCellStyle(cell);
  1731. var tmp = style[mxConstants.STYLE_SHAPE];
  1732. if (tmp == 'label')
  1733. {
  1734. label = 'rectangle';
  1735. }
  1736. else if (tmp != null)
  1737. {
  1738. var dot = tmp.lastIndexOf('.');
  1739. if (dot >= 0)
  1740. {
  1741. tmp = tmp.substring(dot + 1);
  1742. }
  1743. label = tmp
  1744. }
  1745. }
  1746. var div = document.createElement('div');
  1747. div.innerHTML = label;
  1748. label = div.innerText;
  1749. }
  1750. return label;
  1751. };
  1752. ui.addListener('styleChanged', function(sender, evt)
  1753. {
  1754. //console.log('styleChanged', evt, evt.getProperty('keys'));
  1755. var cells = evt.getProperty('cells');
  1756. var keys = evt.getProperty('keys');
  1757. var values = evt.getProperty('values');
  1758. if (cells != null && keys != null && keys.length == 1 && values.length == 1)
  1759. {
  1760. var tmp = values[0];
  1761. if (typeof tmp === 'string' && tmp.charAt(0) == '#')
  1762. {
  1763. var n_match = ntc.name(tmp);
  1764. //if (n_match[2]) /* exact match */
  1765. {
  1766. tmp = n_match[1];
  1767. }
  1768. }
  1769. if (tmp == mxConstants.NONE || tmp == null)
  1770. {
  1771. App.say('Removed {1}', [keys[0]]);
  1772. }
  1773. else
  1774. {
  1775. // Replaces camel case notation with spaces
  1776. var key = keys[0].replace(/([A-Z])/g, ' $1')
  1777. App.say('{1} {2}', [key, tmp]);
  1778. }
  1779. }
  1780. });
  1781. graph.addListener(mxEvent.LABEL_CHANGED, function(sender, evt)
  1782. {
  1783. //console.log('CELL_CONNECTED', evt);
  1784. var cell = evt.getProperty('cell');
  1785. var old = evt.getProperty('old');
  1786. // Resolves placeholders in new label
  1787. var value = this.getLabel(cell);
  1788. if ((value != null && value.length > 20) ||
  1789. (old != null && old.length > 20))
  1790. {
  1791. App.say('Label changed');
  1792. }
  1793. else if (value != null && value.length == 0)
  1794. {
  1795. App.say('Label removed');
  1796. }
  1797. else if (value != null)
  1798. {
  1799. App.say('{1}', [value]);
  1800. }
  1801. });
  1802. graph.addListener(mxEvent.CELL_CONNECTED, function(sender, evt)
  1803. {
  1804. // console.log('CELL_CONNECTED', evt);
  1805. // var edge = evt.getProperty('edge');
  1806. // var terminal = evt.getProperty('terminal');
  1807. // var other = graph.model.getTerminal(edge, !evt.getProperty('source'));
  1808. //
  1809. // if (other != null && terminal != null)
  1810. // {
  1811. // App.say('connected {1} to {2}', [getWordForCell(other), getWordForCell(terminal)]);
  1812. // }
  1813. });
  1814. graph.addListener(mxEvent.CELLS_ADDED, function(sender, evt)
  1815. {
  1816. //console.log('CELLS_ADDED', evt);
  1817. var cells = evt.getProperty('cells');
  1818. if (cells.length > 1)
  1819. {
  1820. var vertexCount = 0;
  1821. var edgeCount = 0;
  1822. for (var i = 0; i < cells.length; i++)
  1823. {
  1824. var cell = cells[i];
  1825. if (graph.model.isEdge(cell))
  1826. {
  1827. edgeCount++;
  1828. }
  1829. else if (graph.model.isVertex(cell))
  1830. {
  1831. vertexCount++;
  1832. }
  1833. }
  1834. if (vertexCount > 0 && edgeCount > 0)
  1835. {
  1836. var tmp = '';
  1837. if (vertexCount == 1)
  1838. {
  1839. tmp += 'One shape';
  1840. }
  1841. else
  1842. {
  1843. tmp += '{1} shapes';
  1844. }
  1845. tmp += ' and ';
  1846. if (edgeCount == 1)
  1847. {
  1848. tmp += 'one connection';
  1849. }
  1850. else
  1851. {
  1852. tmp += '{2} connections';
  1853. }
  1854. App.say(tmp + ' inserted', [vertexCount, edgeCount]);
  1855. }
  1856. else if (vertexCount > 0)
  1857. {
  1858. App.say('{1} shapes', [vertexCount]);
  1859. }
  1860. else
  1861. {
  1862. App.say('{1} connections', [edgeCount]);
  1863. }
  1864. }
  1865. else
  1866. {
  1867. cell = cells[0];
  1868. if (graph.model.isEdge(cell) && graph.model.getTerminal(cell, true) != null &&
  1869. graph.model.getTerminal(cell, false) != null)
  1870. {
  1871. if (graph.getWordForCell(graph.model.getTerminal(cell, true)) ==
  1872. graph.getWordForCell(graph.model.getTerminal(cell, false)))
  1873. {
  1874. App.say('Connected');
  1875. }
  1876. else
  1877. {
  1878. App.say('{1} connected to {2}', [graph.getWordForCell(graph.model.getTerminal(cell, true)),
  1879. graph.getWordForCell(graph.model.getTerminal(cell, false))]);
  1880. }
  1881. }
  1882. else if (graph.model.isVertex(cell))
  1883. {
  1884. lastInserted = cell;
  1885. // Replaces camel case notation with spaces
  1886. var word = graph.getWordForCell(cell).replace(/([A-Z])/g, ' $1');
  1887. App.say('{1}', [word]);
  1888. }
  1889. }
  1890. });
  1891. graph.addListener(mxEvent.CELLS_REMOVED, function(sender, evt)
  1892. {
  1893. //console.log('CELLS_REMOVED', evt);
  1894. var cells = evt.getProperty('cells');
  1895. if (cells.length > 1)
  1896. {
  1897. App.say('{1} cells deleted', [cells.length]);
  1898. }
  1899. else
  1900. {
  1901. cell = cells[0];
  1902. App.say('{1} deleted', [graph.getWordForCell(cell)]);
  1903. }
  1904. });
  1905. }
  1906. });
  1907. /** Code for color to voice based on ntc (name that color)
  1908. /*
  1909. +-----------------------------------------------------------------+
  1910. | Created by Chirag Mehta - http://chir.ag/projects/ntc |
  1911. |-----------------------------------------------------------------|
  1912. | ntc js (Name that Color JavaScript) |
  1913. +-----------------------------------------------------------------+
  1914. All the functions, code, lists etc. have been written specifically
  1915. for the Name that Color JavaScript by Chirag Mehta unless otherwise
  1916. specified.
  1917. This script is released under the: Creative Commons License:
  1918. Attribution 2.5 http://creativecommons.org/licenses/by/2.5/
  1919. Sample Usage:
  1920. <script type="text/javascript" src="ntc.js"></script>
  1921. <script type="text/javascript">
  1922. var n_match = ntc.name("#6195ED");
  1923. n_rgb = n_match[0]; // This is the RGB value of the closest matching color
  1924. n_name = n_match[1]; // This is the text string for the name of the match
  1925. n_exactmatch = n_match[2]; // True if exact color match, False if close-match
  1926. alert(n_match);
  1927. </script>
  1928. */
  1929. var ntc = {
  1930. init: function() {
  1931. var color, rgb, hsl;
  1932. for(var i = 0; i < ntc.names.length; i++)
  1933. {
  1934. color = "#" + ntc.names[i][0];
  1935. rgb = ntc.rgb(color);
  1936. hsl = ntc.hsl(color);
  1937. ntc.names[i].push(rgb[0], rgb[1], rgb[2], hsl[0], hsl[1], hsl[2]);
  1938. }
  1939. },
  1940. name: function(color) {
  1941. color = color.toUpperCase();
  1942. if(color.length < 3 || color.length > 7)
  1943. return ["#000000", "Invalid Color: " + color, false];
  1944. if(color.length % 3 == 0)
  1945. color = "#" + color;
  1946. if(color.length == 4)
  1947. color = "#" + color.substr(1, 1) + color.substr(1, 1) + color.substr(2, 1) + color.substr(2, 1) + color.substr(3, 1) + color.substr(3, 1);
  1948. var rgb = ntc.rgb(color);
  1949. var r = rgb[0], g = rgb[1], b = rgb[2];
  1950. var hsl = ntc.hsl(color);
  1951. var h = hsl[0], s = hsl[1], l = hsl[2];
  1952. var ndf1 = 0; ndf2 = 0; ndf = 0;
  1953. var cl = -1, df = -1;
  1954. for(var i = 0; i < ntc.names.length; i++)
  1955. {
  1956. if(color == "#" + ntc.names[i][0])
  1957. return ["#" + ntc.names[i][0], ntc.names[i][1], true];
  1958. ndf1 = Math.pow(r - ntc.names[i][2], 2) + Math.pow(g - ntc.names[i][3], 2) + Math.pow(b - ntc.names[i][4], 2);
  1959. ndf2 = Math.pow(h - ntc.names[i][5], 2) + Math.pow(s - ntc.names[i][6], 2) + Math.pow(l - ntc.names[i][7], 2);
  1960. ndf = ndf1 + ndf2 * 2;
  1961. if(df < 0 || df > ndf)
  1962. {
  1963. df = ndf;
  1964. cl = i;
  1965. }
  1966. }
  1967. return (cl < 0 ? ["#000000", "Invalid Color: " + color, false] : ["#" + ntc.names[cl][0], ntc.names[cl][1], false]);
  1968. },
  1969. // adopted from: Farbtastic 1.2
  1970. // http://acko.net/dev/farbtastic
  1971. hsl: function (color) {
  1972. var rgb = [parseInt('0x' + color.substring(1, 3)) / 255, parseInt('0x' + color.substring(3, 5)) / 255, parseInt('0x' + color.substring(5, 7)) / 255];
  1973. var min, max, delta, h, s, l;
  1974. var r = rgb[0], g = rgb[1], b = rgb[2];
  1975. min = Math.min(r, Math.min(g, b));
  1976. max = Math.max(r, Math.max(g, b));
  1977. delta = max - min;
  1978. l = (min + max) / 2;
  1979. s = 0;
  1980. if(l > 0 && l < 1)
  1981. s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
  1982. h = 0;
  1983. if(delta > 0)
  1984. {
  1985. if (max == r && max != g) h += (g - b) / delta;
  1986. if (max == g && max != b) h += (2 + (b - r) / delta);
  1987. if (max == b && max != r) h += (4 + (r - g) / delta);
  1988. h /= 6;
  1989. }
  1990. return [parseInt(h * 255), parseInt(s * 255), parseInt(l * 255)];
  1991. },
  1992. // adopted from: Farbtastic 1.2
  1993. // http://acko.net/dev/farbtastic
  1994. rgb: function(color) {
  1995. return [parseInt('0x' + color.substring(1, 3)), parseInt('0x' + color.substring(3, 5)), parseInt('0x' + color.substring(5, 7))];
  1996. },
  1997. names: [
  1998. // Added all standard HTML color names / gaudenz, oct-2015
  1999. ["F0F8FF", "aliceblue"],
  2000. ["FAEBD7", "antiquewhite"],
  2001. ["00FFFF", "aqua"],
  2002. ["7FFFD4", "aquamarine"],
  2003. ["F0FFFF", "azure"],
  2004. ["F5F5DC", "beige"],
  2005. ["FFE4C4", "bisque"],
  2006. ["000000", "black"],
  2007. ["FFEBCD", "blanchedalmond"],
  2008. ["0000FF", "blue"],
  2009. ["8A2BE2", "blueviolet"],
  2010. ["A52A2A", "brown"],
  2011. ["DEB887", "burlywood"],
  2012. ["5F9EA0", "cadetblue"],
  2013. ["7FFF00", "chartreuse"],
  2014. ["D2691E", "chocolate"],
  2015. ["FF7F50", "coral"],
  2016. ["6495ED", "cornflowerblue"],
  2017. ["FFF8DC", "cornsilk"],
  2018. ["DC143C", "crimson"],
  2019. ["00FFFF", "cyan"],
  2020. ["00008B", "darkblue"],
  2021. ["008B8B", "darkcyan"],
  2022. ["B8860B", "darkgoldenrod"],
  2023. ["A9A9A9", "darkgray"],
  2024. ["A9A9A9", "darkgrey"],
  2025. ["006400", "darkgreen"],
  2026. ["BDB76B", "darkkhaki"],
  2027. ["8B008B", "darkmagenta"],
  2028. ["556B2F", "darkolivegreen"],
  2029. ["FF8C00", "darkorange"],
  2030. ["9932CC", "darkorchid"],
  2031. ["8B0000", "darkred"],
  2032. ["E9967A", "darksalmon"],
  2033. ["8FBC8F", "darkseagreen"],
  2034. ["483D8B", "darkslateblue"],
  2035. ["2F4F4F", "darkslategray"],
  2036. ["2F4F4F", "darkslategrey"],
  2037. ["00CED1", "darkturquoise"],
  2038. ["9400D3", "darkviolet"],
  2039. ["FF1493", "deeppink"],
  2040. ["00BFFF", "deepskyblue"],
  2041. ["696969", "dimgray"],
  2042. ["696969", "dimgrey"],
  2043. ["1E90FF", "dodgerblue"],
  2044. ["B22222", "firebrick"],
  2045. ["FFFAF0", "floralwhite"],
  2046. ["228B22", "forestgreen"],
  2047. ["FF00FF", "fuchsia"],
  2048. ["DCDCDC", "gainsboro"],
  2049. ["F8F8FF", "ghostwhite"],
  2050. ["FFD700", "gold"],
  2051. ["DAA520", "goldenrod"],
  2052. ["808080", "gray"],
  2053. ["808080", "grey"],
  2054. ["008000", "green"],
  2055. ["ADFF2F", "greenyellow"],
  2056. ["F0FFF0", "honeydew"],
  2057. ["FF69B4", "hotpink"],
  2058. ["CD5C5C", "indianred "],
  2059. ["4B0082", "indigo "],
  2060. ["FFFFF0", "ivory"],
  2061. ["F0E68C", "khaki"],
  2062. ["E6E6FA", "lavender"],
  2063. ["FFF0F5", "lavenderblush"],
  2064. ["7CFC00", "lawngreen"],
  2065. ["FFFACD", "lemonchiffon"],
  2066. ["ADD8E6", "lightblue"],
  2067. ["F08080", "lightcoral"],
  2068. ["E0FFFF", "lightcyan"],
  2069. ["FAFAD2", "lightgoldenrodyellow"],
  2070. ["D3D3D3", "lightgray"],
  2071. ["D3D3D3", "lightgrey"],
  2072. ["90EE90", "lightgreen"],
  2073. ["FFB6C1", "lightpink"],
  2074. ["FFA07A", "lightsalmon"],
  2075. ["20B2AA", "lightseagreen"],
  2076. ["87CEFA", "lightskyblue"],
  2077. ["778899", "lightslategray"],
  2078. ["778899", "lightslategrey"],
  2079. ["B0C4DE", "lightsteelblue"],
  2080. ["FFFFE0", "lightyellow"],
  2081. ["00FF00", "lime"],
  2082. ["32CD32", "limegreen"],
  2083. ["FAF0E6", "linen"],
  2084. ["FF00FF", "magenta"],
  2085. ["800000", "maroon"],
  2086. ["66CDAA", "mediumaquamarine"],
  2087. ["0000CD", "mediumblue"],
  2088. ["BA55D3", "mediumorchid"],
  2089. ["9370DB", "mediumpurple"],
  2090. ["3CB371", "mediumseagreen"],
  2091. ["7B68EE", "mediumslateblue"],
  2092. ["00FA9A", "mediumspringgreen"],
  2093. ["48D1CC", "mediumturquoise"],
  2094. ["C71585", "mediumvioletred"],
  2095. ["191970", "midnightblue"],
  2096. ["F5FFFA", "mintcream"],
  2097. ["FFE4E1", "mistyrose"],
  2098. ["FFE4B5", "moccasin"],
  2099. ["FFDEAD", "navajowhite"],
  2100. ["000080", "navy"],
  2101. ["FDF5E6", "oldlace"],
  2102. ["808000", "olive"],
  2103. ["6B8E23", "olivedrab"],
  2104. ["FFA500", "orange"],
  2105. ["FF4500", "orangered"],
  2106. ["DA70D6", "orchid"],
  2107. ["EEE8AA", "palegoldenrod"],
  2108. ["98FB98", "palegreen"],
  2109. ["AFEEEE", "paleturquoise"],
  2110. ["DB7093", "palevioletred"],
  2111. ["FFEFD5", "papayawhip"],
  2112. ["FFDAB9", "peachpuff"],
  2113. ["CD853F", "peru"],
  2114. ["FFC0CB", "pink"],
  2115. ["DDA0DD", "plum"],
  2116. ["B0E0E6", "powderblue"],
  2117. ["800080", "purple"],
  2118. ["FF0000", "red"],
  2119. ["BC8F8F", "rosybrown"],
  2120. ["4169E1", "royalblue"],
  2121. ["8B4513", "saddlebrown"],
  2122. ["FA8072", "salmon"],
  2123. ["F4A460", "sandybrown"],
  2124. ["2E8B57", "seagreen"],
  2125. ["FFF5EE", "seashell"],
  2126. ["A0522D", "sienna"],
  2127. ["C0C0C0", "silver"],
  2128. ["87CEEB", "skyblue"],
  2129. ["6A5ACD", "slateblue"],
  2130. ["708090", "slategray"],
  2131. ["708090", "slategrey"],
  2132. ["FFFAFA", "snow"],
  2133. ["00FF7F", "springgreen"],
  2134. ["4682B4", "steelblue"],
  2135. ["D2B48C", "tan"],
  2136. ["008080", "teal"],
  2137. ["D8BFD8", "thistle"],
  2138. ["FF6347", "tomato"],
  2139. ["40E0D0", "turquoise"],
  2140. ["EE82EE", "violet"],
  2141. ["F5DEB3", "wheat"],
  2142. ["FFFFFF", "white"],
  2143. ["F5F5F5", "whitesmoke"],
  2144. ["FFFF00", "yellow"],
  2145. ["9ACD32", "yellowgreen"],
  2146. // Existing table
  2147. ["000000", "Black"],
  2148. ["000080", "Navy Blue"],
  2149. ["0000C8", "Dark Blue"],
  2150. ["0000FF", "Blue"],
  2151. ["000741", "Stratos"],
  2152. ["001B1C", "Swamp"],
  2153. ["002387", "Resolution Blue"],
  2154. ["002900", "Deep Fir"],
  2155. ["002E20", "Burnham"],
  2156. ["002FA7", "International Klein Blue"],
  2157. ["003153", "Prussian Blue"],
  2158. ["003366", "Midnight Blue"],
  2159. ["003399", "Smalt"],
  2160. ["003532", "Deep Teal"],
  2161. ["003E40", "Cyprus"],
  2162. ["004620", "Kaitoke Green"],
  2163. ["0047AB", "Cobalt"],
  2164. ["004816", "Crusoe"],
  2165. ["004950", "Sherpa Blue"],
  2166. ["0056A7", "Endeavour"],
  2167. ["00581A", "Camarone"],
  2168. ["0066CC", "Science Blue"],
  2169. ["0066FF", "Blue Ribbon"],
  2170. ["00755E", "Tropical Rain Forest"],
  2171. ["0076A3", "Allports"],
  2172. ["007BA7", "Deep Cerulean"],
  2173. ["007EC7", "Lochmara"],
  2174. ["007FFF", "Azure Radiance"],
  2175. ["008080", "Teal"],
  2176. ["0095B6", "Bondi Blue"],
  2177. ["009DC4", "Pacific Blue"],
  2178. ["00A693", "Persian Green"],
  2179. ["00A86B", "Jade"],
  2180. ["00CC99", "Caribbean Green"],
  2181. ["00CCCC", "Robin's Egg Blue"],
  2182. ["00FF00", "Green"],
  2183. ["00FF7F", "Spring Green"],
  2184. ["00FFFF", "Cyan / Aqua"],
  2185. ["010D1A", "Blue Charcoal"],
  2186. ["011635", "Midnight"],
  2187. ["011D13", "Holly"],
  2188. ["012731", "Daintree"],
  2189. ["01361C", "Cardin Green"],
  2190. ["01371A", "County Green"],
  2191. ["013E62", "Astronaut Blue"],
  2192. ["013F6A", "Regal Blue"],
  2193. ["014B43", "Aqua Deep"],
  2194. ["015E85", "Orient"],
  2195. ["016162", "Blue Stone"],
  2196. ["016D39", "Fun Green"],
  2197. ["01796F", "Pine Green"],
  2198. ["017987", "Blue Lagoon"],
  2199. ["01826B", "Deep Sea"],
  2200. ["01A368", "Green Haze"],
  2201. ["022D15", "English Holly"],
  2202. ["02402C", "Sherwood Green"],
  2203. ["02478E", "Congress Blue"],
  2204. ["024E46", "Evening Sea"],
  2205. ["026395", "Bahama Blue"],
  2206. ["02866F", "Observatory"],
  2207. ["02A4D3", "Cerulean"],
  2208. ["03163C", "Tangaroa"],
  2209. ["032B52", "Green Vogue"],
  2210. ["036A6E", "Mosque"],
  2211. ["041004", "Midnight Moss"],
  2212. ["041322", "Black Pearl"],
  2213. ["042E4C", "Blue Whale"],
  2214. ["044022", "Zuccini"],
  2215. ["044259", "Teal Blue"],
  2216. ["051040", "Deep Cove"],
  2217. ["051657", "Gulf Blue"],
  2218. ["055989", "Venice Blue"],
  2219. ["056F57", "Watercourse"],
  2220. ["062A78", "Catalina Blue"],
  2221. ["063537", "Tiber"],
  2222. ["069B81", "Gossamer"],
  2223. ["06A189", "Niagara"],
  2224. ["073A50", "Tarawera"],
  2225. ["080110", "Jaguar"],
  2226. ["081910", "Black Bean"],
  2227. ["082567", "Deep Sapphire"],
  2228. ["088370", "Elf Green"],
  2229. ["08E8DE", "Bright Turquoise"],
  2230. ["092256", "Downriver"],
  2231. ["09230F", "Palm Green"],
  2232. ["09255D", "Madison"],
  2233. ["093624", "Bottle Green"],
  2234. ["095859", "Deep Sea Green"],
  2235. ["097F4B", "Salem"],
  2236. ["0A001C", "Black Russian"],
  2237. ["0A480D", "Dark Fern"],
  2238. ["0A6906", "Japanese Laurel"],
  2239. ["0A6F75", "Atoll"],
  2240. ["0B0B0B", "Cod Gray"],
  2241. ["0B0F08", "Marshland"],
  2242. ["0B1107", "Gordons Green"],
  2243. ["0B1304", "Black Forest"],
  2244. ["0B6207", "San Felix"],
  2245. ["0BDA51", "Malachite"],
  2246. ["0C0B1D", "Ebony"],
  2247. ["0C0D0F", "Woodsmoke"],
  2248. ["0C1911", "Racing Green"],
  2249. ["0C7A79", "Surfie Green"],
  2250. ["0C8990", "Blue Chill"],
  2251. ["0D0332", "Black Rock"],
  2252. ["0D1117", "Bunker"],
  2253. ["0D1C19", "Aztec"],
  2254. ["0D2E1C", "Bush"],
  2255. ["0E0E18", "Cinder"],
  2256. ["0E2A30", "Firefly"],
  2257. ["0F2D9E", "Torea Bay"],
  2258. ["10121D", "Vulcan"],
  2259. ["101405", "Green Waterloo"],
  2260. ["105852", "Eden"],
  2261. ["110C6C", "Arapawa"],
  2262. ["120A8F", "Ultramarine"],
  2263. ["123447", "Elephant"],
  2264. ["126B40", "Jewel"],
  2265. ["130000", "Diesel"],
  2266. ["130A06", "Asphalt"],
  2267. ["13264D", "Blue Zodiac"],
  2268. ["134F19", "Parsley"],
  2269. ["140600", "Nero"],
  2270. ["1450AA", "Tory Blue"],
  2271. ["151F4C", "Bunting"],
  2272. ["1560BD", "Denim"],
  2273. ["15736B", "Genoa"],
  2274. ["161928", "Mirage"],
  2275. ["161D10", "Hunter Green"],
  2276. ["162A40", "Big Stone"],
  2277. ["163222", "Celtic"],
  2278. ["16322C", "Timber Green"],
  2279. ["163531", "Gable Green"],
  2280. ["171F04", "Pine Tree"],
  2281. ["175579", "Chathams Blue"],
  2282. ["182D09", "Deep Forest Green"],
  2283. ["18587A", "Blumine"],
  2284. ["19330E", "Palm Leaf"],
  2285. ["193751", "Nile Blue"],
  2286. ["1959A8", "Fun Blue"],
  2287. ["1A1A68", "Lucky Point"],
  2288. ["1AB385", "Mountain Meadow"],
  2289. ["1B0245", "Tolopea"],
  2290. ["1B1035", "Haiti"],
  2291. ["1B127B", "Deep Koamaru"],
  2292. ["1B1404", "Acadia"],
  2293. ["1B2F11", "Seaweed"],
  2294. ["1B3162", "Biscay"],
  2295. ["1B659D", "Matisse"],
  2296. ["1C1208", "Crowshead"],
  2297. ["1C1E13", "Rangoon Green"],
  2298. ["1C39BB", "Persian Blue"],
  2299. ["1C402E", "Everglade"],
  2300. ["1C7C7D", "Elm"],
  2301. ["1D6142", "Green Pea"],
  2302. ["1E0F04", "Creole"],
  2303. ["1E1609", "Karaka"],
  2304. ["1E1708", "El Paso"],
  2305. ["1E385B", "Cello"],
  2306. ["1E433C", "Te Papa Green"],
  2307. ["1E90FF", "Dodger Blue"],
  2308. ["1E9AB0", "Eastern Blue"],
  2309. ["1F120F", "Night Rider"],
  2310. ["1FC2C2", "Java"],
  2311. ["20208D", "Jacksons Purple"],
  2312. ["202E54", "Cloud Burst"],
  2313. ["204852", "Blue Dianne"],
  2314. ["211A0E", "Eternity"],
  2315. ["220878", "Deep Blue"],
  2316. ["228B22", "Forest Green"],
  2317. ["233418", "Mallard"],
  2318. ["240A40", "Violet"],
  2319. ["240C02", "Kilamanjaro"],
  2320. ["242A1D", "Log Cabin"],
  2321. ["242E16", "Black Olive"],
  2322. ["24500F", "Green House"],
  2323. ["251607", "Graphite"],
  2324. ["251706", "Cannon Black"],
  2325. ["251F4F", "Port Gore"],
  2326. ["25272C", "Shark"],
  2327. ["25311C", "Green Kelp"],
  2328. ["2596D1", "Curious Blue"],
  2329. ["260368", "Paua"],
  2330. ["26056A", "Paris M"],
  2331. ["261105", "Wood Bark"],
  2332. ["261414", "Gondola"],
  2333. ["262335", "Steel Gray"],
  2334. ["26283B", "Ebony Clay"],
  2335. ["273A81", "Bay of Many"],
  2336. ["27504B", "Plantation"],
  2337. ["278A5B", "Eucalyptus"],
  2338. ["281E15", "Oil"],
  2339. ["283A77", "Astronaut"],
  2340. ["286ACD", "Mariner"],
  2341. ["290C5E", "Violent Violet"],
  2342. ["292130", "Bastille"],
  2343. ["292319", "Zeus"],
  2344. ["292937", "Charade"],
  2345. ["297B9A", "Jelly Bean"],
  2346. ["29AB87", "Jungle Green"],
  2347. ["2A0359", "Cherry Pie"],
  2348. ["2A140E", "Coffee Bean"],
  2349. ["2A2630", "Baltic Sea"],
  2350. ["2A380B", "Turtle Green"],
  2351. ["2A52BE", "Cerulean Blue"],
  2352. ["2B0202", "Sepia Black"],
  2353. ["2B194F", "Valhalla"],
  2354. ["2B3228", "Heavy Metal"],
  2355. ["2C0E8C", "Blue Gem"],
  2356. ["2C1632", "Revolver"],
  2357. ["2C2133", "Bleached Cedar"],
  2358. ["2C8C84", "Lochinvar"],
  2359. ["2D2510", "Mikado"],
  2360. ["2D383A", "Outer Space"],
  2361. ["2D569B", "St Tropaz"],
  2362. ["2E0329", "Jacaranda"],
  2363. ["2E1905", "Jacko Bean"],
  2364. ["2E3222", "Rangitoto"],
  2365. ["2E3F62", "Rhino"],
  2366. ["2E8B57", "Sea Green"],
  2367. ["2EBFD4", "Scooter"],
  2368. ["2F270E", "Onion"],
  2369. ["2F3CB3", "Governor Bay"],
  2370. ["2F519E", "Sapphire"],
  2371. ["2F5A57", "Spectra"],
  2372. ["2F6168", "Casal"],
  2373. ["300529", "Melanzane"],
  2374. ["301F1E", "Cocoa Brown"],
  2375. ["302A0F", "Woodrush"],
  2376. ["304B6A", "San Juan"],
  2377. ["30D5C8", "Turquoise"],
  2378. ["311C17", "Eclipse"],
  2379. ["314459", "Pickled Bluewood"],
  2380. ["315BA1", "Azure"],
  2381. ["31728D", "Calypso"],
  2382. ["317D82", "Paradiso"],
  2383. ["32127A", "Persian Indigo"],
  2384. ["32293A", "Blackcurrant"],
  2385. ["323232", "Mine Shaft"],
  2386. ["325D52", "Stromboli"],
  2387. ["327C14", "Bilbao"],
  2388. ["327DA0", "Astral"],
  2389. ["33036B", "Christalle"],
  2390. ["33292F", "Thunder"],
  2391. ["33CC99", "Shamrock"],
  2392. ["341515", "Tamarind"],
  2393. ["350036", "Mardi Gras"],
  2394. ["350E42", "Valentino"],
  2395. ["350E57", "Jagger"],
  2396. ["353542", "Tuna"],
  2397. ["354E8C", "Chambray"],
  2398. ["363050", "Martinique"],
  2399. ["363534", "Tuatara"],
  2400. ["363C0D", "Waiouru"],
  2401. ["36747D", "Ming"],
  2402. ["368716", "La Palma"],
  2403. ["370202", "Chocolate"],
  2404. ["371D09", "Clinker"],
  2405. ["37290E", "Brown Tumbleweed"],
  2406. ["373021", "Birch"],
  2407. ["377475", "Oracle"],
  2408. ["380474", "Blue Diamond"],
  2409. ["381A51", "Grape"],
  2410. ["383533", "Dune"],
  2411. ["384555", "Oxford Blue"],
  2412. ["384910", "Clover"],
  2413. ["394851", "Limed Spruce"],
  2414. ["396413", "Dell"],
  2415. ["3A0020", "Toledo"],
  2416. ["3A2010", "Sambuca"],
  2417. ["3A2A6A", "Jacarta"],
  2418. ["3A686C", "William"],
  2419. ["3A6A47", "Killarney"],
  2420. ["3AB09E", "Keppel"],
  2421. ["3B000B", "Temptress"],
  2422. ["3B0910", "Aubergine"],
  2423. ["3B1F1F", "Jon"],
  2424. ["3B2820", "Treehouse"],
  2425. ["3B7A57", "Amazon"],
  2426. ["3B91B4", "Boston Blue"],
  2427. ["3C0878", "Windsor"],
  2428. ["3C1206", "Rebel"],
  2429. ["3C1F76", "Meteorite"],
  2430. ["3C2005", "Dark Ebony"],
  2431. ["3C3910", "Camouflage"],
  2432. ["3C4151", "Bright Gray"],
  2433. ["3C4443", "Cape Cod"],
  2434. ["3C493A", "Lunar Green"],
  2435. ["3D0C02", "Bean "],
  2436. ["3D2B1F", "Bistre"],
  2437. ["3D7D52", "Goblin"],
  2438. ["3E0480", "Kingfisher Daisy"],
  2439. ["3E1C14", "Cedar"],
  2440. ["3E2B23", "English Walnut"],
  2441. ["3E2C1C", "Black Marlin"],
  2442. ["3E3A44", "Ship Gray"],
  2443. ["3EABBF", "Pelorous"],
  2444. ["3F2109", "Bronze"],
  2445. ["3F2500", "Cola"],
  2446. ["3F3002", "Madras"],
  2447. ["3F307F", "Minsk"],
  2448. ["3F4C3A", "Cabbage Pont"],
  2449. ["3F583B", "Tom Thumb"],
  2450. ["3F5D53", "Mineral Green"],
  2451. ["3FC1AA", "Puerto Rico"],
  2452. ["3FFF00", "Harlequin"],
  2453. ["401801", "Brown Pod"],
  2454. ["40291D", "Cork"],
  2455. ["403B38", "Masala"],
  2456. ["403D19", "Thatch Green"],
  2457. ["405169", "Fiord"],
  2458. ["40826D", "Viridian"],
  2459. ["40A860", "Chateau Green"],
  2460. ["410056", "Ripe Plum"],
  2461. ["411F10", "Paco"],
  2462. ["412010", "Deep Oak"],
  2463. ["413C37", "Merlin"],
  2464. ["414257", "Gun Powder"],
  2465. ["414C7D", "East Bay"],
  2466. ["4169E1", "Royal Blue"],
  2467. ["41AA78", "Ocean Green"],
  2468. ["420303", "Burnt Maroon"],
  2469. ["423921", "Lisbon Brown"],
  2470. ["427977", "Faded Jade"],
  2471. ["431560", "Scarlet Gum"],
  2472. ["433120", "Iroko"],
  2473. ["433E37", "Armadillo"],
  2474. ["434C59", "River Bed"],
  2475. ["436A0D", "Green Leaf"],
  2476. ["44012D", "Barossa"],
  2477. ["441D00", "Morocco Brown"],
  2478. ["444954", "Mako"],
  2479. ["454936", "Kelp"],
  2480. ["456CAC", "San Marino"],
  2481. ["45B1E8", "Picton Blue"],
  2482. ["460B41", "Loulou"],
  2483. ["462425", "Crater Brown"],
  2484. ["465945", "Gray Asparagus"],
  2485. ["4682B4", "Steel Blue"],
  2486. ["480404", "Rustic Red"],
  2487. ["480607", "Bulgarian Rose"],
  2488. ["480656", "Clairvoyant"],
  2489. ["481C1C", "Cocoa Bean"],
  2490. ["483131", "Woody Brown"],
  2491. ["483C32", "Taupe"],
  2492. ["49170C", "Van Cleef"],
  2493. ["492615", "Brown Derby"],
  2494. ["49371B", "Metallic Bronze"],
  2495. ["495400", "Verdun Green"],
  2496. ["496679", "Blue Bayoux"],
  2497. ["497183", "Bismark"],
  2498. ["4A2A04", "Bracken"],
  2499. ["4A3004", "Deep Bronze"],
  2500. ["4A3C30", "Mondo"],
  2501. ["4A4244", "Tundora"],
  2502. ["4A444B", "Gravel"],
  2503. ["4A4E5A", "Trout"],
  2504. ["4B0082", "Pigment Indigo"],
  2505. ["4B5D52", "Nandor"],
  2506. ["4C3024", "Saddle"],
  2507. ["4C4F56", "Abbey"],
  2508. ["4D0135", "Blackberry"],
  2509. ["4D0A18", "Cab Sav"],
  2510. ["4D1E01", "Indian Tan"],
  2511. ["4D282D", "Cowboy"],
  2512. ["4D282E", "Livid Brown"],
  2513. ["4D3833", "Rock"],
  2514. ["4D3D14", "Punga"],
  2515. ["4D400F", "Bronzetone"],
  2516. ["4D5328", "Woodland"],
  2517. ["4E0606", "Mahogany"],
  2518. ["4E2A5A", "Bossanova"],
  2519. ["4E3B41", "Matterhorn"],
  2520. ["4E420C", "Bronze Olive"],
  2521. ["4E4562", "Mulled Wine"],
  2522. ["4E6649", "Axolotl"],
  2523. ["4E7F9E", "Wedgewood"],
  2524. ["4EABD1", "Shakespeare"],
  2525. ["4F1C70", "Honey Flower"],
  2526. ["4F2398", "Daisy Bush"],
  2527. ["4F69C6", "Indigo"],
  2528. ["4F7942", "Fern Green"],
  2529. ["4F9D5D", "Fruit Salad"],
  2530. ["4FA83D", "Apple"],
  2531. ["504351", "Mortar"],
  2532. ["507096", "Kashmir Blue"],
  2533. ["507672", "Cutty Sark"],
  2534. ["50C878", "Emerald"],
  2535. ["514649", "Emperor"],
  2536. ["516E3D", "Chalet Green"],
  2537. ["517C66", "Como"],
  2538. ["51808F", "Smalt Blue"],
  2539. ["52001F", "Castro"],
  2540. ["520C17", "Maroon Oak"],
  2541. ["523C94", "Gigas"],
  2542. ["533455", "Voodoo"],
  2543. ["534491", "Victoria"],
  2544. ["53824B", "Hippie Green"],
  2545. ["541012", "Heath"],
  2546. ["544333", "Judge Gray"],
  2547. ["54534D", "Fuscous Gray"],
  2548. ["549019", "Vida Loca"],
  2549. ["55280C", "Cioccolato"],
  2550. ["555B10", "Saratoga"],
  2551. ["556D56", "Finlandia"],
  2552. ["5590D9", "Havelock Blue"],
  2553. ["56B4BE", "Fountain Blue"],
  2554. ["578363", "Spring Leaves"],
  2555. ["583401", "Saddle Brown"],
  2556. ["585562", "Scarpa Flow"],
  2557. ["587156", "Cactus"],
  2558. ["589AAF", "Hippie Blue"],
  2559. ["591D35", "Wine Berry"],
  2560. ["592804", "Brown Bramble"],
  2561. ["593737", "Congo Brown"],
  2562. ["594433", "Millbrook"],
  2563. ["5A6E9C", "Waikawa Gray"],
  2564. ["5A87A0", "Horizon"],
  2565. ["5B3013", "Jambalaya"],
  2566. ["5C0120", "Bordeaux"],
  2567. ["5C0536", "Mulberry Wood"],
  2568. ["5C2E01", "Carnaby Tan"],
  2569. ["5C5D75", "Comet"],
  2570. ["5D1E0F", "Redwood"],
  2571. ["5D4C51", "Don Juan"],
  2572. ["5D5C58", "Chicago"],
  2573. ["5D5E37", "Verdigris"],
  2574. ["5D7747", "Dingley"],
  2575. ["5DA19F", "Breaker Bay"],
  2576. ["5E483E", "Kabul"],
  2577. ["5E5D3B", "Hemlock"],
  2578. ["5F3D26", "Irish Coffee"],
  2579. ["5F5F6E", "Mid Gray"],
  2580. ["5F6672", "Shuttle Gray"],
  2581. ["5FA777", "Aqua Forest"],
  2582. ["5FB3AC", "Tradewind"],
  2583. ["604913", "Horses Neck"],
  2584. ["605B73", "Smoky"],
  2585. ["606E68", "Corduroy"],
  2586. ["6093D1", "Danube"],
  2587. ["612718", "Espresso"],
  2588. ["614051", "Eggplant"],
  2589. ["615D30", "Costa Del Sol"],
  2590. ["61845F", "Glade Green"],
  2591. ["622F30", "Buccaneer"],
  2592. ["623F2D", "Quincy"],
  2593. ["624E9A", "Butterfly Bush"],
  2594. ["625119", "West Coast"],
  2595. ["626649", "Finch"],
  2596. ["639A8F", "Patina"],
  2597. ["63B76C", "Fern"],
  2598. ["6456B7", "Blue Violet"],
  2599. ["646077", "Dolphin"],
  2600. ["646463", "Storm Dust"],
  2601. ["646A54", "Siam"],
  2602. ["646E75", "Nevada"],
  2603. ["6495ED", "Cornflower Blue"],
  2604. ["64CCDB", "Viking"],
  2605. ["65000B", "Rosewood"],
  2606. ["651A14", "Cherrywood"],
  2607. ["652DC1", "Purple Heart"],
  2608. ["657220", "Fern Frond"],
  2609. ["65745D", "Willow Grove"],
  2610. ["65869F", "Hoki"],
  2611. ["660045", "Pompadour"],
  2612. ["660099", "Purple"],
  2613. ["66023C", "Tyrian Purple"],
  2614. ["661010", "Dark Tan"],
  2615. ["66B58F", "Silver Tree"],
  2616. ["66FF00", "Bright Green"],
  2617. ["66FF66", "Screamin' Green"],
  2618. ["67032D", "Black Rose"],
  2619. ["675FA6", "Scampi"],
  2620. ["676662", "Ironside Gray"],
  2621. ["678975", "Viridian Green"],
  2622. ["67A712", "Christi"],
  2623. ["683600", "Nutmeg Wood Finish"],
  2624. ["685558", "Zambezi"],
  2625. ["685E6E", "Salt Box"],
  2626. ["692545", "Tawny Port"],
  2627. ["692D54", "Finn"],
  2628. ["695F62", "Scorpion"],
  2629. ["697E9A", "Lynch"],
  2630. ["6A442E", "Spice"],
  2631. ["6A5D1B", "Himalaya"],
  2632. ["6A6051", "Soya Bean"],
  2633. ["6B2A14", "Hairy Heath"],
  2634. ["6B3FA0", "Royal Purple"],
  2635. ["6B4E31", "Shingle Fawn"],
  2636. ["6B5755", "Dorado"],
  2637. ["6B8BA2", "Bermuda Gray"],
  2638. ["6B8E23", "Olive Drab"],
  2639. ["6C3082", "Eminence"],
  2640. ["6CDAE7", "Turquoise Blue"],
  2641. ["6D0101", "Lonestar"],
  2642. ["6D5E54", "Pine Cone"],
  2643. ["6D6C6C", "Dove Gray"],
  2644. ["6D9292", "Juniper"],
  2645. ["6D92A1", "Gothic"],
  2646. ["6E0902", "Red Oxide"],
  2647. ["6E1D14", "Moccaccino"],
  2648. ["6E4826", "Pickled Bean"],
  2649. ["6E4B26", "Dallas"],
  2650. ["6E6D57", "Kokoda"],
  2651. ["6E7783", "Pale Sky"],
  2652. ["6F440C", "Cafe Royale"],
  2653. ["6F6A61", "Flint"],
  2654. ["6F8E63", "Highland"],
  2655. ["6F9D02", "Limeade"],
  2656. ["6FD0C5", "Downy"],
  2657. ["701C1C", "Persian Plum"],
  2658. ["704214", "Sepia"],
  2659. ["704A07", "Antique Bronze"],
  2660. ["704F50", "Ferra"],
  2661. ["706555", "Coffee"],
  2662. ["708090", "Slate Gray"],
  2663. ["711A00", "Cedar Wood Finish"],
  2664. ["71291D", "Metallic Copper"],
  2665. ["714693", "Affair"],
  2666. ["714AB2", "Studio"],
  2667. ["715D47", "Tobacco Brown"],
  2668. ["716338", "Yellow Metal"],
  2669. ["716B56", "Peat"],
  2670. ["716E10", "Olivetone"],
  2671. ["717486", "Storm Gray"],
  2672. ["718080", "Sirocco"],
  2673. ["71D9E2", "Aquamarine Blue"],
  2674. ["72010F", "Venetian Red"],
  2675. ["724A2F", "Old Copper"],
  2676. ["726D4E", "Go Ben"],
  2677. ["727B89", "Raven"],
  2678. ["731E8F", "Seance"],
  2679. ["734A12", "Raw Umber"],
  2680. ["736C9F", "Kimberly"],
  2681. ["736D58", "Crocodile"],
  2682. ["737829", "Crete"],
  2683. ["738678", "Xanadu"],
  2684. ["74640D", "Spicy Mustard"],
  2685. ["747D63", "Limed Ash"],
  2686. ["747D83", "Rolling Stone"],
  2687. ["748881", "Blue Smoke"],
  2688. ["749378", "Laurel"],
  2689. ["74C365", "Mantis"],
  2690. ["755A57", "Russett"],
  2691. ["7563A8", "Deluge"],
  2692. ["76395D", "Cosmic"],
  2693. ["7666C6", "Blue Marguerite"],
  2694. ["76BD17", "Lima"],
  2695. ["76D7EA", "Sky Blue"],
  2696. ["770F05", "Dark Burgundy"],
  2697. ["771F1F", "Crown of Thorns"],
  2698. ["773F1A", "Walnut"],
  2699. ["776F61", "Pablo"],
  2700. ["778120", "Pacifika"],
  2701. ["779E86", "Oxley"],
  2702. ["77DD77", "Pastel Green"],
  2703. ["780109", "Japanese Maple"],
  2704. ["782D19", "Mocha"],
  2705. ["782F16", "Peanut"],
  2706. ["78866B", "Camouflage Green"],
  2707. ["788A25", "Wasabi"],
  2708. ["788BBA", "Ship Cove"],
  2709. ["78A39C", "Sea Nymph"],
  2710. ["795D4C", "Roman Coffee"],
  2711. ["796878", "Old Lavender"],
  2712. ["796989", "Rum"],
  2713. ["796A78", "Fedora"],
  2714. ["796D62", "Sandstone"],
  2715. ["79DEEC", "Spray"],
  2716. ["7A013A", "Siren"],
  2717. ["7A58C1", "Fuchsia Blue"],
  2718. ["7A7A7A", "Boulder"],
  2719. ["7A89B8", "Wild Blue Yonder"],
  2720. ["7AC488", "De York"],
  2721. ["7B3801", "Red Beech"],
  2722. ["7B3F00", "Cinnamon"],
  2723. ["7B6608", "Yukon Gold"],
  2724. ["7B7874", "Tapa"],
  2725. ["7B7C94", "Waterloo "],
  2726. ["7B8265", "Flax Smoke"],
  2727. ["7B9F80", "Amulet"],
  2728. ["7BA05B", "Asparagus"],
  2729. ["7C1C05", "Kenyan Copper"],
  2730. ["7C7631", "Pesto"],
  2731. ["7C778A", "Topaz"],
  2732. ["7C7B7A", "Concord"],
  2733. ["7C7B82", "Jumbo"],
  2734. ["7C881A", "Trendy Green"],
  2735. ["7CA1A6", "Gumbo"],
  2736. ["7CB0A1", "Acapulco"],
  2737. ["7CB7BB", "Neptune"],
  2738. ["7D2C14", "Pueblo"],
  2739. ["7DA98D", "Bay Leaf"],
  2740. ["7DC8F7", "Malibu"],
  2741. ["7DD8C6", "Bermuda"],
  2742. ["7E3A15", "Copper Canyon"],
  2743. ["7F1734", "Claret"],
  2744. ["7F3A02", "Peru Tan"],
  2745. ["7F626D", "Falcon"],
  2746. ["7F7589", "Mobster"],
  2747. ["7F76D3", "Moody Blue"],
  2748. ["7FFF00", "Chartreuse"],
  2749. ["7FFFD4", "Aquamarine"],
  2750. ["800000", "Maroon"],
  2751. ["800B47", "Rose Bud Cherry"],
  2752. ["801818", "Falu Red"],
  2753. ["80341F", "Red Robin"],
  2754. ["803790", "Vivid Violet"],
  2755. ["80461B", "Russet"],
  2756. ["807E79", "Friar Gray"],
  2757. ["808000", "Olive"],
  2758. ["808080", "Gray"],
  2759. ["80B3AE", "Gulf Stream"],
  2760. ["80B3C4", "Glacier"],
  2761. ["80CCEA", "Seagull"],
  2762. ["81422C", "Nutmeg"],
  2763. ["816E71", "Spicy Pink"],
  2764. ["817377", "Empress"],
  2765. ["819885", "Spanish Green"],
  2766. ["826F65", "Sand Dune"],
  2767. ["828685", "Gunsmoke"],
  2768. ["828F72", "Battleship Gray"],
  2769. ["831923", "Merlot"],
  2770. ["837050", "Shadow"],
  2771. ["83AA5D", "Chelsea Cucumber"],
  2772. ["83D0C6", "Monte Carlo"],
  2773. ["843179", "Plum"],
  2774. ["84A0A0", "Granny Smith"],
  2775. ["8581D9", "Chetwode Blue"],
  2776. ["858470", "Bandicoot"],
  2777. ["859FAF", "Bali Hai"],
  2778. ["85C4CC", "Half Baked"],
  2779. ["860111", "Red Devil"],
  2780. ["863C3C", "Lotus"],
  2781. ["86483C", "Ironstone"],
  2782. ["864D1E", "Bull Shot"],
  2783. ["86560A", "Rusty Nail"],
  2784. ["868974", "Bitter"],
  2785. ["86949F", "Regent Gray"],
  2786. ["871550", "Disco"],
  2787. ["87756E", "Americano"],
  2788. ["877C7B", "Hurricane"],
  2789. ["878D91", "Oslo Gray"],
  2790. ["87AB39", "Sushi"],
  2791. ["885342", "Spicy Mix"],
  2792. ["886221", "Kumera"],
  2793. ["888387", "Suva Gray"],
  2794. ["888D65", "Avocado"],
  2795. ["893456", "Camelot"],
  2796. ["893843", "Solid Pink"],
  2797. ["894367", "Cannon Pink"],
  2798. ["897D6D", "Makara"],
  2799. ["8A3324", "Burnt Umber"],
  2800. ["8A73D6", "True V"],
  2801. ["8A8360", "Clay Creek"],
  2802. ["8A8389", "Monsoon"],
  2803. ["8A8F8A", "Stack"],
  2804. ["8AB9F1", "Jordy Blue"],
  2805. ["8B00FF", "Electric Violet"],
  2806. ["8B0723", "Monarch"],
  2807. ["8B6B0B", "Corn Harvest"],
  2808. ["8B8470", "Olive Haze"],
  2809. ["8B847E", "Schooner"],
  2810. ["8B8680", "Natural Gray"],
  2811. ["8B9C90", "Mantle"],
  2812. ["8B9FEE", "Portage"],
  2813. ["8BA690", "Envy"],
  2814. ["8BA9A5", "Cascade"],
  2815. ["8BE6D8", "Riptide"],
  2816. ["8C055E", "Cardinal Pink"],
  2817. ["8C472F", "Mule Fawn"],
  2818. ["8C5738", "Potters Clay"],
  2819. ["8C6495", "Trendy Pink"],
  2820. ["8D0226", "Paprika"],
  2821. ["8D3D38", "Sanguine Brown"],
  2822. ["8D3F3F", "Tosca"],
  2823. ["8D7662", "Cement"],
  2824. ["8D8974", "Granite Green"],
  2825. ["8D90A1", "Manatee"],
  2826. ["8DA8CC", "Polo Blue"],
  2827. ["8E0000", "Red Berry"],
  2828. ["8E4D1E", "Rope"],
  2829. ["8E6F70", "Opium"],
  2830. ["8E775E", "Domino"],
  2831. ["8E8190", "Mamba"],
  2832. ["8EABC1", "Nepal"],
  2833. ["8F021C", "Pohutukawa"],
  2834. ["8F3E33", "El Salva"],
  2835. ["8F4B0E", "Korma"],
  2836. ["8F8176", "Squirrel"],
  2837. ["8FD6B4", "Vista Blue"],
  2838. ["900020", "Burgundy"],
  2839. ["901E1E", "Old Brick"],
  2840. ["907874", "Hemp"],
  2841. ["907B71", "Almond Frost"],
  2842. ["908D39", "Sycamore"],
  2843. ["92000A", "Sangria"],
  2844. ["924321", "Cumin"],
  2845. ["926F5B", "Beaver"],
  2846. ["928573", "Stonewall"],
  2847. ["928590", "Venus"],
  2848. ["9370DB", "Medium Purple"],
  2849. ["93CCEA", "Cornflower"],
  2850. ["93DFB8", "Algae Green"],
  2851. ["944747", "Copper Rust"],
  2852. ["948771", "Arrowtown"],
  2853. ["950015", "Scarlett"],
  2854. ["956387", "Strikemaster"],
  2855. ["959396", "Mountain Mist"],
  2856. ["960018", "Carmine"],
  2857. ["964B00", "Brown"],
  2858. ["967059", "Leather"],
  2859. ["9678B6", "Purple Mountain's Majesty"],
  2860. ["967BB6", "Lavender Purple"],
  2861. ["96A8A1", "Pewter"],
  2862. ["96BBAB", "Summer Green"],
  2863. ["97605D", "Au Chico"],
  2864. ["9771B5", "Wisteria"],
  2865. ["97CD2D", "Atlantis"],
  2866. ["983D61", "Vin Rouge"],
  2867. ["9874D3", "Lilac Bush"],
  2868. ["98777B", "Bazaar"],
  2869. ["98811B", "Hacienda"],
  2870. ["988D77", "Pale Oyster"],
  2871. ["98FF98", "Mint Green"],
  2872. ["990066", "Fresh Eggplant"],
  2873. ["991199", "Violet Eggplant"],
  2874. ["991613", "Tamarillo"],
  2875. ["991B07", "Totem Pole"],
  2876. ["996666", "Copper Rose"],
  2877. ["9966CC", "Amethyst"],
  2878. ["997A8D", "Mountbatten Pink"],
  2879. ["9999CC", "Blue Bell"],
  2880. ["9A3820", "Prairie Sand"],
  2881. ["9A6E61", "Toast"],
  2882. ["9A9577", "Gurkha"],
  2883. ["9AB973", "Olivine"],
  2884. ["9AC2B8", "Shadow Green"],
  2885. ["9B4703", "Oregon"],
  2886. ["9B9E8F", "Lemon Grass"],
  2887. ["9C3336", "Stiletto"],
  2888. ["9D5616", "Hawaiian Tan"],
  2889. ["9DACB7", "Gull Gray"],
  2890. ["9DC209", "Pistachio"],
  2891. ["9DE093", "Granny Smith Apple"],
  2892. ["9DE5FF", "Anakiwa"],
  2893. ["9E5302", "Chelsea Gem"],
  2894. ["9E5B40", "Sepia Skin"],
  2895. ["9EA587", "Sage"],
  2896. ["9EA91F", "Citron"],
  2897. ["9EB1CD", "Rock Blue"],
  2898. ["9EDEE0", "Morning Glory"],
  2899. ["9F381D", "Cognac"],
  2900. ["9F821C", "Reef Gold"],
  2901. ["9F9F9C", "Star Dust"],
  2902. ["9FA0B1", "Santas Gray"],
  2903. ["9FD7D3", "Sinbad"],
  2904. ["9FDD8C", "Feijoa"],
  2905. ["A02712", "Tabasco"],
  2906. ["A1750D", "Buttered Rum"],
  2907. ["A1ADB5", "Hit Gray"],
  2908. ["A1C50A", "Citrus"],
  2909. ["A1DAD7", "Aqua Island"],
  2910. ["A1E9DE", "Water Leaf"],
  2911. ["A2006D", "Flirt"],
  2912. ["A23B6C", "Rouge"],
  2913. ["A26645", "Cape Palliser"],
  2914. ["A2AAB3", "Gray Chateau"],
  2915. ["A2AEAB", "Edward"],
  2916. ["A3807B", "Pharlap"],
  2917. ["A397B4", "Amethyst Smoke"],
  2918. ["A3E3ED", "Blizzard Blue"],
  2919. ["A4A49D", "Delta"],
  2920. ["A4A6D3", "Wistful"],
  2921. ["A4AF6E", "Green Smoke"],
  2922. ["A50B5E", "Jazzberry Jam"],
  2923. ["A59B91", "Zorba"],
  2924. ["A5CB0C", "Bahia"],
  2925. ["A62F20", "Roof Terracotta"],
  2926. ["A65529", "Paarl"],
  2927. ["A68B5B", "Barley Corn"],
  2928. ["A69279", "Donkey Brown"],
  2929. ["A6A29A", "Dawn"],
  2930. ["A72525", "Mexican Red"],
  2931. ["A7882C", "Luxor Gold"],
  2932. ["A85307", "Rich Gold"],
  2933. ["A86515", "Reno Sand"],
  2934. ["A86B6B", "Coral Tree"],
  2935. ["A8989B", "Dusty Gray"],
  2936. ["A899E6", "Dull Lavender"],
  2937. ["A8A589", "Tallow"],
  2938. ["A8AE9C", "Bud"],
  2939. ["A8AF8E", "Locust"],
  2940. ["A8BD9F", "Norway"],
  2941. ["A8E3BD", "Chinook"],
  2942. ["A9A491", "Gray Olive"],
  2943. ["A9ACB6", "Aluminium"],
  2944. ["A9B2C3", "Cadet Blue"],
  2945. ["A9B497", "Schist"],
  2946. ["A9BDBF", "Tower Gray"],
  2947. ["A9BEF2", "Perano"],
  2948. ["A9C6C2", "Opal"],
  2949. ["AA375A", "Night Shadz"],
  2950. ["AA4203", "Fire"],
  2951. ["AA8B5B", "Muesli"],
  2952. ["AA8D6F", "Sandal"],
  2953. ["AAA5A9", "Shady Lady"],
  2954. ["AAA9CD", "Logan"],
  2955. ["AAABB7", "Spun Pearl"],
  2956. ["AAD6E6", "Regent St Blue"],
  2957. ["AAF0D1", "Magic Mint"],
  2958. ["AB0563", "Lipstick"],
  2959. ["AB3472", "Royal Heath"],
  2960. ["AB917A", "Sandrift"],
  2961. ["ABA0D9", "Cold Purple"],
  2962. ["ABA196", "Bronco"],
  2963. ["AC8A56", "Limed Oak"],
  2964. ["AC91CE", "East Side"],
  2965. ["AC9E22", "Lemon Ginger"],
  2966. ["ACA494", "Napa"],
  2967. ["ACA586", "Hillary"],
  2968. ["ACA59F", "Cloudy"],
  2969. ["ACACAC", "Silver Chalice"],
  2970. ["ACB78E", "Swamp Green"],
  2971. ["ACCBB1", "Spring Rain"],
  2972. ["ACDD4D", "Conifer"],
  2973. ["ACE1AF", "Celadon"],
  2974. ["AD781B", "Mandalay"],
  2975. ["ADBED1", "Casper"],
  2976. ["ADDFAD", "Moss Green"],
  2977. ["ADE6C4", "Padua"],
  2978. ["ADFF2F", "Green Yellow"],
  2979. ["AE4560", "Hippie Pink"],
  2980. ["AE6020", "Desert"],
  2981. ["AE809E", "Bouquet"],
  2982. ["AF4035", "Medium Carmine"],
  2983. ["AF4D43", "Apple Blossom"],
  2984. ["AF593E", "Brown Rust"],
  2985. ["AF8751", "Driftwood"],
  2986. ["AF8F2C", "Alpine"],
  2987. ["AF9F1C", "Lucky"],
  2988. ["AFA09E", "Martini"],
  2989. ["AFB1B8", "Bombay"],
  2990. ["AFBDD9", "Pigeon Post"],
  2991. ["B04C6A", "Cadillac"],
  2992. ["B05D54", "Matrix"],
  2993. ["B05E81", "Tapestry"],
  2994. ["B06608", "Mai Tai"],
  2995. ["B09A95", "Del Rio"],
  2996. ["B0E0E6", "Powder Blue"],
  2997. ["B0E313", "Inch Worm"],
  2998. ["B10000", "Bright Red"],
  2999. ["B14A0B", "Vesuvius"],
  3000. ["B1610B", "Pumpkin Skin"],
  3001. ["B16D52", "Santa Fe"],
  3002. ["B19461", "Teak"],
  3003. ["B1E2C1", "Fringy Flower"],
  3004. ["B1F4E7", "Ice Cold"],
  3005. ["B20931", "Shiraz"],
  3006. ["B2A1EA", "Biloba Flower"],
  3007. ["B32D29", "Tall Poppy"],
  3008. ["B35213", "Fiery Orange"],
  3009. ["B38007", "Hot Toddy"],
  3010. ["B3AF95", "Taupe Gray"],
  3011. ["B3C110", "La Rioja"],
  3012. ["B43332", "Well Read"],
  3013. ["B44668", "Blush"],
  3014. ["B4CFD3", "Jungle Mist"],
  3015. ["B57281", "Turkish Rose"],
  3016. ["B57EDC", "Lavender"],
  3017. ["B5A27F", "Mongoose"],
  3018. ["B5B35C", "Olive Green"],
  3019. ["B5D2CE", "Jet Stream"],
  3020. ["B5ECDF", "Cruise"],
  3021. ["B6316C", "Hibiscus"],
  3022. ["B69D98", "Thatch"],
  3023. ["B6B095", "Heathered Gray"],
  3024. ["B6BAA4", "Eagle"],
  3025. ["B6D1EA", "Spindle"],
  3026. ["B6D3BF", "Gum Leaf"],
  3027. ["B7410E", "Rust"],
  3028. ["B78E5C", "Muddy Waters"],
  3029. ["B7A214", "Sahara"],
  3030. ["B7A458", "Husk"],
  3031. ["B7B1B1", "Nobel"],
  3032. ["B7C3D0", "Heather"],
  3033. ["B7F0BE", "Madang"],
  3034. ["B81104", "Milano Red"],
  3035. ["B87333", "Copper"],
  3036. ["B8B56A", "Gimblet"],
  3037. ["B8C1B1", "Green Spring"],
  3038. ["B8C25D", "Celery"],
  3039. ["B8E0F9", "Sail"],
  3040. ["B94E48", "Chestnut"],
  3041. ["B95140", "Crail"],
  3042. ["B98D28", "Marigold"],
  3043. ["B9C46A", "Wild Willow"],
  3044. ["B9C8AC", "Rainee"],
  3045. ["BA0101", "Guardsman Red"],
  3046. ["BA450C", "Rock Spray"],
  3047. ["BA6F1E", "Bourbon"],
  3048. ["BA7F03", "Pirate Gold"],
  3049. ["BAB1A2", "Nomad"],
  3050. ["BAC7C9", "Submarine"],
  3051. ["BAEEF9", "Charlotte"],
  3052. ["BB3385", "Medium Red Violet"],
  3053. ["BB8983", "Brandy Rose"],
  3054. ["BBD009", "Rio Grande"],
  3055. ["BBD7C1", "Surf"],
  3056. ["BCC9C2", "Powder Ash"],
  3057. ["BD5E2E", "Tuscany"],
  3058. ["BD978E", "Quicksand"],
  3059. ["BDB1A8", "Silk"],
  3060. ["BDB2A1", "Malta"],
  3061. ["BDB3C7", "Chatelle"],
  3062. ["BDBBD7", "Lavender Gray"],
  3063. ["BDBDC6", "French Gray"],
  3064. ["BDC8B3", "Clay Ash"],
  3065. ["BDC9CE", "Loblolly"],
  3066. ["BDEDFD", "French Pass"],
  3067. ["BEA6C3", "London Hue"],
  3068. ["BEB5B7", "Pink Swan"],
  3069. ["BEDE0D", "Fuego"],
  3070. ["BF5500", "Rose of Sharon"],
  3071. ["BFB8B0", "Tide"],
  3072. ["BFBED8", "Blue Haze"],
  3073. ["BFC1C2", "Silver Sand"],
  3074. ["BFC921", "Key Lime Pie"],
  3075. ["BFDBE2", "Ziggurat"],
  3076. ["BFFF00", "Lime"],
  3077. ["C02B18", "Thunderbird"],
  3078. ["C04737", "Mojo"],
  3079. ["C08081", "Old Rose"],
  3080. ["C0C0C0", "Silver"],
  3081. ["C0D3B9", "Pale Leaf"],
  3082. ["C0D8B6", "Pixie Green"],
  3083. ["C1440E", "Tia Maria"],
  3084. ["C154C1", "Fuchsia Pink"],
  3085. ["C1A004", "Buddha Gold"],
  3086. ["C1B7A4", "Bison Hide"],
  3087. ["C1BAB0", "Tea"],
  3088. ["C1BECD", "Gray Suit"],
  3089. ["C1D7B0", "Sprout"],
  3090. ["C1F07C", "Sulu"],
  3091. ["C26B03", "Indochine"],
  3092. ["C2955D", "Twine"],
  3093. ["C2BDB6", "Cotton Seed"],
  3094. ["C2CAC4", "Pumice"],
  3095. ["C2E8E5", "Jagged Ice"],
  3096. ["C32148", "Maroon Flush"],
  3097. ["C3B091", "Indian Khaki"],
  3098. ["C3BFC1", "Pale Slate"],
  3099. ["C3C3BD", "Gray Nickel"],
  3100. ["C3CDE6", "Periwinkle Gray"],
  3101. ["C3D1D1", "Tiara"],
  3102. ["C3DDF9", "Tropical Blue"],
  3103. ["C41E3A", "Cardinal"],
  3104. ["C45655", "Fuzzy Wuzzy Brown"],
  3105. ["C45719", "Orange Roughy"],
  3106. ["C4C4BC", "Mist Gray"],
  3107. ["C4D0B0", "Coriander"],
  3108. ["C4F4EB", "Mint Tulip"],
  3109. ["C54B8C", "Mulberry"],
  3110. ["C59922", "Nugget"],
  3111. ["C5994B", "Tussock"],
  3112. ["C5DBCA", "Sea Mist"],
  3113. ["C5E17A", "Yellow Green"],
  3114. ["C62D42", "Brick Red"],
  3115. ["C6726B", "Contessa"],
  3116. ["C69191", "Oriental Pink"],
  3117. ["C6A84B", "Roti"],
  3118. ["C6C3B5", "Ash"],
  3119. ["C6C8BD", "Kangaroo"],
  3120. ["C6E610", "Las Palmas"],
  3121. ["C7031E", "Monza"],
  3122. ["C71585", "Red Violet"],
  3123. ["C7BCA2", "Coral Reef"],
  3124. ["C7C1FF", "Melrose"],
  3125. ["C7C4BF", "Cloud"],
  3126. ["C7C9D5", "Ghost"],
  3127. ["C7CD90", "Pine Glade"],
  3128. ["C7DDE5", "Botticelli"],
  3129. ["C88A65", "Antique Brass"],
  3130. ["C8A2C8", "Lilac"],
  3131. ["C8A528", "Hokey Pokey"],
  3132. ["C8AABF", "Lily"],
  3133. ["C8B568", "Laser"],
  3134. ["C8E3D7", "Edgewater"],
  3135. ["C96323", "Piper"],
  3136. ["C99415", "Pizza"],
  3137. ["C9A0DC", "Light Wisteria"],
  3138. ["C9B29B", "Rodeo Dust"],
  3139. ["C9B35B", "Sundance"],
  3140. ["C9B93B", "Earls Green"],
  3141. ["C9C0BB", "Silver Rust"],
  3142. ["C9D9D2", "Conch"],
  3143. ["C9FFA2", "Reef"],
  3144. ["C9FFE5", "Aero Blue"],
  3145. ["CA3435", "Flush Mahogany"],
  3146. ["CABB48", "Turmeric"],
  3147. ["CADCD4", "Paris White"],
  3148. ["CAE00D", "Bitter Lemon"],
  3149. ["CAE6DA", "Skeptic"],
  3150. ["CB8FA9", "Viola"],
  3151. ["CBCAB6", "Foggy Gray"],
  3152. ["CBD3B0", "Green Mist"],
  3153. ["CBDBD6", "Nebula"],
  3154. ["CC3333", "Persian Red"],
  3155. ["CC5500", "Burnt Orange"],
  3156. ["CC7722", "Ochre"],
  3157. ["CC8899", "Puce"],
  3158. ["CCCAA8", "Thistle Green"],
  3159. ["CCCCFF", "Periwinkle"],
  3160. ["CCFF00", "Electric Lime"],
  3161. ["CD5700", "Tenn"],
  3162. ["CD5C5C", "Chestnut Rose"],
  3163. ["CD8429", "Brandy Punch"],
  3164. ["CDF4FF", "Onahau"],
  3165. ["CEB98F", "Sorrell Brown"],
  3166. ["CEBABA", "Cold Turkey"],
  3167. ["CEC291", "Yuma"],
  3168. ["CEC7A7", "Chino"],
  3169. ["CFA39D", "Eunry"],
  3170. ["CFB53B", "Old Gold"],
  3171. ["CFDCCF", "Tasman"],
  3172. ["CFE5D2", "Surf Crest"],
  3173. ["CFF9F3", "Humming Bird"],
  3174. ["CFFAF4", "Scandal"],
  3175. ["D05F04", "Red Stage"],
  3176. ["D06DA1", "Hopbush"],
  3177. ["D07D12", "Meteor"],
  3178. ["D0BEF8", "Perfume"],
  3179. ["D0C0E5", "Prelude"],
  3180. ["D0F0C0", "Tea Green"],
  3181. ["D18F1B", "Geebung"],
  3182. ["D1BEA8", "Vanilla"],
  3183. ["D1C6B4", "Soft Amber"],
  3184. ["D1D2CA", "Celeste"],
  3185. ["D1D2DD", "Mischka"],
  3186. ["D1E231", "Pear"],
  3187. ["D2691E", "Hot Cinnamon"],
  3188. ["D27D46", "Raw Sienna"],
  3189. ["D29EAA", "Careys Pink"],
  3190. ["D2B48C", "Tan"],
  3191. ["D2DA97", "Deco"],
  3192. ["D2F6DE", "Blue Romance"],
  3193. ["D2F8B0", "Gossip"],
  3194. ["D3CBBA", "Sisal"],
  3195. ["D3CDC5", "Swirl"],
  3196. ["D47494", "Charm"],
  3197. ["D4B6AF", "Clam Shell"],
  3198. ["D4BF8D", "Straw"],
  3199. ["D4C4A8", "Akaroa"],
  3200. ["D4CD16", "Bird Flower"],
  3201. ["D4D7D9", "Iron"],
  3202. ["D4DFE2", "Geyser"],
  3203. ["D4E2FC", "Hawkes Blue"],
  3204. ["D54600", "Grenadier"],
  3205. ["D591A4", "Can Can"],
  3206. ["D59A6F", "Whiskey"],
  3207. ["D5D195", "Winter Hazel"],
  3208. ["D5F6E3", "Granny Apple"],
  3209. ["D69188", "My Pink"],
  3210. ["D6C562", "Tacha"],
  3211. ["D6CEF6", "Moon Raker"],
  3212. ["D6D6D1", "Quill Gray"],
  3213. ["D6FFDB", "Snowy Mint"],
  3214. ["D7837F", "New York Pink"],
  3215. ["D7C498", "Pavlova"],
  3216. ["D7D0FF", "Fog"],
  3217. ["D84437", "Valencia"],
  3218. ["D87C63", "Japonica"],
  3219. ["D8BFD8", "Thistle"],
  3220. ["D8C2D5", "Maverick"],
  3221. ["D8FCFA", "Foam"],
  3222. ["D94972", "Cabaret"],
  3223. ["D99376", "Burning Sand"],
  3224. ["D9B99B", "Cameo"],
  3225. ["D9D6CF", "Timberwolf"],
  3226. ["D9DCC1", "Tana"],
  3227. ["D9E4F5", "Link Water"],
  3228. ["D9F7FF", "Mabel"],
  3229. ["DA3287", "Cerise"],
  3230. ["DA5B38", "Flame Pea"],
  3231. ["DA6304", "Bamboo"],
  3232. ["DA6A41", "Red Damask"],
  3233. ["DA70D6", "Orchid"],
  3234. ["DA8A67", "Copperfield"],
  3235. ["DAA520", "Golden Grass"],
  3236. ["DAECD6", "Zanah"],
  3237. ["DAF4F0", "Iceberg"],
  3238. ["DAFAFF", "Oyster Bay"],
  3239. ["DB5079", "Cranberry"],
  3240. ["DB9690", "Petite Orchid"],
  3241. ["DB995E", "Di Serria"],
  3242. ["DBDBDB", "Alto"],
  3243. ["DBFFF8", "Frosted Mint"],
  3244. ["DC143C", "Crimson"],
  3245. ["DC4333", "Punch"],
  3246. ["DCB20C", "Galliano"],
  3247. ["DCB4BC", "Blossom"],
  3248. ["DCD747", "Wattle"],
  3249. ["DCD9D2", "Westar"],
  3250. ["DCDDCC", "Moon Mist"],
  3251. ["DCEDB4", "Caper"],
  3252. ["DCF0EA", "Swans Down"],
  3253. ["DDD6D5", "Swiss Coffee"],
  3254. ["DDF9F1", "White Ice"],
  3255. ["DE3163", "Cerise Red"],
  3256. ["DE6360", "Roman"],
  3257. ["DEA681", "Tumbleweed"],
  3258. ["DEBA13", "Gold Tips"],
  3259. ["DEC196", "Brandy"],
  3260. ["DECBC6", "Wafer"],
  3261. ["DED4A4", "Sapling"],
  3262. ["DED717", "Barberry"],
  3263. ["DEE5C0", "Beryl Green"],
  3264. ["DEF5FF", "Pattens Blue"],
  3265. ["DF73FF", "Heliotrope"],
  3266. ["DFBE6F", "Apache"],
  3267. ["DFCD6F", "Chenin"],
  3268. ["DFCFDB", "Lola"],
  3269. ["DFECDA", "Willow Brook"],
  3270. ["DFFF00", "Chartreuse Yellow"],
  3271. ["E0B0FF", "Mauve"],
  3272. ["E0B646", "Anzac"],
  3273. ["E0B974", "Harvest Gold"],
  3274. ["E0C095", "Calico"],
  3275. ["E0FFFF", "Baby Blue"],
  3276. ["E16865", "Sunglo"],
  3277. ["E1BC64", "Equator"],
  3278. ["E1C0C8", "Pink Flare"],
  3279. ["E1E6D6", "Periglacial Blue"],
  3280. ["E1EAD4", "Kidnapper"],
  3281. ["E1F6E8", "Tara"],
  3282. ["E25465", "Mandy"],
  3283. ["E2725B", "Terracotta"],
  3284. ["E28913", "Golden Bell"],
  3285. ["E292C0", "Shocking"],
  3286. ["E29418", "Dixie"],
  3287. ["E29CD2", "Light Orchid"],
  3288. ["E2D8ED", "Snuff"],
  3289. ["E2EBED", "Mystic"],
  3290. ["E2F3EC", "Apple Green"],
  3291. ["E30B5C", "Razzmatazz"],
  3292. ["E32636", "Alizarin Crimson"],
  3293. ["E34234", "Cinnabar"],
  3294. ["E3BEBE", "Cavern Pink"],
  3295. ["E3F5E1", "Peppermint"],
  3296. ["E3F988", "Mindaro"],
  3297. ["E47698", "Deep Blush"],
  3298. ["E49B0F", "Gamboge"],
  3299. ["E4C2D5", "Melanie"],
  3300. ["E4CFDE", "Twilight"],
  3301. ["E4D1C0", "Bone"],
  3302. ["E4D422", "Sunflower"],
  3303. ["E4D5B7", "Grain Brown"],
  3304. ["E4D69B", "Zombie"],
  3305. ["E4F6E7", "Frostee"],
  3306. ["E4FFD1", "Snow Flurry"],
  3307. ["E52B50", "Amaranth"],
  3308. ["E5841B", "Zest"],
  3309. ["E5CCC9", "Dust Storm"],
  3310. ["E5D7BD", "Stark White"],
  3311. ["E5D8AF", "Hampton"],
  3312. ["E5E0E1", "Bon Jour"],
  3313. ["E5E5E5", "Mercury"],
  3314. ["E5F9F6", "Polar"],
  3315. ["E64E03", "Trinidad"],
  3316. ["E6BE8A", "Gold Sand"],
  3317. ["E6BEA5", "Cashmere"],
  3318. ["E6D7B9", "Double Spanish White"],
  3319. ["E6E4D4", "Satin Linen"],
  3320. ["E6F2EA", "Harp"],
  3321. ["E6F8F3", "Off Green"],
  3322. ["E6FFE9", "Hint of Green"],
  3323. ["E6FFFF", "Tranquil"],
  3324. ["E77200", "Mango Tango"],
  3325. ["E7730A", "Christine"],
  3326. ["E79F8C", "Tonys Pink"],
  3327. ["E79FC4", "Kobi"],
  3328. ["E7BCB4", "Rose Fog"],
  3329. ["E7BF05", "Corn"],
  3330. ["E7CD8C", "Putty"],
  3331. ["E7ECE6", "Gray Nurse"],
  3332. ["E7F8FF", "Lily White"],
  3333. ["E7FEFF", "Bubbles"],
  3334. ["E89928", "Fire Bush"],
  3335. ["E8B9B3", "Shilo"],
  3336. ["E8E0D5", "Pearl Bush"],
  3337. ["E8EBE0", "Green White"],
  3338. ["E8F1D4", "Chrome White"],
  3339. ["E8F2EB", "Gin"],
  3340. ["E8F5F2", "Aqua Squeeze"],
  3341. ["E96E00", "Clementine"],
  3342. ["E97451", "Burnt Sienna"],
  3343. ["E97C07", "Tahiti Gold"],
  3344. ["E9CECD", "Oyster Pink"],
  3345. ["E9D75A", "Confetti"],
  3346. ["E9E3E3", "Ebb"],
  3347. ["E9F8ED", "Ottoman"],
  3348. ["E9FFFD", "Clear Day"],
  3349. ["EA88A8", "Carissma"],
  3350. ["EAAE69", "Porsche"],
  3351. ["EAB33B", "Tulip Tree"],
  3352. ["EAC674", "Rob Roy"],
  3353. ["EADAB8", "Raffia"],
  3354. ["EAE8D4", "White Rock"],
  3355. ["EAF6EE", "Panache"],
  3356. ["EAF6FF", "Solitude"],
  3357. ["EAF9F5", "Aqua Spring"],
  3358. ["EAFFFE", "Dew"],
  3359. ["EB9373", "Apricot"],
  3360. ["EBC2AF", "Zinnwaldite"],
  3361. ["ECA927", "Fuel Yellow"],
  3362. ["ECC54E", "Ronchi"],
  3363. ["ECC7EE", "French Lilac"],
  3364. ["ECCDB9", "Just Right"],
  3365. ["ECE090", "Wild Rice"],
  3366. ["ECEBBD", "Fall Green"],
  3367. ["ECEBCE", "Aths Special"],
  3368. ["ECF245", "Starship"],
  3369. ["ED0A3F", "Red Ribbon"],
  3370. ["ED7A1C", "Tango"],
  3371. ["ED9121", "Carrot Orange"],
  3372. ["ED989E", "Sea Pink"],
  3373. ["EDB381", "Tacao"],
  3374. ["EDC9AF", "Desert Sand"],
  3375. ["EDCDAB", "Pancho"],
  3376. ["EDDCB1", "Chamois"],
  3377. ["EDEA99", "Primrose"],
  3378. ["EDF5DD", "Frost"],
  3379. ["EDF5F5", "Aqua Haze"],
  3380. ["EDF6FF", "Zumthor"],
  3381. ["EDF9F1", "Narvik"],
  3382. ["EDFC84", "Honeysuckle"],
  3383. ["EE82EE", "Lavender Magenta"],
  3384. ["EEC1BE", "Beauty Bush"],
  3385. ["EED794", "Chalky"],
  3386. ["EED9C4", "Almond"],
  3387. ["EEDC82", "Flax"],
  3388. ["EEDEDA", "Bizarre"],
  3389. ["EEE3AD", "Double Colonial White"],
  3390. ["EEEEE8", "Cararra"],
  3391. ["EEEF78", "Manz"],
  3392. ["EEF0C8", "Tahuna Sands"],
  3393. ["EEF0F3", "Athens Gray"],
  3394. ["EEF3C3", "Tusk"],
  3395. ["EEF4DE", "Loafer"],
  3396. ["EEF6F7", "Catskill White"],
  3397. ["EEFDFF", "Twilight Blue"],
  3398. ["EEFF9A", "Jonquil"],
  3399. ["EEFFE2", "Rice Flower"],
  3400. ["EF863F", "Jaffa"],
  3401. ["EFEFEF", "Gallery"],
  3402. ["EFF2F3", "Porcelain"],
  3403. ["F091A9", "Mauvelous"],
  3404. ["F0D52D", "Golden Dream"],
  3405. ["F0DB7D", "Golden Sand"],
  3406. ["F0DC82", "Buff"],
  3407. ["F0E2EC", "Prim"],
  3408. ["F0E68C", "Khaki"],
  3409. ["F0EEFD", "Selago"],
  3410. ["F0EEFF", "Titan White"],
  3411. ["F0F8FF", "Alice Blue"],
  3412. ["F0FCEA", "Feta"],
  3413. ["F18200", "Gold Drop"],
  3414. ["F19BAB", "Wewak"],
  3415. ["F1E788", "Sahara Sand"],
  3416. ["F1E9D2", "Parchment"],
  3417. ["F1E9FF", "Blue Chalk"],
  3418. ["F1EEC1", "Mint Julep"],
  3419. ["F1F1F1", "Seashell"],
  3420. ["F1F7F2", "Saltpan"],
  3421. ["F1FFAD", "Tidal"],
  3422. ["F1FFC8", "Chiffon"],
  3423. ["F2552A", "Flamingo"],
  3424. ["F28500", "Tangerine"],
  3425. ["F2C3B2", "Mandys Pink"],
  3426. ["F2F2F2", "Concrete"],
  3427. ["F2FAFA", "Black Squeeze"],
  3428. ["F34723", "Pomegranate"],
  3429. ["F3AD16", "Buttercup"],
  3430. ["F3D69D", "New Orleans"],
  3431. ["F3D9DF", "Vanilla Ice"],
  3432. ["F3E7BB", "Sidecar"],
  3433. ["F3E9E5", "Dawn Pink"],
  3434. ["F3EDCF", "Wheatfield"],
  3435. ["F3FB62", "Canary"],
  3436. ["F3FBD4", "Orinoco"],
  3437. ["F3FFD8", "Carla"],
  3438. ["F400A1", "Hollywood Cerise"],
  3439. ["F4A460", "Sandy brown"],
  3440. ["F4C430", "Saffron"],
  3441. ["F4D81C", "Ripe Lemon"],
  3442. ["F4EBD3", "Janna"],
  3443. ["F4F2EE", "Pampas"],
  3444. ["F4F4F4", "Wild Sand"],
  3445. ["F4F8FF", "Zircon"],
  3446. ["F57584", "Froly"],
  3447. ["F5C85C", "Cream Can"],
  3448. ["F5C999", "Manhattan"],
  3449. ["F5D5A0", "Maize"],
  3450. ["F5DEB3", "Wheat"],
  3451. ["F5E7A2", "Sandwisp"],
  3452. ["F5E7E2", "Pot Pourri"],
  3453. ["F5E9D3", "Albescent White"],
  3454. ["F5EDEF", "Soft Peach"],
  3455. ["F5F3E5", "Ecru White"],
  3456. ["F5F5DC", "Beige"],
  3457. ["F5FB3D", "Golden Fizz"],
  3458. ["F5FFBE", "Australian Mint"],
  3459. ["F64A8A", "French Rose"],
  3460. ["F653A6", "Brilliant Rose"],
  3461. ["F6A4C9", "Illusion"],
  3462. ["F6F0E6", "Merino"],
  3463. ["F6F7F7", "Black Haze"],
  3464. ["F6FFDC", "Spring Sun"],
  3465. ["F7468A", "Violet Red"],
  3466. ["F77703", "Chilean Fire"],
  3467. ["F77FBE", "Persian Pink"],
  3468. ["F7B668", "Rajah"],
  3469. ["F7C8DA", "Azalea"],
  3470. ["F7DBE6", "We Peep"],
  3471. ["F7F2E1", "Quarter Spanish White"],
  3472. ["F7F5FA", "Whisper"],
  3473. ["F7FAF7", "Snow Drift"],
  3474. ["F8B853", "Casablanca"],
  3475. ["F8C3DF", "Chantilly"],
  3476. ["F8D9E9", "Cherub"],
  3477. ["F8DB9D", "Marzipan"],
  3478. ["F8DD5C", "Energy Yellow"],
  3479. ["F8E4BF", "Givry"],
  3480. ["F8F0E8", "White Linen"],
  3481. ["F8F4FF", "Magnolia"],
  3482. ["F8F6F1", "Spring Wood"],
  3483. ["F8F7DC", "Coconut Cream"],
  3484. ["F8F7FC", "White Lilac"],
  3485. ["F8F8F7", "Desert Storm"],
  3486. ["F8F99C", "Texas"],
  3487. ["F8FACD", "Corn Field"],
  3488. ["F8FDD3", "Mimosa"],
  3489. ["F95A61", "Carnation"],
  3490. ["F9BF58", "Saffron Mango"],
  3491. ["F9E0ED", "Carousel Pink"],
  3492. ["F9E4BC", "Dairy Cream"],
  3493. ["F9E663", "Portica"],
  3494. ["F9EAF3", "Amour"],
  3495. ["F9F8E4", "Rum Swizzle"],
  3496. ["F9FF8B", "Dolly"],
  3497. ["F9FFF6", "Sugar Cane"],
  3498. ["FA7814", "Ecstasy"],
  3499. ["FA9D5A", "Tan Hide"],
  3500. ["FAD3A2", "Corvette"],
  3501. ["FADFAD", "Peach Yellow"],
  3502. ["FAE600", "Turbo"],
  3503. ["FAEAB9", "Astra"],
  3504. ["FAECCC", "Champagne"],
  3505. ["FAF0E6", "Linen"],
  3506. ["FAF3F0", "Fantasy"],
  3507. ["FAF7D6", "Citrine White"],
  3508. ["FAFAFA", "Alabaster"],
  3509. ["FAFDE4", "Hint of Yellow"],
  3510. ["FAFFA4", "Milan"],
  3511. ["FB607F", "Brink Pink"],
  3512. ["FB8989", "Geraldine"],
  3513. ["FBA0E3", "Lavender Rose"],
  3514. ["FBA129", "Sea Buckthorn"],
  3515. ["FBAC13", "Sun"],
  3516. ["FBAED2", "Lavender Pink"],
  3517. ["FBB2A3", "Rose Bud"],
  3518. ["FBBEDA", "Cupid"],
  3519. ["FBCCE7", "Classic Rose"],
  3520. ["FBCEB1", "Apricot Peach"],
  3521. ["FBE7B2", "Banana Mania"],
  3522. ["FBE870", "Marigold Yellow"],
  3523. ["FBE96C", "Festival"],
  3524. ["FBEA8C", "Sweet Corn"],
  3525. ["FBEC5D", "Candy Corn"],
  3526. ["FBF9F9", "Hint of Red"],
  3527. ["FBFFBA", "Shalimar"],
  3528. ["FC0FC0", "Shocking Pink"],
  3529. ["FC80A5", "Tickle Me Pink"],
  3530. ["FC9C1D", "Tree Poppy"],
  3531. ["FCC01E", "Lightning Yellow"],
  3532. ["FCD667", "Goldenrod"],
  3533. ["FCD917", "Candlelight"],
  3534. ["FCDA98", "Cherokee"],
  3535. ["FCF4D0", "Double Pearl Lusta"],
  3536. ["FCF4DC", "Pearl Lusta"],
  3537. ["FCF8F7", "Vista White"],
  3538. ["FCFBF3", "Bianca"],
  3539. ["FCFEDA", "Moon Glow"],
  3540. ["FCFFE7", "China Ivory"],
  3541. ["FCFFF9", "Ceramic"],
  3542. ["FD0E35", "Torch Red"],
  3543. ["FD5B78", "Wild Watermelon"],
  3544. ["FD7B33", "Crusta"],
  3545. ["FD7C07", "Sorbus"],
  3546. ["FD9FA2", "Sweet Pink"],
  3547. ["FDD5B1", "Light Apricot"],
  3548. ["FDD7E4", "Pig Pink"],
  3549. ["FDE1DC", "Cinderella"],
  3550. ["FDE295", "Golden Glow"],
  3551. ["FDE910", "Lemon"],
  3552. ["FDF5E6", "Old Lace"],
  3553. ["FDF6D3", "Half Colonial White"],
  3554. ["FDF7AD", "Drover"],
  3555. ["FDFEB8", "Pale Prim"],
  3556. ["FDFFD5", "Cumulus"],
  3557. ["FE28A2", "Persian Rose"],
  3558. ["FE4C40", "Sunset Orange"],
  3559. ["FE6F5E", "Bittersweet"],
  3560. ["FE9D04", "California"],
  3561. ["FEA904", "Yellow Sea"],
  3562. ["FEBAAD", "Melon"],
  3563. ["FED33C", "Bright Sun"],
  3564. ["FED85D", "Dandelion"],
  3565. ["FEDB8D", "Salomie"],
  3566. ["FEE5AC", "Cape Honey"],
  3567. ["FEEBF3", "Remy"],
  3568. ["FEEFCE", "Oasis"],
  3569. ["FEF0EC", "Bridesmaid"],
  3570. ["FEF2C7", "Beeswax"],
  3571. ["FEF3D8", "Bleach White"],
  3572. ["FEF4CC", "Pipi"],
  3573. ["FEF4DB", "Half Spanish White"],
  3574. ["FEF4F8", "Wisp Pink"],
  3575. ["FEF5F1", "Provincial Pink"],
  3576. ["FEF7DE", "Half Dutch White"],
  3577. ["FEF8E2", "Solitaire"],
  3578. ["FEF8FF", "White Pointer"],
  3579. ["FEF9E3", "Off Yellow"],
  3580. ["FEFCED", "Orange White"],
  3581. ["FF0000", "Red"],
  3582. ["FF007F", "Rose"],
  3583. ["FF00CC", "Purple Pizzazz"],
  3584. ["FF00FF", "Magenta / Fuchsia"],
  3585. ["FF2400", "Scarlet"],
  3586. ["FF3399", "Wild Strawberry"],
  3587. ["FF33CC", "Razzle Dazzle Rose"],
  3588. ["FF355E", "Radical Red"],
  3589. ["FF3F34", "Red Orange"],
  3590. ["FF4040", "Coral Red"],
  3591. ["FF4D00", "Vermilion"],
  3592. ["FF4F00", "International Orange"],
  3593. ["FF6037", "Outrageous Orange"],
  3594. ["FF6600", "Blaze Orange"],
  3595. ["FF66FF", "Pink Flamingo"],
  3596. ["FF681F", "Orange"],
  3597. ["FF69B4", "Hot Pink"],
  3598. ["FF6B53", "Persimmon"],
  3599. ["FF6FFF", "Blush Pink"],
  3600. ["FF7034", "Burning Orange"],
  3601. ["FF7518", "Pumpkin"],
  3602. ["FF7D07", "Flamenco"],
  3603. ["FF7F00", "Flush Orange"],
  3604. ["FF7F50", "Coral"],
  3605. ["FF8C69", "Salmon"],
  3606. ["FF9000", "Pizazz"],
  3607. ["FF910F", "West Side"],
  3608. ["FF91A4", "Pink Salmon"],
  3609. ["FF9933", "Neon Carrot"],
  3610. ["FF9966", "Atomic Tangerine"],
  3611. ["FF9980", "Vivid Tangerine"],
  3612. ["FF9E2C", "Sunshade"],
  3613. ["FFA000", "Orange Peel"],
  3614. ["FFA194", "Mona Lisa"],
  3615. ["FFA500", "Web Orange"],
  3616. ["FFA6C9", "Carnation Pink"],
  3617. ["FFAB81", "Hit Pink"],
  3618. ["FFAE42", "Yellow Orange"],
  3619. ["FFB0AC", "Cornflower Lilac"],
  3620. ["FFB1B3", "Sundown"],
  3621. ["FFB31F", "My Sin"],
  3622. ["FFB555", "Texas Rose"],
  3623. ["FFB7D5", "Cotton Candy"],
  3624. ["FFB97B", "Macaroni and Cheese"],
  3625. ["FFBA00", "Selective Yellow"],
  3626. ["FFBD5F", "Koromiko"],
  3627. ["FFBF00", "Amber"],
  3628. ["FFC0A8", "Wax Flower"],
  3629. ["FFC0CB", "Pink"],
  3630. ["FFC3C0", "Your Pink"],
  3631. ["FFC901", "Supernova"],
  3632. ["FFCBA4", "Flesh"],
  3633. ["FFCC33", "Sunglow"],
  3634. ["FFCC5C", "Golden Tainoi"],
  3635. ["FFCC99", "Peach Orange"],
  3636. ["FFCD8C", "Chardonnay"],
  3637. ["FFD1DC", "Pastel Pink"],
  3638. ["FFD2B7", "Romantic"],
  3639. ["FFD38C", "Grandis"],
  3640. ["FFD700", "Gold"],
  3641. ["FFD800", "School bus Yellow"],
  3642. ["FFD8D9", "Cosmos"],
  3643. ["FFDB58", "Mustard"],
  3644. ["FFDCD6", "Peach Schnapps"],
  3645. ["FFDDAF", "Caramel"],
  3646. ["FFDDCD", "Tuft Bush"],
  3647. ["FFDDCF", "Watusi"],
  3648. ["FFDDF4", "Pink Lace"],
  3649. ["FFDEAD", "Navajo White"],
  3650. ["FFDEB3", "Frangipani"],
  3651. ["FFE1DF", "Pippin"],
  3652. ["FFE1F2", "Pale Rose"],
  3653. ["FFE2C5", "Negroni"],
  3654. ["FFE5A0", "Cream Brulee"],
  3655. ["FFE5B4", "Peach"],
  3656. ["FFE6C7", "Tequila"],
  3657. ["FFE772", "Kournikova"],
  3658. ["FFEAC8", "Sandy Beach"],
  3659. ["FFEAD4", "Karry"],
  3660. ["FFEC13", "Broom"],
  3661. ["FFEDBC", "Colonial White"],
  3662. ["FFEED8", "Derby"],
  3663. ["FFEFA1", "Vis Vis"],
  3664. ["FFEFC1", "Egg White"],
  3665. ["FFEFD5", "Papaya Whip"],
  3666. ["FFEFEC", "Fair Pink"],
  3667. ["FFF0DB", "Peach Cream"],
  3668. ["FFF0F5", "Lavender blush"],
  3669. ["FFF14F", "Gorse"],
  3670. ["FFF1B5", "Buttermilk"],
  3671. ["FFF1D8", "Pink Lady"],
  3672. ["FFF1EE", "Forget Me Not"],
  3673. ["FFF1F9", "Tutu"],
  3674. ["FFF39D", "Picasso"],
  3675. ["FFF3F1", "Chardon"],
  3676. ["FFF46E", "Paris Daisy"],
  3677. ["FFF4CE", "Barley White"],
  3678. ["FFF4DD", "Egg Sour"],
  3679. ["FFF4E0", "Sazerac"],
  3680. ["FFF4E8", "Serenade"],
  3681. ["FFF4F3", "Chablis"],
  3682. ["FFF5EE", "Seashell Peach"],
  3683. ["FFF5F3", "Sauvignon"],
  3684. ["FFF6D4", "Milk Punch"],
  3685. ["FFF6DF", "Varden"],
  3686. ["FFF6F5", "Rose White"],
  3687. ["FFF8D1", "Baja White"],
  3688. ["FFF9E2", "Gin Fizz"],
  3689. ["FFF9E6", "Early Dawn"],
  3690. ["FFFACD", "Lemon Chiffon"],
  3691. ["FFFAF4", "Bridal Heath"],
  3692. ["FFFBDC", "Scotch Mist"],
  3693. ["FFFBF9", "Soapstone"],
  3694. ["FFFC99", "Witch Haze"],
  3695. ["FFFCEA", "Buttery White"],
  3696. ["FFFCEE", "Island Spice"],
  3697. ["FFFDD0", "Cream"],
  3698. ["FFFDE6", "Chilean Heath"],
  3699. ["FFFDE8", "Travertine"],
  3700. ["FFFDF3", "Orchid White"],
  3701. ["FFFDF4", "Quarter Pearl Lusta"],
  3702. ["FFFEE1", "Half and Half"],
  3703. ["FFFEEC", "Apricot White"],
  3704. ["FFFEF0", "Rice Cake"],
  3705. ["FFFEF6", "Black White"],
  3706. ["FFFEFD", "Romance"],
  3707. ["FFFF00", "Yellow"],
  3708. ["FFFF66", "Laser Lemon"],
  3709. ["FFFF99", "Pale Canary"],
  3710. ["FFFFB4", "Portafino"],
  3711. ["FFFFF0", "Ivory"],
  3712. ["FFFFFF", "White"]
  3713. ]
  3714. }
  3715. ntc.init();