/// <summary>
/// Получение RGB составляющих для индексированного цвета
/// </summary>
/// <param name="index">Индекс цвета</param>
/// <param name="red">Красная составляющая</param>
/// <param name="green">Зелёная составляющая</param>
/// <param name="blue">Синяя составляющая</param>
public static void GetRGBFromIndex
(byte index, out byte red, out byte green, out by
{
switch (index)
{
#region 0-99*
#region 0-9*
case 0:
red = 0; green = 0; blue = 0;
break;
case 1:
red = 255; green = 0; blue = 0;
break;
case 2:
red = 255; green = 255; blue = 0;
break;
case 3:
red = 0; green = 255; blue = 0;
break;
case 4:
red = 0; green = 255; blue = 255;
break;
case 5:
red = 0; green = 0; blue = 255;
break;
case 6:
red = 255; green = 0; blue = 255;
break;
case 7:
red = 255; green = 255; blue = 255;
break;
case 8:
red = 65; green = 65; blue = 65;
break;
case 9:
red = 128; green = 128; blue = 128;
break;
#endregion
#region 10-19*
case 10:
red = 255; green = 0; blue = 0;
break;
case 11:
red = 255; green = 170; blue = 170;
break;
case 12:
red = 189; green = 0; blue = 0;
break;
case 13:
red = 189; green = 126; blue = 126;
break;
case 14:
red = 129; green = 0; blue = 0;
break;
case 15:
red = 129; green = 86; blue = 86;
break;
case 16:
red = 104; green = 0; blue = 0;
break;
case 17:
red = 104; green = 69; blue = 69;
break;
case 18:
red = 79; green = 0; blue = 0;
break;
case 19:
red = 79; green = 53; blue = 53;
break;
#endregion
#region 20-29*
case 20:
red = 255; green = 63; blue = 0;
break;
case 21:
red = 255; green = 191; blue = 170;
break;
case 22:
red = 189; green = 46; blue = 0;
break;
case 23:
red = 189; green = 141; blue = 126;
break;
case 24:
red = 129; green = 31; blue = 0;
break;
case 25:
red = 129; green = 96; blue = 86;
break;
case 26:
red = 104; green = 25; blue = 0;
break;
case 27:
red = 104; green = 78; blue = 69;
break;
case 28:
red = 79; green = 19; blue = 0;
break;
case 29:
red = 79; green = 59; blue = 53;
break;
#endregion
#region 30-39*
case 30:
red = 255; green = 127; blue = 0;
break;
case 31:
red = 255; green = 212; blue = 170;
break;
case 32:
red = 189; green = 94; blue = 0;
break;
case 33:
red = 189; green = 157; blue = 126;
break;
case 34:
red = 129; green = 64; blue = 0;
break;
case 35:
red = 129; green = 107; blue = 86;
break;
case 36:
red = 104; green = 52; blue = 0;
break;
case 37:
red = 104; green = 86; blue = 69;
break;
case 38:
red = 79; green = 39; blue = 0;
break;
case 39:
red = 79; green = 66; blue = 53;
break;
#endregion
#region 40-49*
case 40:
red = 255; green = 191; blue = 0;
break;
case 41:
red = 255; green = 234; blue = 170;
break;
case 42:
red = 189; green = 141; blue = 0;
break;
case 43:
red = 189; green = 173; blue = 126;
break;
case 44:
red = 129; green = 96; blue = 0;
break;
case 45:
red = 129; green = 118; blue = 86;
break;
case 46:
red = 104; green = 78; blue = 0;
break;
case 47:
red = 104; green = 95; blue = 69;
break;
case 48:
red = 79; green = 59; blue = 0;
break;
case 49:
red = 79; green = 73; blue = 53;
break;
#endregion
#region 50-59*
case 50:
red = 255; green = 255; blue = 0;
break;
case 51:
red = 255; green = 255; blue = 170;
break;
case 52:
red = 189; green = 189; blue = 0;
break;
case 53:
red = 189; green = 189; blue = 126;
break;
case 54:
red = 129; green = 129; blue = 0;
break;
case 55:
red = 129; green = 129; blue = 86;
break;
case 56:
red = 104; green = 104; blue = 0;
break;
case 57:
red = 104; green = 104; blue = 69;
break;
case 58:
red = 79; green = 79; blue = 0;
break;
case 59:
red = 79; green = 79; blue = 53;
break;
#endregion
#region 60-69*
case 60:
red = 191; green = 255; blue = 0;
break;
case 61:
red = 234; green = 255; blue = 170;
break;
case 62:
red = 141; green = 189; blue = 0;
break;
case 63:
red = 173; green = 189; blue = 126;
break;
case 64:
red = 96; green = 129; blue = 0;
break;
case 65:
red = 118; green = 129; blue = 86;
break;
case 66:
red = 78; green = 104; blue = 0;
break;
case 67:
red = 95; green = 104; blue = 69;
break;
case 68:
red = 59; green = 79; blue = 0;
break;
case 69:
red = 73; green = 79; blue = 53;
break;
#endregion
#region 70-79*
case 70:
red = 127; green = 255; blue = 0;
break;
case 71:
red = 212; green = 255; blue = 170;
break;
case 72:
red = 94; green = 189; blue = 0;
break;
case 73:
red = 157; green = 189; blue = 126;
break;
case 74:
red = 64; green = 129; blue = 0;
break;
case 75:
red = 107; green = 129; blue = 86;
break;
case 76:
red = 52; green = 104; blue = 0;
break;
case 77:
red = 86; green = 104; blue = 69;
break;
case 78:
red = 39; green = 79; blue = 0;
break;
case 79:
red = 66; green = 79; blue = 53;
break;
#endregion
#region 80-89*
case 80:
red = 63; green = 255; blue = 0;
break;
case 81:
red = 191; green = 255; blue = 170;
break;
case 82:
red = 46; green = 189; blue = 0;
break;
case 83:
red = 141; green = 189; blue = 126;
break;
case 84:
red = 31; green = 129; blue = 0;
break;
case 85:
red = 96; green = 129; blue = 86;
break;
case 86:
red = 25; green = 104; blue = 0;
break;
case 87:
red = 78; green = 104; blue = 69;
break;
case 88:
red = 19; green = 79; blue = 0;
break;
case 89:
red = 59; green = 79; blue = 53;
break;
#endregion
#region 90-99*
case 90:
red = 0; green = 255; blue = 0;
break;
case 91:
red = 170; green = 255; blue = 170;
break;
case 92:
red = 0; green = 189; blue = 0;
break;
case 93:
red = 126; green = 189; blue = 126;
break;
case 94:
red = 0; green = 129; blue = 0;
break;
case 95:
red = 86; green = 129; blue = 86;
break;
case 96:
red = 0; green = 104; blue = 0;
break;
case 97:
red = 69; green = 104; blue = 69;
break;
case 98:
red = 0; green = 79; blue = 0;
break;
case 99:
red = 53; green = 79; blue = 53;
break;
#endregion
#endregion
#region 100-199*
#region 100-109*
case 100:
red = 0; green = 255; blue = 63;
break;
case 101:
red = 170; green = 255; blue = 191;
break;
case 102:
red = 0; green = 189; blue = 46;
break;
case 103:
red = 126; green = 189; blue = 141;
break;
case 104:
red = 0; green = 129; blue = 31;
break;
case 105:
red = 86; green = 129; blue = 96;
break;
case 106:
red = 0; green = 104; blue = 25;
break;
case 107:
red = 69; green = 104; blue = 78;
break;
case 108:
red = 0; green = 79; blue = 19;
break;
case 109:
red = 53; green = 79; blue = 59;
break;
#endregion
#region 110-119*
case 110:
red = 0; green = 255; blue = 127;
break;
case 111:
red = 170; green = 255; blue = 212;
break;
case 112:
red = 0; green = 189; blue = 94;
break;
case 113:
red = 126; green = 189; blue = 157;
break;
case 114:
red = 0; green = 129; blue = 64;
break;
case 115:
red = 86; green = 129; blue = 107;
break;
case 116:
red = 0; green = 104; blue = 52;
break;
case 117:
red = 69; green = 104; blue = 86;
break;
case 118:
red = 0; green = 79; blue = 39;
break;
case 119:
red = 53; green = 79; blue = 66;
break;
#endregion
#region 120-129*
case 120:
red = 0; green = 255; blue = 191;
break;
case 121:
red = 170; green = 255; blue = 234;
break;
case 122:
red = 0; green = 189; blue = 141;
break;
case 123:
red = 126; green = 189; blue = 173;
break;
case 124:
red = 0; green = 129; blue = 96;
break;
case 125:
red = 86; green = 129; blue = 118;
break;
case 126:
red = 0; green = 104; blue = 78;
break;
case 127:
red = 69; green = 104; blue = 95;
break;
case 128:
red = 0; green = 79; blue = 59;
break;
case 129:
red = 53; green = 79; blue = 73;
break;
#endregion
#region 130-139*
case 130:
red = 0; green = 255; blue = 255;
break;
case 131:
red = 170; green = 255; blue = 255;
break;
case 132:
red = 0; green = 189; blue = 189;
break;
case 133:
red = 126; green = 189; blue = 189;
break;
case 134:
red = 0; green = 129; blue = 129;
break;
case 135:
red = 86; green = 129; blue = 129;
break;
case 136:
red = 0; green = 104; blue = 104;
break;
case 137:
red = 69; green = 104; blue = 104;
break;
case 138:
red = 0; green = 79; blue = 79;
break;
case 139:
red = 53; green = 79; blue = 79;
break;
#endregion
#region 140-149*
case 140:
red = 0; green = 191; blue = 255;
break;
case 141:
red = 170; green = 234; blue = 255;
break;
case 142:
red = 0; green = 141; blue = 189;
break;
case 143:
red = 126; green = 173; blue = 189;
break;
case 144:
red = 0; green = 96; blue = 129;
break;
case 145:
red = 86; green = 118; blue = 129;
break;
case 146:
red = 0; green = 78; blue = 104;
break;
case 147:
red = 69; green = 95; blue = 104;
break;
case 148:
red = 0; green = 59; blue = 79;
break;
case 149:
red = 53; green = 73; blue = 79;
break;
#endregion
#region 150-159*
case 150:
red = 0; green = 127; blue = 255;
break;
case 151:
red = 170; green = 212; blue = 255;
break;
case 152:
red = 0; green = 94; blue = 189;
break;
case 153:
red = 126; green = 157; blue = 189;
break;
case 154:
red = 0; green = 64; blue = 129;
break;
case 155:
red = 86; green = 107; blue = 129;
break;
case 156:
red = 0; green = 52; blue = 104;
break;
case 157:
red = 69; green = 86; blue = 104;
break;
case 158:
red = 0; green = 39; blue = 79;
break;
case 159:
red = 53; green = 66; blue = 79;
break;
#endregion
#region 160-169*
case 160:
red = 0; green = 63; blue = 255;
break;
case 161:
red = 170; green = 191; blue = 255;
break;
case 162:
red = 0; green = 46; blue = 189;
break;
case 163:
red = 126; green = 141; blue = 189;
break;
case 164:
red = 0; green = 31; blue = 129;
break;
case 165:
red = 86; green = 96; blue = 129;
break;
case 166:
red = 0; green = 25; blue = 104;
break;
case 167:
red = 69; green = 78; blue = 104;
break;
case 168:
red = 0; green = 19; blue = 79;
break;
case 169:
red = 53; green = 59; blue = 79;
break;
#endregion
#region 170-179*
case 170:
red = 0; green = 0; blue = 255;
break;
case 171:
red = 170; green = 170; blue = 255;
break;
case 172:
red = 0; green = 0; blue = 189;
break;
case 173:
red = 126; green = 126; blue = 189;
break;
case 174:
red = 0; green = 0; blue = 129;
break;
case 175:
red = 86; green = 86; blue = 129;
break;
case 176:
red = 0; green = 0; blue = 104;
break;
case 177:
red = 69; green = 69; blue = 104;
break;
case 178:
red = 0; green = 0; blue = 79;
break;
case 179:
red = 53; green = 53; blue = 79;
break;
#endregion
#region 180-189*
case 180:
red = 63; green = 0; blue = 255;
break;
case 181:
red = 191; green = 170; blue = 255;
break;
case 182:
red = 46; green = 0; blue = 189;
break;
case 183:
red = 141; green = 126; blue = 189;
break;
case 184:
red = 31; green = 0; blue = 129;
break;
case 185:
red = 96; green = 86; blue = 129;
break;
case 186:
red = 25; green = 0; blue = 104;
break;
case 187:
red = 78; green = 69; blue = 104;
break;
case 188:
red = 19; green = 0; blue = 79;
break;
case 189:
red = 59; green = 53; blue = 79;
break;
#endregion
#region 190-199*
case 190:
red = 127; green = 0; blue = 255;
break;
case 191:
red = 212; green = 170; blue = 255;
break;
case 192:
red = 94; green = 0; blue = 189;
break;
case 193:
red = 157; green = 126; blue = 189;
break;
case 194:
red = 64; green = 0; blue = 129;
break;
case 195:
red = 107; green = 86; blue = 129;
break;
case 196:
red = 52; green = 0; blue = 104;
break;
case 197:
red = 86; green = 69; blue = 104;
break;
case 198:
red = 39; green = 0; blue = 79;
break;
case 199:
red = 66; green = 53; blue = 79;
break;
#endregion
#endregion
#region 200-255*
#region 200-209*
case 200:
red = 191; green = 0; blue = 255;
break;
case 201:
red = 234; green = 170; blue = 255;
break;
case 202:
red = 141; green = 0; blue = 189;
break;
case 203:
red = 173; green = 126; blue = 189;
break;
case 204:
red = 96; green = 0; blue = 129;
break;
case 205:
red = 118; green = 86; blue = 129;
break;
case 206:
red = 78; green = 0; blue = 104;
break;
case 207:
red = 95; green = 69; blue = 104;
break;
case 208:
red = 59; green = 0; blue = 79;
break;
case 209:
red = 73; green = 53; blue = 79;
break;
#endregion
#region 210-219*
case 210:
red = 255; green = 0; blue = 255;
break;
case 211:
red = 255; green = 170; blue = 255;
break;
case 212:
red = 189; green = 0; blue = 189;
break;
case 213:
red = 189; green = 126; blue = 189;
break;
case 214:
red = 129; green = 0; blue = 129;
break;
case 215:
red = 129; green = 86; blue = 129;
break;
case 216:
red = 104; green = 0; blue = 104;
break;
case 217:
red = 104; green = 69; blue = 104;
break;
case 218:
red = 79; green = 0; blue = 79;
break;
case 219:
red = 79; green = 53; blue = 79;
break;
#endregion
#region 220-229*
case 220:
red = 255; green = 0; blue = 191;
break;
case 221:
red = 255; green = 170; blue = 234;
break;
case 222:
red = 189; green = 0; blue = 141;
break;
case 223:
red = 189; green = 126; blue = 173;
break;
case 224:
red = 129; green = 0; blue = 96;
break;
case 225:
red = 129; green = 86; blue = 118;
break;
case 226:
red = 104; green = 0; blue = 78;
break;
case 227:
red = 104; green = 69; blue = 95;
break;
case 228:
red = 79; green = 0; blue = 59;
break;
case 229:
red = 79; green = 53; blue = 73;
break;
#endregion
#region 230-239*
case 230:
red = 255; green = 0; blue = 127;
break;
case 231:
red = 255; green = 170; blue = 212;
break;
case 232:
red = 189; green = 0; blue = 94;
break;
case 233:
red = 189; green = 126; blue = 157;
break;
case 234:
red = 129; green = 0; blue = 64;
break;
case 235:
red = 129; green = 86; blue = 107;
break;
case 236:
red = 104; green = 0; blue = 52;
break;
case 237:
red = 104; green = 69; blue = 86;
break;
case 238:
red = 79; green = 0; blue = 39;
break;
case 239:
red = 79; green = 53; blue = 66;
break;
#endregion
#region 240-249*
case 240:
red = 255; green = 0; blue = 63;
break;
case 241:
red = 255; green = 170; blue = 191;
break;
case 242:
red = 189; green = 0; blue = 46;
break;
case 243:
red = 189; green = 126; blue = 141;
break;
case 244:
red = 129; green = 0; blue = 31;
break;
case 245:
red = 129; green = 86; blue = 96;
break;
case 246:
red = 104; green = 0; blue = 25;
break;
case 247:
red = 104; green = 69; blue = 78;
break;
case 248:
red = 79; green = 0; blue = 19;
break;
case 249:
red = 79; green = 53; blue = 59;
break;
#endregion
#region 250-255*
case 250:
red = 51; green = 51; blue = 51;
break;
case 251:
red = 80; green = 80; blue = 80;
break;
case 252:
red = 105; green = 105; blue = 105;
break;
case 253:
red = 130; green = 130; blue = 130;
break;
case 254:
red = 190; green = 190; blue = 190;
break;
case 255:
red = 255; green = 255; blue = 255;
break;
#endregion
#endregion
default:
red = 0; green = 0; blue = 0;
break;
}
}