Advertisement
Guest User

morecolors.inc old version

a guest
Jul 29th, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.21 KB | None | 0 0
  1. // MOAR COLORS
  2. // By Dr. McKay
  3. // Inspired by: https://forums.alliedmods.net/showthread.php?t=96831
  4.  
  5. #if defined _colors_included
  6. #endinput
  7. #endif
  8. #define _colors_included
  9.  
  10. #define MORE_COLORS_VERSION "1.4.1"
  11. #define MAX_MESSAGE_LENGTH 250
  12.  
  13. #define COLOR_RED 0xFF4040
  14. #define COLOR_BLUE 0x99CCFF
  15. #define COLOR_GRAY 0xCCCCCC
  16. #define COLOR_GREEN 0x3EFF3E
  17.  
  18. new bool:CSkipList[MAXPLAYERS + 1] = {false, ...};
  19. new Handle:CTrie = INVALID_HANDLE;
  20.  
  21. /**
  22. * Prints a message to a specific client in the chat area.
  23. * Supports color tags.
  24. *
  25. * @param client Client index.
  26. * @param message Message (formatting rules).
  27. * @noreturn
  28. *
  29. * On error/Errors: If the client is not connected an error will be thrown.
  30. */
  31. stock CPrintToChat(client, const String:message[], any:...) {
  32. CCheckTrie();
  33. if(client <= 0 || client > MaxClients) {
  34. ThrowError("Invalid client index %i", client);
  35. }
  36. if(!IsClientInGame(client)) {
  37. ThrowError("Client %i is not in game", client);
  38. }
  39. decl String:buffer[MAX_MESSAGE_LENGTH], String:buffer2[MAX_MESSAGE_LENGTH];
  40. SetGlobalTransTarget(client);
  41. Format(buffer, sizeof(buffer), "\x01%s", message);
  42. VFormat(buffer2, sizeof(buffer2), buffer, 3);
  43. CReplaceColorCodes(buffer2);
  44. CSendMessage(client, buffer2);
  45. }
  46.  
  47. /**
  48. * Prints a message to all clients in the chat area.
  49. * Supports color tags.
  50. *
  51. * @param client Client index.
  52. * @param message Message (formatting rules).
  53. * @noreturn
  54. */
  55. stock CPrintToChatAll(const String:message[], any:...) {
  56. CCheckTrie();
  57. decl String:buffer[MAX_MESSAGE_LENGTH], String:buffer2[MAX_MESSAGE_LENGTH];
  58. for(new i = 1; i <= MaxClients; i++) {
  59. if(!IsClientInGame(i) || IsFakeClient(i) || CSkipList[i]) {
  60. CSkipList[i] = false;
  61. continue;
  62. }
  63. SetGlobalTransTarget(i);
  64. Format(buffer, sizeof(buffer), "\x01%s", message);
  65. VFormat(buffer2, sizeof(buffer2), buffer, 2);
  66. CReplaceColorCodes(buffer2);
  67. CSendMessage(i, buffer2);
  68. }
  69. }
  70.  
  71. /**
  72. * Prints a message to a specific client in the chat area.
  73. * Supports color tags and teamcolor tag.
  74. *
  75. * @param client Client index.
  76. * @param author Author index whose color will be used for teamcolor tag.
  77. * @param message Message (formatting rules).
  78. * @noreturn
  79. *
  80. * On error/Errors: If the client or author are not connected an error will be thrown
  81. */
  82. stock CPrintToChatEx(client, author, const String:message[], any:...) {
  83. CCheckTrie();
  84. if(client <= 0 || client > MaxClients) {
  85. ThrowError("Invalid client index %i", client);
  86. }
  87. if(!IsClientInGame(client)) {
  88. ThrowError("Client %i is not in game", client);
  89. }
  90. if(author <= 0 || author > MaxClients) {
  91. ThrowError("Invalid client index %i", author);
  92. }
  93. if(!IsClientInGame(author)) {
  94. ThrowError("Client %i is not in game", author);
  95. }
  96. decl String:buffer[MAX_MESSAGE_LENGTH], String:buffer2[MAX_MESSAGE_LENGTH];
  97. SetGlobalTransTarget(client);
  98. Format(buffer, sizeof(buffer), "\x01%s", message);
  99. VFormat(buffer2, sizeof(buffer2), buffer, 4);
  100. CReplaceColorCodes(buffer2, author);
  101. CSendMessage(client, buffer2);
  102. }
  103.  
  104. /**
  105. * Prints a message to all clients in the chat area.
  106. * Supports color tags and teamcolor tag.
  107. *
  108. * @param author Author index whos color will be used for teamcolor tag.
  109. * @param message Message (formatting rules).
  110. * @noreturn
  111. *
  112. * On error/Errors: If the author is not connected an error will be thrown.
  113. */
  114. stock CPrintToChatAllEx(author, const String:message[], any:...) {
  115. CCheckTrie();
  116. if(author <= 0 || author > MaxClients) {
  117. ThrowError("Invalid client index %i", author);
  118. }
  119. if(!IsClientInGame(author)) {
  120. ThrowError("Client %i is not in game", author);
  121. }
  122. decl String:buffer[MAX_MESSAGE_LENGTH], String:buffer2[MAX_MESSAGE_LENGTH];
  123. for(new i = 1; i <= MaxClients; i++) {
  124. if(!IsClientInGame(i) || IsFakeClient(i) || CSkipList[i]) {
  125. CSkipList[i] = false;
  126. continue;
  127. }
  128. SetGlobalTransTarget(i);
  129. Format(buffer, sizeof(buffer), "\x01%s", message);
  130. VFormat(buffer2, sizeof(buffer2), buffer, 3);
  131. CReplaceColorCodes(buffer2, author);
  132. CSendMessage(i, buffer2);
  133. }
  134. }
  135.  
  136. /**
  137. * Sends a SayText2 usermessage
  138. * @param client Client to send usermessage to
  139. * @param message Message to send
  140. * @noreturn
  141. */
  142. stock CSendMessage(client, const String:message[]) {
  143. new UserMsg:index = GetUserMessageId("SayText2");
  144. if(index == INVALID_MESSAGE_ID) {
  145. PrintToChat(client, message);
  146. return;
  147. }
  148. new Handle:bf = StartMessageOne("SayText2", client, USERMSG_RELIABLE|USERMSG_BLOCKHOOKS);
  149. BfWriteByte(bf, client);
  150. BfWriteByte(bf, 0);
  151. BfWriteString(bf, message);
  152. EndMessage();
  153. }
  154.  
  155. /**
  156. * This function should only be used right in front of
  157. * CPrintToChatAll or CPrintToChatAllEx and it tells
  158. * to those funcions to skip specified client when printing
  159. * message to all clients. After message is printed client will
  160. * no more be skipped.
  161. *
  162. * @param client Client index
  163. * @noreturn
  164. */
  165. stock CSkipNextClient(client) {
  166. if(client <= 0 || client > MaxClients) {
  167. ThrowError("Invalid client index %i", client);
  168. }
  169. CSkipList[client] = true;
  170. }
  171.  
  172. /**
  173. * Checks if the colors trie is initialized and initializes it if it's not (used internally)
  174. *
  175. * @return No return
  176. */
  177. stock CCheckTrie() {
  178. if(CTrie == INVALID_HANDLE) {
  179. CTrie = InitColorTrie();
  180. }
  181. }
  182.  
  183. /**
  184. * Replaces color tags in a string with color codes (used internally by CPrintToChat, CPrintToChatAll, CPrintToChatEx, and CPrintToChatAllEx
  185. *
  186. * @param buffer String.
  187. * @param author Optional client index to use for {teamcolor} tags, or 0 for none
  188. * @param removeTags Optional boolean value to determine whether we're replacing tags with colors, or just removing tags, used by CRemoveTags
  189. * @param maxlen Optional value for max buffer length, used by CRemoveTags
  190. * @noreturn
  191. *
  192. * On error/Errors: If the client index passed for author is invalid or not in game.
  193. */
  194. stock CReplaceColorCodes(String:buffer[], author=0, bool:removeTags=false, maxlen=MAX_MESSAGE_LENGTH) {
  195. CCheckTrie();
  196. if(!removeTags) {
  197. ReplaceString(buffer, maxlen, "{default}", "\x01", false);
  198. } else {
  199. ReplaceString(buffer, maxlen, "{default}", "", false);
  200. ReplaceString(buffer, maxlen, "{teamcolor}", "", false);
  201. }
  202. if(author != 0 && !removeTags) {
  203. if(author < 0 || author > MaxClients) {
  204. ThrowError("Invalid client index %i", author);
  205. }
  206. if(!IsClientInGame(author)) {
  207. ThrowError("Client %i is not in game", author);
  208. }
  209. decl String:team[16];
  210. Format(team, sizeof(team), "\x07%06X", CGetTeamColor(author));
  211. ReplaceString(buffer, maxlen, "{teamcolor}", team, false);
  212. }
  213. decl String:part[maxlen], String:find[32], String:replace[16];
  214. new value, first, last;
  215. new index = 0;
  216. for(new i = 0; i < 100; i++) { // conditions are failsafe, we'll return in the loop
  217. first = FindCharInString(buffer[index], '{');
  218. last = FindCharInString(buffer[index], '}');
  219. if(first == -1 || last == -1) {
  220. return; // no opening or closing brace
  221. }
  222. first++;
  223. last--;
  224. for(new j = 0; j <= last - first + 1; j++) { // everything from this point on is really confusing
  225. if(j == last - first + 1) {
  226. part[j] = 0;
  227. break;
  228. }
  229. part[j] = buffer[index + first + j];
  230. }
  231. index += last + 2;
  232. StrToLower(part);
  233. if(GetTrieValue(CTrie, part, value)) {
  234. Format(find, sizeof(find), "{%s}", part);
  235. Format(replace, sizeof(replace), "\x07%06X", value);
  236. if(!removeTags) {
  237. ReplaceString(buffer, maxlen, find, replace, false);
  238. } else {
  239. ReplaceString(buffer, maxlen, find, "", false);
  240. }
  241. }
  242. }
  243. }
  244.  
  245. /**
  246. * Converts a string to lowercase
  247. *
  248. * @param buffer String to convert
  249. * @noreturn
  250. */
  251. stock StrToLower(String:buffer[]) {
  252. new len = strlen(buffer);
  253. for(new i = 0; i < len; i++) {
  254. buffer[i] = CharToLower(buffer[i]);
  255. }
  256. }
  257.  
  258. /**
  259. * Adds a color to the colors trie
  260. *
  261. * @param name Color name, without braces
  262. * @param color Hexadecimal representation of the color (0xRRGGBB)
  263. * @return True if color was added successfully, false if a color already exists with that name
  264. */
  265. stock bool:CAddColor(const String:name[], color) {
  266. CCheckTrie();
  267. new value;
  268. if(GetTrieValue(CTrie, name, value)) {
  269. return false;
  270. }
  271. decl String:newName[64];
  272. strcopy(newName, sizeof(newName), name);
  273. StrToLower(newName);
  274. SetTrieValue(CTrie, newName, color);
  275. return true;
  276. }
  277.  
  278. /**
  279. * Removes color tags from a message
  280. *
  281. * @param message Message to remove tags from
  282. * @param maxlen Maximum buffer length
  283. * @noreturn
  284. */
  285. stock CRemoveTags(String:message[], maxlen) {
  286. CReplaceColorCodes(message, 0, true, maxlen);
  287. }
  288.  
  289. /**
  290. * Replies to a command with colors
  291. *
  292. * @param client Client to reply to
  293. * @param message Message (formatting rules)
  294. * @noreturn
  295. */
  296. stock CReplyToCommand(client, const String:message[], any:...) {
  297. decl String:buffer[MAX_MESSAGE_LENGTH * 2];
  298. SetGlobalTransTarget(client);
  299. VFormat(buffer, sizeof(buffer), message, 3);
  300. if(GetCmdReplySource() == SM_REPLY_TO_CONSOLE) {
  301. CRemoveTags(buffer, sizeof(buffer));
  302. PrintToConsole(client, buffer);
  303. } else {
  304. CPrintToChat(client, buffer);
  305. }
  306. }
  307.  
  308. /**
  309. * Replies to a command with colors
  310. *
  311. * @param client Client to reply to
  312. * @param author Client to use for {teamcolor}
  313. * @param message Message (formatting rules)
  314. * @noreturn
  315. */
  316. stock CReplyToCommandEx(client, author, const String:message[], any:...) {
  317. decl String:buffer[MAX_MESSAGE_LENGTH * 2];
  318. SetGlobalTransTarget(client);
  319. VFormat(buffer, sizeof(buffer), message, 3);
  320. if(GetCmdReplySource() == SM_REPLY_TO_CONSOLE) {
  321. CRemoveTags(buffer, sizeof(buffer));
  322. PrintToConsole(client, buffer);
  323. } else {
  324. CPrintToChatEx(client, author, buffer);
  325. }
  326. }
  327.  
  328. /**
  329. * Returns the hexadecimal representation of a client's team color (will NOT initialize the trie)
  330. *
  331. * @param client Client to get the team color for
  332. * @return Client's team color in hexadecimal, or green if unknown
  333. * On error/Errors: If the client index passed is invalid or not in game.
  334. */
  335. stock CGetTeamColor(client) {
  336. if(client <= 0 || client > MaxClients) {
  337. ThrowError("Invalid client index %i", client);
  338. }
  339. if(!IsClientInGame(client)) {
  340. ThrowError("Client %i is not in game", client);
  341. }
  342. new value;
  343. switch(GetClientTeam(client)) {
  344. case 1: {
  345. value = COLOR_GRAY;
  346. }
  347. case 2: {
  348. value = COLOR_RED;
  349. }
  350. case 3: {
  351. value = COLOR_BLUE;
  352. }
  353. default: {
  354. value = COLOR_GREEN;
  355. }
  356. }
  357. return value;
  358. }
  359.  
  360. stock Handle:InitColorTrie() {
  361. new Handle:hTrie = CreateTrie();
  362. SetTrieValue(hTrie, "aliceblue", 0xF0F8FF);
  363. SetTrieValue(hTrie, "antiquewhite", 0xFAEBD7);
  364. SetTrieValue(hTrie, "aqua", 0x00FFFF);
  365. SetTrieValue(hTrie, "aquamarine", 0x7FFFD4);
  366. SetTrieValue(hTrie, "azure", 0xF0FFFF);
  367. SetTrieValue(hTrie, "beige", 0xF5F5DC);
  368. SetTrieValue(hTrie, "bisque", 0xFFE4C4);
  369. SetTrieValue(hTrie, "black", 0x000000);
  370. SetTrieValue(hTrie, "blanchedalmond", 0xFFEBCD);
  371. SetTrieValue(hTrie, "blue", 0x99CCFF); // same as BLU/Counter-Terrorist team color
  372. SetTrieValue(hTrie, "blueviolet", 0x8A2BE2);
  373. SetTrieValue(hTrie, "brown", 0xA52A2A);
  374. SetTrieValue(hTrie, "burlywood", 0xDEB887);
  375. SetTrieValue(hTrie, "cadetblue", 0x5F9EA0);
  376. SetTrieValue(hTrie, "chartreuse", 0x7FFF00);
  377. SetTrieValue(hTrie, "chocolate", 0xD2691E);
  378. SetTrieValue(hTrie, "coral", 0xFF7F50);
  379. SetTrieValue(hTrie, "cornflowerblue", 0x6495ED);
  380. SetTrieValue(hTrie, "cornsilk", 0xFFF8DC);
  381. SetTrieValue(hTrie, "crimson", 0xDC143C);
  382. SetTrieValue(hTrie, "cyan", 0x00FFFF);
  383. SetTrieValue(hTrie, "darkblue", 0x00008B);
  384. SetTrieValue(hTrie, "darkcyan", 0x008B8B);
  385. SetTrieValue(hTrie, "darkgoldenrod", 0xB8860B);
  386. SetTrieValue(hTrie, "darkgray", 0xA9A9A9);
  387. SetTrieValue(hTrie, "darkgrey", 0xA9A9A9);
  388. SetTrieValue(hTrie, "darkgreen", 0x006400);
  389. SetTrieValue(hTrie, "darkkhaki", 0xBDB76B);
  390. SetTrieValue(hTrie, "darkmagenta", 0x8B008B);
  391. SetTrieValue(hTrie, "darkolivegreen", 0x556B2F);
  392. SetTrieValue(hTrie, "darkorange", 0xFF8C00);
  393. SetTrieValue(hTrie, "darkorchid", 0x9932CC);
  394. SetTrieValue(hTrie, "darkred", 0x8B0000);
  395. SetTrieValue(hTrie, "darksalmon", 0xE9967A);
  396. SetTrieValue(hTrie, "darkseagreen", 0x8FBC8F);
  397. SetTrieValue(hTrie, "darkslateblue", 0x483D8B);
  398. SetTrieValue(hTrie, "darkslategray", 0x2F4F4F);
  399. SetTrieValue(hTrie, "darkslategrey", 0x2F4F4F);
  400. SetTrieValue(hTrie, "darkturquoise", 0x00CED1);
  401. SetTrieValue(hTrie, "darkviolet", 0x9400D3);
  402. SetTrieValue(hTrie, "deeppink", 0xFF1493);
  403. SetTrieValue(hTrie, "deepskyblue", 0x00BFFF);
  404. SetTrieValue(hTrie, "dimgray", 0x696969);
  405. SetTrieValue(hTrie, "dimgrey", 0x696969);
  406. SetTrieValue(hTrie, "dodgerblue", 0x1E90FF);
  407. SetTrieValue(hTrie, "firebrick", 0xB22222);
  408. SetTrieValue(hTrie, "floralwhite", 0xFFFAF0);
  409. SetTrieValue(hTrie, "forestgreen", 0x228B22);
  410. SetTrieValue(hTrie, "fuchsia", 0xFF00FF);
  411. SetTrieValue(hTrie, "fullblue", 0x0000FF);
  412. SetTrieValue(hTrie, "fullred", 0xFF0000);
  413. SetTrieValue(hTrie, "gainsboro", 0xDCDCDC);
  414. SetTrieValue(hTrie, "ghostwhite", 0xF8F8FF);
  415. SetTrieValue(hTrie, "gold", 0xFFD700);
  416. SetTrieValue(hTrie, "goldenrod", 0xDAA520);
  417. SetTrieValue(hTrie, "gray", 0xCCCCCC); // same as spectator team color
  418. SetTrieValue(hTrie, "grey", 0xCCCCCC);
  419. SetTrieValue(hTrie, "green", 0x3EFF3E);
  420. SetTrieValue(hTrie, "greenyellow", 0xADFF2F);
  421. SetTrieValue(hTrie, "honeydew", 0xF0FFF0);
  422. SetTrieValue(hTrie, "hotpink", 0xFF69B4);
  423. SetTrieValue(hTrie, "indianred", 0xCD5C5C);
  424. SetTrieValue(hTrie, "indigo", 0x4B0082);
  425. SetTrieValue(hTrie, "ivory", 0xFFFFF0);
  426. SetTrieValue(hTrie, "khaki", 0xF0E68C);
  427. SetTrieValue(hTrie, "lavender", 0xE6E6FA);
  428. SetTrieValue(hTrie, "lavenderblush", 0xFFF0F5);
  429. SetTrieValue(hTrie, "lawngreen", 0x7CFC00);
  430. SetTrieValue(hTrie, "lemonchiffon", 0xFFFACD);
  431. SetTrieValue(hTrie, "lightblue", 0xADD8E6);
  432. SetTrieValue(hTrie, "lightcoral", 0xF08080);
  433. SetTrieValue(hTrie, "lightcyan", 0xE0FFFF);
  434. SetTrieValue(hTrie, "lightgoldenrodyellow", 0xFAFAD2);
  435. SetTrieValue(hTrie, "lightgray", 0xD3D3D3);
  436. SetTrieValue(hTrie, "lightgrey", 0xD3D3D3);
  437. SetTrieValue(hTrie, "lightgreen", 0x99FF99);
  438. SetTrieValue(hTrie, "lightpink", 0xFFB6C1);
  439. SetTrieValue(hTrie, "lightsalmon", 0xFFA07A);
  440. SetTrieValue(hTrie, "lightseagreen", 0x20B2AA);
  441. SetTrieValue(hTrie, "lightskyblue", 0x87CEFA);
  442. SetTrieValue(hTrie, "lightslategray", 0x778899);
  443. SetTrieValue(hTrie, "lightslategrey", 0x778899);
  444. SetTrieValue(hTrie, "lightsteelblue", 0xB0C4DE);
  445. SetTrieValue(hTrie, "lightyellow", 0xFFFFE0);
  446. SetTrieValue(hTrie, "lime", 0x00FF00);
  447. SetTrieValue(hTrie, "limegreen", 0x32CD32);
  448. SetTrieValue(hTrie, "linen", 0xFAF0E6);
  449. SetTrieValue(hTrie, "magenta", 0xFF00FF);
  450. SetTrieValue(hTrie, "maroon", 0x800000);
  451. SetTrieValue(hTrie, "mediumaquamarine", 0x66CDAA);
  452. SetTrieValue(hTrie, "mediumblue", 0x0000CD);
  453. SetTrieValue(hTrie, "mediumorchid", 0xBA55D3);
  454. SetTrieValue(hTrie, "mediumpurple", 0x9370D8);
  455. SetTrieValue(hTrie, "mediumseagreen", 0x3CB371);
  456. SetTrieValue(hTrie, "mediumslateblue", 0x7B68EE);
  457. SetTrieValue(hTrie, "mediumspringgreen", 0x00FA9A);
  458. SetTrieValue(hTrie, "mediumturquoise", 0x48D1CC);
  459. SetTrieValue(hTrie, "mediumvioletred", 0xC71585);
  460. SetTrieValue(hTrie, "midnightblue", 0x191970);
  461. SetTrieValue(hTrie, "mintcream", 0xF5FFFA);
  462. SetTrieValue(hTrie, "mistyrose", 0xFFE4E1);
  463. SetTrieValue(hTrie, "moccasin", 0xFFE4B5);
  464. SetTrieValue(hTrie, "navajowhite", 0xFFDEAD);
  465. SetTrieValue(hTrie, "navy", 0x000080);
  466. SetTrieValue(hTrie, "oldlace", 0xFDF5E6);
  467. SetTrieValue(hTrie, "olive", 0x9EC34F);
  468. SetTrieValue(hTrie, "olivedrab", 0x6B8E23);
  469. SetTrieValue(hTrie, "orange", 0xFFA500);
  470. SetTrieValue(hTrie, "orangered", 0xFF4500);
  471. SetTrieValue(hTrie, "orchid", 0xDA70D6);
  472. SetTrieValue(hTrie, "palegoldenrod", 0xEEE8AA);
  473. SetTrieValue(hTrie, "palegreen", 0x98FB98);
  474. SetTrieValue(hTrie, "paleturquoise", 0xAFEEEE);
  475. SetTrieValue(hTrie, "palevioletred", 0xD87093);
  476. SetTrieValue(hTrie, "papayawhip", 0xFFEFD5);
  477. SetTrieValue(hTrie, "peachpuff", 0xFFDAB9);
  478. SetTrieValue(hTrie, "peru", 0xCD853F);
  479. SetTrieValue(hTrie, "pink", 0xFFC0CB);
  480. SetTrieValue(hTrie, "plum", 0xDDA0DD);
  481. SetTrieValue(hTrie, "powderblue", 0xB0E0E6);
  482. SetTrieValue(hTrie, "purple", 0x800080);
  483. SetTrieValue(hTrie, "red", 0xFF4040); // same as RED/Terrorist team color
  484. SetTrieValue(hTrie, "rosybrown", 0xBC8F8F);
  485. SetTrieValue(hTrie, "royalblue", 0x4169E1);
  486. SetTrieValue(hTrie, "saddlebrown", 0x8B4513);
  487. SetTrieValue(hTrie, "salmon", 0xFA8072);
  488. SetTrieValue(hTrie, "sandybrown", 0xF4A460);
  489. SetTrieValue(hTrie, "seagreen", 0x2E8B57);
  490. SetTrieValue(hTrie, "seashell", 0xFFF5EE);
  491. SetTrieValue(hTrie, "sienna", 0xA0522D);
  492. SetTrieValue(hTrie, "silver", 0xC0C0C0);
  493. SetTrieValue(hTrie, "skyblue", 0x87CEEB);
  494. SetTrieValue(hTrie, "slateblue", 0x6A5ACD);
  495. SetTrieValue(hTrie, "slategray", 0x708090);
  496. SetTrieValue(hTrie, "slategrey", 0x708090);
  497. SetTrieValue(hTrie, "snow", 0xFFFAFA);
  498. SetTrieValue(hTrie, "springgreen", 0x00FF7F);
  499. SetTrieValue(hTrie, "steelblue", 0x4682B4);
  500. SetTrieValue(hTrie, "tan", 0xD2B48C);
  501. SetTrieValue(hTrie, "teal", 0x008080);
  502. SetTrieValue(hTrie, "thistle", 0xD8BFD8);
  503. SetTrieValue(hTrie, "tomato", 0xFF6347);
  504. SetTrieValue(hTrie, "turquoise", 0x40E0D0);
  505. SetTrieValue(hTrie, "violet", 0xEE82EE);
  506. SetTrieValue(hTrie, "wheat", 0xF5DEB3);
  507. SetTrieValue(hTrie, "white", 0xFFFFFF);
  508. SetTrieValue(hTrie, "whitesmoke", 0xF5F5F5);
  509. SetTrieValue(hTrie, "yellow", 0xFFFF00);
  510. SetTrieValue(hTrie, "yellowgreen", 0x9ACD32);
  511. return hTrie;
  512. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement