考虑实际使用时的字节序问题, table给出的是0xaabbggrr的格式, (alpha 全为0xFF), 例如 aliceblue 是 fffff8f0, 对应rgba是(f0,f8,ff,ff)
参考了这个站点 http://www.imagemagick.org/script/color.php
去掉了带grey(已经有gray了)的名字
对于同色不同名:若颜色值相同,则优先保留不带数字后缀且最短的名称
local tName2Color = { -- 0xAABBGGRR aliceblue = 0xFFFFF8F0, antiquewhite = 0xFFD7EBFA, antiquewhite0 = 0xFFDBEFFF, antiquewhite1 = 0xFFCCDFEE, antiquewhite2 = 0xFFB0C0CD, antiquewhite3 = 0xFF78838B, aquamarine = 0xFFD4FF7F, aquamarine0 = 0xFFC6EE76, aquamarine1 = 0xFF748B45, azure = 0xFFFFFFF0, azure0 = 0xFFEEEEE0, azure1 = 0xFFCDCDC1, azure2 = 0xFF8B8B83, beige = 0xFFDCF5F5, bisque = 0xFFC4E4FF, bisque0 = 0xFFB7D5EE, bisque1 = 0xFF9EB7CD, bisque2 = 0xFF6B7D8B, black = 0xFF000000, blanchedalmond = 0xFFCDEBFF, blue = 0xFFFF0000, blue0 = 0xFFEE0000, blueviolet = 0xFFE22B8A, brown = 0xFF2A2AA5, brown0 = 0xFF4040FF, brown1 = 0xFF3B3BEE, brown2 = 0xFF3333CD, brown3 = 0xFF23238B, burlywood = 0xFF87B8DE, burlywood0 = 0xFF9BD3FF, burlywood1 = 0xFF91C5EE, burlywood2 = 0xFF7DAACD, burlywood3 = 0xFF55738B, cadet = 0xFFA09E5F, cadetblue = 0xFFFFF598, cadetblue0 = 0xFFEEE58E, cadetblue1 = 0xFFCDC57A, cadetblue2 = 0xFF8B8653, chartreuse = 0xFF00FF7F, chartreuse0 = 0xFF00EE76, chartreuse1 = 0xFF00CD66, chartreuse2 = 0xFF008B45, chocolate = 0xFF1E69D2, chocolate0 = 0xFF247FFF, chocolate1 = 0xFF2176EE, chocolate2 = 0xFF1D66CD, coral = 0xFF507FFF, coral0 = 0xFF5672FF, coral1 = 0xFF506AEE, coral2 = 0xFF455BCD, coral3 = 0xFF2F3E8B, cornflowerblue = 0xFFED9564, cornsilk = 0xFFDCF8FF, cornsilk0 = 0xFFCDE8EE, cornsilk1 = 0xFFB1C8CD, cornsilk2 = 0xFF78888B, crimson = 0xFF3C14DC, cyan = 0xFFFFFF00, cyan0 = 0xFFEEEE00, cyan1 = 0xFFCDCD00, darkblue = 0xFF8B0000, darkcyan = 0xFF8B8B00, darkgoldenrod = 0xFF0B86B8, darkgoldenrod0 = 0xFF0FB9FF, darkgoldenrod1 = 0xFF0EADEE, darkgoldenrod2 = 0xFF0C95CD, darkgoldenrod3 = 0xFF08658B, darkgray = 0xFFA9A9A9, darkgray0 = 0xFF7E7E7E, darkgreen = 0xFF006400, darkkhaki = 0xFF6BB7BD, darkmagenta = 0xFF8B008B, darkolivegreen = 0xFF2F6B55, darkolivegreen0 = 0xFF70FFCA, darkolivegreen1 = 0xFF68EEBC, darkolivegreen2 = 0xFF5ACDA2, darkolivegreen3 = 0xFF3D8B6E, darkorange = 0xFF008CFF, darkorange0 = 0xFF007FFF, darkorange1 = 0xFF0076EE, darkorange2 = 0xFF0066CD, darkorange3 = 0xFF00458B, darkorchid = 0xFFCC3299, darkorchid0 = 0xFFFF3EBF, darkorchid1 = 0xFFEE3AB2, darkorchid2 = 0xFFCD329A, darkorchid3 = 0xFF8B2268, darkred = 0xFF00008B, darksalmon = 0xFF7A96E9, darkseagreen = 0xFF8FBC8F, darkseagreen0 = 0xFFC1FFC1, darkseagreen1 = 0xFFB4EEB4, darkseagreen2 = 0xFF9BCD9B, darkseagreen3 = 0xFF698B69, darkslateblue = 0xFF8B3D48, darkslategray = 0xFF4F4F2F, darkslategray0 = 0xFFFFFF97, darkslategray1 = 0xFFEEEE8D, darkslategray2 = 0xFFCDCD79, darkslategray3 = 0xFF8B8B52, darkturquoise = 0xFFD1CE00, darkviolet = 0xFFD30094, deeppink = 0xFF9314FF, deeppink0 = 0xFF8912EE, deeppink1 = 0xFF7610CD, deeppink2 = 0xFF500A8B, deepskyblue = 0xFFFFBF00, deepskyblue0 = 0xFFEEB200, deepskyblue1 = 0xFFCD9A00, deepskyblue2 = 0xFF8B6800, dimgray = 0xFF696969, dodgerblue = 0xFFFF901E, dodgerblue0 = 0xFFEE861C, dodgerblue1 = 0xFFCD7418, dodgerblue2 = 0xFF8B4E10, firebrick = 0xFF2222B2, firebrick0 = 0xFF3030FF, firebrick1 = 0xFF2C2CEE, firebrick2 = 0xFF2626CD, firebrick3 = 0xFF1A1A8B, floralwhite = 0xFFF0FAFF, forestgreen = 0xFF228B22, fractal = 0xFF808080, gainsboro = 0xFFDCDCDC, ghostwhite = 0xFFFFF8F8, gold = 0xFF00D7FF, gold0 = 0xFF00C9EE, gold1 = 0xFF00ADCD, gold2 = 0xFF00758B, goldenrod = 0xFF20A5DA, goldenrod0 = 0xFF25C1FF, goldenrod1 = 0xFF22B4EE, goldenrod2 = 0xFF1D9BCD, goldenrod3 = 0xFF14698B, gray = 0xFFBEBEBE, gray0 = 0xFF030303, gray1 = 0xFF050505, gray10 = 0xFF1C1C1C, gray11 = 0xFF1F1F1F, gray12 = 0xFF212121, gray13 = 0xFF242424, gray14 = 0xFF262626, gray15 = 0xFF292929, gray16 = 0xFF2B2B2B, gray17 = 0xFF2E2E2E, gray18 = 0xFF303030, gray19 = 0xFF333333, gray2 = 0xFF080808, gray20 = 0xFF363636, gray21 = 0xFF383838, gray22 = 0xFF3B3B3B, gray23 = 0xFF3D3D3D, gray24 = 0xFF404040, gray25 = 0xFF424242, gray26 = 0xFF454545, gray27 = 0xFF474747, gray28 = 0xFF4A4A4A, gray29 = 0xFF4D4D4D, gray3 = 0xFF0A0A0A, gray30 = 0xFF4F4F4F, gray31 = 0xFF525252, gray32 = 0xFF545454, gray33 = 0xFF575757, gray34 = 0xFF595959, gray35 = 0xFF5C5C5C, gray36 = 0xFF5E5E5E, gray37 = 0xFF616161, gray38 = 0xFF636363, gray39 = 0xFF666666, gray4 = 0xFF0D0D0D, gray40 = 0xFF6B6B6B, gray41 = 0xFF6E6E6E, gray42 = 0xFF707070, gray43 = 0xFF737373, gray44 = 0xFF757575, gray45 = 0xFF787878, gray46 = 0xFF7A7A7A, gray47 = 0xFF7D7D7D, gray48 = 0xFF7F7F7F, gray49 = 0xFF828282, gray5 = 0xFF0F0F0F, gray50 = 0xFF858585, gray51 = 0xFF878787, gray52 = 0xFF8A8A8A, gray53 = 0xFF8C8C8C, gray54 = 0xFF8F8F8F, gray55 = 0xFF919191, gray56 = 0xFF949494, gray57 = 0xFF969696, gray58 = 0xFF999999, gray59 = 0xFF9C9C9C, gray6 = 0xFF121212, gray60 = 0xFF9E9E9E, gray61 = 0xFFA1A1A1, gray62 = 0xFFA3A3A3, gray63 = 0xFFA6A6A6, gray64 = 0xFFA8A8A8, gray65 = 0xFFABABAB, gray66 = 0xFFADADAD, gray67 = 0xFFB0B0B0, gray68 = 0xFFB3B3B3, gray69 = 0xFFB5B5B5, gray7 = 0xFF141414, gray70 = 0xFFB8B8B8, gray71 = 0xFFBABABA, gray72 = 0xFFBDBDBD, gray73 = 0xFFBFBFBF, gray74 = 0xFFC2C2C2, gray75 = 0xFFC4C4C4, gray76 = 0xFFC7C7C7, gray77 = 0xFFC9C9C9, gray78 = 0xFFCCCCCC, gray79 = 0xFFCFCFCF, gray8 = 0xFF171717, gray80 = 0xFFD1D1D1, gray81 = 0xFFD4D4D4, gray82 = 0xFFD6D6D6, gray83 = 0xFFD9D9D9, gray84 = 0xFFDBDBDB, gray85 = 0xFFDEDEDE, gray86 = 0xFFE0E0E0, gray87 = 0xFFE3E3E3, gray88 = 0xFFE5E5E5, gray89 = 0xFFE8E8E8, gray9 = 0xFF1A1A1A, gray90 = 0xFFEBEBEB, gray91 = 0xFFEDEDED, gray92 = 0xFFF0F0F0, gray93 = 0xFFF2F2F2, gray94 = 0xFFF7F7F7, gray95 = 0xFFFAFAFA, gray96 = 0xFFFCFCFC, green = 0xFF008000, green0 = 0xFF00EE00, green1 = 0xFF00CD00, green2 = 0xFF008B00, greenyellow = 0xFF2FFFAD, honeydew = 0xFFF0FFF0, honeydew0 = 0xFFE0EEE0, honeydew1 = 0xFFC1CDC1, honeydew2 = 0xFF838B83, hotpink = 0xFFB469FF, hotpink0 = 0xFFB46EFF, hotpink1 = 0xFFA76AEE, hotpink2 = 0xFF9060CD, hotpink3 = 0xFF623A8B, indianred = 0xFF5C5CCD, indianred0 = 0xFF6A6AFF, indianred1 = 0xFF6363EE, indianred2 = 0xFF5555CD, indianred3 = 0xFF3A3A8B, indigo = 0xFF82004B, ivory = 0xFFF0FFFF, ivory0 = 0xFFE0EEEE, ivory1 = 0xFFC1CDCD, ivory2 = 0xFF838B8B, khaki = 0xFF8CE6F0, khaki0 = 0xFF8FF6FF, khaki1 = 0xFF85E6EE, khaki2 = 0xFF73C6CD, khaki3 = 0xFF4E868B, lavender = 0xFFFAE6E6, lavenderblush = 0xFFF5F0FF, lavenderblush0 = 0xFFE5E0EE, lavenderblush1 = 0xFFC5C1CD, lavenderblush2 = 0xFF86838B, lawngreen = 0xFF00FC7C, lemonchiffon = 0xFFCDFAFF, lemonchiffon0 = 0xFFBFE9EE, lemonchiffon1 = 0xFFA5C9CD, lemonchiffon2 = 0xFF70898B, lightblue = 0xFFE6D8AD, lightblue0 = 0xFFFFEFBF, lightblue1 = 0xFFEEDFB2, lightblue2 = 0xFFCDC09A, lightblue3 = 0xFF8B8368, lightcoral = 0xFF8080F0, lightcyan = 0xFFFFFFE0, lightcyan0 = 0xFFEEEED1, lightcyan1 = 0xFFCDCDB4, lightcyan2 = 0xFF8B8B7A, lightgoldenrod = 0xFF82DDEE, lightgoldenrod0 = 0xFF8BECFF, lightgoldenrod1 = 0xFF82DCEE, lightgoldenrod2 = 0xFF70BECD, lightgoldenrod3 = 0xFF4C818B, lightgoldenrodyellow = 0xFFD2FAFA, lightgray = 0xFFD3D3D3, lightgreen = 0xFF90EE90, lightpink = 0xFFC1B6FF, lightpink0 = 0xFFB9AEFF, lightpink1 = 0xFFADA2EE, lightpink2 = 0xFF958CCD, lightpink3 = 0xFF655F8B, lightsalmon = 0xFF7AA0FF, lightsalmon0 = 0xFF7295EE, lightsalmon1 = 0xFF6281CD, lightsalmon2 = 0xFF42578B, lightseagreen = 0xFFAAB220, lightskyblue = 0xFFFACE87, lightskyblue0 = 0xFFFFE2B0, lightskyblue1 = 0xFFEED3A4, lightskyblue2 = 0xFFCDB68D, lightskyblue3 = 0xFF8B7B60, lightslateblue = 0xFFFF7084, lightslategray = 0xFF998877, lightsteelblue = 0xFFDEC4B0, lightsteelblue0 = 0xFFFFE1CA, lightsteelblue1 = 0xFFEED2BC, lightsteelblue2 = 0xFFCDB5A2, lightsteelblue3 = 0xFF8B7B6E, lightyellow = 0xFFE0FFFF, lightyellow0 = 0xFFD1EEEE, lightyellow1 = 0xFFB4CDCD, lightyellow2 = 0xFF7A8B8B, lime = 0xFF00FF00, limegreen = 0xFF32CD32, linen = 0xFFE6F0FA, magenta = 0xFFFF00FF, magenta0 = 0xFFEE00EE, magenta1 = 0xFFCD00CD, maroon = 0xFF000080, maroon0 = 0xFF6030B0, maroon1 = 0xFFB334FF, maroon2 = 0xFFA730EE, maroon3 = 0xFF9029CD, maroon4 = 0xFF621C8B, mediumaquamarine = 0xFFAACD66, mediumblue = 0xFFCD0000, mediumforestgreen = 0xFF4B8132, mediumgoldenrod = 0xFF66C1D1, mediumorchid = 0xFFD355BA, mediumorchid0 = 0xFFFF66E0, mediumorchid1 = 0xFFEE5FD1, mediumorchid2 = 0xFFCD52B4, mediumorchid3 = 0xFF8B377A, mediumpurple = 0xFFDB7093, mediumpurple0 = 0xFFFF82AB, mediumpurple1 = 0xFFEE799F, mediumpurple2 = 0xFFCD6889, mediumpurple3 = 0xFF8B475D, mediumseagreen = 0xFF71B33C, mediumslateblue = 0xFFEE687B, mediumspringgreen = 0xFF9AFA00, mediumturquoise = 0xFFCCD148, mediumvioletred = 0xFF8515C7, midnightblue = 0xFF701919, mintcream = 0xFFFAFFF5, mistyrose = 0xFFE1E4FF, mistyrose0 = 0xFFD2D5EE, mistyrose1 = 0xFFB5B7CD, mistyrose2 = 0xFF7B7D8B, moccasin = 0xFFB5E4FF, navajowhite = 0xFFADDEFF, navajowhite0 = 0xFFA1CFEE, navajowhite1 = 0xFF8BB3CD, navajowhite2 = 0xFF5E798B, navy = 0xFF800000, none = 0x00000000, oldlace = 0xFFE6F5FD, olive = 0xFF008080, olivedrab = 0xFF238E6B, olivedrab0 = 0xFF3EFFC0, olivedrab1 = 0xFF3AEEB3, olivedrab2 = 0xFF228B69, orange = 0xFF00A5FF, orange0 = 0xFF009AEE, orange1 = 0xFF0085CD, orange2 = 0xFF005A8B, orangered = 0xFF0045FF, orangered0 = 0xFF0040EE, orangered1 = 0xFF0037CD, orangered2 = 0xFF00258B, orchid = 0xFFD670DA, orchid0 = 0xFFFA83FF, orchid1 = 0xFFE97AEE, orchid2 = 0xFFC969CD, orchid3 = 0xFF89478B, palegoldenrod = 0xFFAAE8EE, palegreen = 0xFF98FB98, palegreen0 = 0xFF9AFF9A, palegreen1 = 0xFF7CCD7C, palegreen2 = 0xFF548B54, paleturquoise = 0xFFEEEEAF, paleturquoise0 = 0xFFFFFFBB, paleturquoise1 = 0xFFEEEEAE, paleturquoise2 = 0xFFCDCD96, paleturquoise3 = 0xFF8B8B66, palevioletred = 0xFF9370DB, palevioletred0 = 0xFFAB82FF, palevioletred1 = 0xFF9F79EE, palevioletred2 = 0xFF8968CD, palevioletred3 = 0xFF5D478B, papayawhip = 0xFFD5EFFF, peachpuff = 0xFFB9DAFF, peachpuff0 = 0xFFADCBEE, peachpuff1 = 0xFF95AFCD, peachpuff2 = 0xFF65778B, peru = 0xFF3F85CD, pink = 0xFFCBC0FF, pink0 = 0xFFC5B5FF, pink1 = 0xFFB8A9EE, pink2 = 0xFF9E91CD, pink3 = 0xFF6C638B, plum = 0xFFDDA0DD, plum0 = 0xFFFFBBFF, plum1 = 0xFFEEAEEE, plum2 = 0xFFCD96CD, plum3 = 0xFF8B668B, powderblue = 0xFFE6E0B0, purple = 0xFF800080, purple0 = 0xFFF020A0, purple1 = 0xFFFF309B, purple2 = 0xFFEE2C91, purple3 = 0xFFCD267D, purple4 = 0xFF8B1A55, red = 0xFF0000FF, red0 = 0xFF0000EE, red1 = 0xFF0000CD, rosybrown = 0xFF8F8FBC, rosybrown0 = 0xFFC1C1FF, rosybrown1 = 0xFFB4B4EE, rosybrown2 = 0xFF9B9BCD, rosybrown3 = 0xFF69698B, royalblue = 0xFFE16941, royalblue0 = 0xFFFF7648, royalblue1 = 0xFFEE6E43, royalblue2 = 0xFFCD5F3A, royalblue3 = 0xFF8B4027, saddlebrown = 0xFF13458B, salmon = 0xFF7280FA, salmon0 = 0xFF698CFF, salmon1 = 0xFF6282EE, salmon2 = 0xFF5470CD, salmon3 = 0xFF394C8B, sandybrown = 0xFF60A4F4, seagreen = 0xFF578B2E, seagreen0 = 0xFF9FFF54, seagreen1 = 0xFF94EE4E, seagreen2 = 0xFF80CD43, seashell = 0xFFEEF5FF, seashell0 = 0xFFDEE5EE, seashell1 = 0xFFBFC5CD, seashell2 = 0xFF82868B, sienna = 0xFF2D52A0, sienna0 = 0xFF4782FF, sienna1 = 0xFF4279EE, sienna2 = 0xFF3968CD, sienna3 = 0xFF26478B, silver = 0xFFC0C0C0, skyblue = 0xFFEBCE87, skyblue0 = 0xFFFFCE87, skyblue1 = 0xFFEEC07E, skyblue2 = 0xFFCDA66C, skyblue3 = 0xFF8B704A, slateblue = 0xFFCD5A6A, slateblue0 = 0xFFFF6F83, slateblue1 = 0xFFEE677A, slateblue2 = 0xFFCD5969, slateblue3 = 0xFF8B3C47, slategray = 0xFF908070, slategray0 = 0xFFFFE2C6, slategray1 = 0xFFEED3B9, slategray2 = 0xFFCDB69F, slategray3 = 0xFF8B7B6C, snow = 0xFFFAFAFF, snow0 = 0xFFE9E9EE, snow1 = 0xFFC9C9CD, snow2 = 0xFF89898B, springgreen = 0xFF7FFF00, springgreen0 = 0xFF76EE00, springgreen1 = 0xFF66CD00, springgreen2 = 0xFF458B00, steelblue = 0xFFB48246, steelblue0 = 0xFFFFB863, steelblue1 = 0xFFEEAC5C, steelblue2 = 0xFFCD944F, steelblue3 = 0xFF8B6436, tan = 0xFF8CB4D2, tan0 = 0xFF4FA5FF, tan1 = 0xFF499AEE, tan2 = 0xFF2B5A8B, teal = 0xFF808000, thistle = 0xFFD8BFD8, thistle0 = 0xFFFFE1FF, thistle1 = 0xFFEED2EE, thistle2 = 0xFFCDB5CD, thistle3 = 0xFF8B7B8B, tomato = 0xFF4763FF, tomato0 = 0xFF425CEE, tomato1 = 0xFF394FCD, tomato2 = 0xFF26368B, turquoise = 0xFFD0E040, turquoise0 = 0xFFFFF500, turquoise1 = 0xFFEEE500, turquoise2 = 0xFFCDC500, turquoise3 = 0xFF8B8600, violet = 0xFFEE82EE, violetred = 0xFF9020D0, violetred0 = 0xFF963EFF, violetred1 = 0xFF8C3AEE, violetred2 = 0xFF7832CD, violetred3 = 0xFF52228B, wheat = 0xFFB3DEF5, wheat0 = 0xFFBAE7FF, wheat1 = 0xFFAED8EE, wheat2 = 0xFF96BACD, wheat3 = 0xFF667E8B, white = 0xFFFFFFFF, whitesmoke = 0xFFF5F5F5, yellow = 0xFF00FFFF, yellow0 = 0xFF00EEEE, yellow1 = 0xFF00CDCD, yellow2 = 0xFF008B8B, yellowgreen = 0xFF32CD9A, }