1 module poison.ui.paint; 2 3 import dsfml.graphics : Color; 4 5 /** 6 * Gets a painting from RGBA. 7 * Params: 8 * r = The red channel. 9 * g = The green channel. 10 * b = The blue channel. 11 * a = The alpha channel. 12 * Returns: 13 * The paint. 14 */ 15 Paint paintFromRGBA(ubyte r, ubyte g, ubyte b, ubyte a = 0xff) { 16 Paint p; 17 p.r = r; 18 p.g = g; 19 p.b = b; 20 p.a = a; 21 return p; 22 } 23 24 /** 25 * Gets paint from a color name. 26 * Params: 27 * name = The name of the color. 28 */ 29 Paint paintFromName(string name) { 30 import std.string : toLower; 31 32 switch (name.toLower()) { 33 case "aliceblue": return aliceBlue; 34 case "antiquewhite": return antiqueWhite; 35 case "aqua": return aqua; 36 case "aquamarine": return aquamarine; 37 case "azure": return azure; 38 case "beige": return beige; 39 case "bisque": return bisque; 40 case "black": return black; 41 case "blanchedalmond": return blanchedAlmond; 42 case "blue": return blue; 43 case "blueviolet": return blueViolet; 44 case "brown": return brown; 45 case "burlywood": return burlyWood; 46 case "cadetblue": return cadetBlue; 47 case "chartreuse": return chartreuse; 48 case "chocolate": return chocolate; 49 case "coral": return coral; 50 case "cornflowerblue": return cornflowerBlue; 51 case "cornsilk": return cornsilk; 52 case "crimson": return crimson; 53 case "cyan": return cyan; 54 case "darkblue": return darkBlue; 55 case "darkcyan": return darkCyan; 56 case "darkgoldenrod": return darkGoldenrod; 57 case "darkgrey": return darkGrey; 58 case "darkgray": return darkGray; 59 case "darkgreen": return darkGreen; 60 case "darkkhaki": return darkKhaki; 61 case "darkmagenta": return darkMagenta; 62 case "darkolivegreen": return darkOliveGreen; 63 case "darkorange": return darkOrange; 64 case "darkorchid": return darkOrchid; 65 case "darkred": return darkRed; 66 case "darksalmon": return darkSalmon; 67 case "darkseagreen": return darkSeaGreen; 68 case "darkslateblue": return darkSlateBlue; 69 case "darkslategray": return darkSlateGray; 70 case "darkslategrey": return darkSlateGrey; 71 case "darkturquoise": return darkTurquoise; 72 case "darkviolet": return darkViolet; 73 case "deeppink": return deepPink; 74 case "deepskyblue": return deepSkyBlue; 75 case "dimgray": return dimGray; 76 case "dimgrey": return dimGrey; 77 case "dodgerblue": return dodgerBlue; 78 case "firebrick": return fireBrick; 79 case "floralwhite": return floralWhite; 80 case "forestgreen": return forestGreen; 81 case "fuchsia": return fuchsia; 82 case "gainsboro": return gainsboro; 83 case "ghostwhite": return ghostWhite; 84 case "gold": return gold; 85 case "goldenrod": return goldenrod; 86 case "gray": return gray; 87 case "grey": return grey; 88 case "green": return green; 89 case "greenyellow": return greenYellow; 90 case "honeydew": return honeydew; 91 case "hotpink": return hotPink; 92 case "indianred": return indianRed; 93 case "indigo": return indigo; 94 case "ivory": return ivory; 95 case "khaki": return khaki; 96 case "lavender": return lavender; 97 case "lavenderblush": return lavenderBlush; 98 case "lawngreen": return lawnGreen; 99 case "lemonchiffon": return lemonChiffon; 100 case "lightblue": return lightBlue; 101 case "lightcoral": return lightCoral; 102 case "lightcyan": return lightCyan; 103 case "lightgoldenrodyellow": return lightGoldenrodYellow; 104 case "lightgreen": return lightGreen; 105 case "lightgray": return lightGray; 106 case "lightgrey": return lightGrey; 107 case "lightpink": return lightPink; 108 case "lightsalmon": return lightSalmon; 109 case "lightseagreen": return lightSeaGreen; 110 case "lightskyblue": return lightSkyBlue; 111 case "lightslategray": return lightSlateGray; 112 case "lightslategrey": return lightSlateGrey; 113 case "lightsteelblue": return lightSteelBlue; 114 case "lightyellow": return lightYellow; 115 case "lime": return lime; 116 case "limegreen": return limeGreen; 117 case "linen": return linen; 118 case "magenta": return magenta; 119 case "maroon": return maroon; 120 case "mediumaquamarine": return mediumAquamarine; 121 case "mediumblue": return mediumBlue; 122 case "mediumorchid": return mediumOrchid; 123 case "mediumpurple": return mediumPurple; 124 case "mediumseagreen": return mediumSeaGreen; 125 case "mediumslateblue": return mediumSlateBlue; 126 case "mediumspringgreen": return mediumSpringGreen; 127 case "mediumturquoise": return mediumTurquoise; 128 case "mediumvioletred": return mediumVioletRed; 129 case "midnightblue": return midnightBlue; 130 case "mintcream": return mintCream; 131 case "mistyrose": return mistyRose; 132 case "moccasin": return moccasin; 133 case "navajowhite": return navajoWhite; 134 case "navy": return navy; 135 case "oldlace": return oldLace; 136 case "olive": return olive; 137 case "olivedrab": return oliveDrab; 138 case "orange": return orange; 139 case "orangered": return orangeRed; 140 case "orchid": return orchid; 141 case "palegoldenrod": return paleGoldenrod; 142 case "palegreen": return paleGreen; 143 case "paleturquoise": return paleTurquoise; 144 case "palevioletred": return paleVioletRed; 145 case "papayawhip": return papayaWhip; 146 case "peachpuff": return peachPuff; 147 case "peru": return peru; 148 case "pink": return pink; 149 case "plum": return plum; 150 case "powderblue": return powderBlue; 151 case "purple": return purple; 152 case "red": return red; 153 case "rosybrown": return rosyBrown; 154 case "royalblue": return royalBlue; 155 case "saddlebrown": return saddleBrown; 156 case "salmon": return salmon; 157 case "sandybrown": return sandyBrown; 158 case "seagreen": return seaGreen; 159 case "seashell": return seashell; 160 case "sienna": return sienna; 161 case "silver": return silver; 162 case "skyblue": return skyBlue; 163 case "slateblue": return slateBlue; 164 case "slategray": return slateGray; 165 case "slategrey": return slateGrey; 166 case "snow": return snow; 167 case "springgreen": return springGreen; 168 case "steelblue": return steelBlue; 169 case "tan": return tan; 170 case "teal": return teal; 171 case "thistle": return thistle; 172 case "tomato": return tomato; 173 case "turquoise": return turquoise; 174 case "violet": return violet; 175 case "wheat": return wheat; 176 case "white": return white; 177 case "whitesmoke": return whiteSmoke; 178 case "yellow": return yellow; 179 case "yellowgreen": return yellowGreen; 180 default: return transparent; 181 } 182 } 183 184 /* Contrast & Misc */ 185 186 /// White paint. 187 Paint white = paintFromRGBA(0xff, 0xff, 0xff); 188 189 /// Black paint. 190 Paint black = paintFromRGBA(0x00, 0x00, 0x00); 191 192 /// Transparent paint. 193 Paint transparent = paintFromRGBA(0x00, 0x00, 0x00, 0x00); 194 195 /* Standard */ 196 197 /// Red paint. 198 Paint red = paintFromRGBA(0xff, 0x00, 0x00); 199 200 /// Green paint. 201 Paint green = paintFromRGBA(0x00, 0xff, 0x00); 202 203 /// Blue paint. 204 Paint blue = paintFromRGBA(0x00, 0x00, 0xff); 205 206 /* System colors */ 207 208 /// AliceBlue paint. 209 Paint aliceBlue = paintFromRGBA(0xf0, 0xf8, 0xff); 210 211 /// AntiqueWhite paint. 212 Paint antiqueWhite = paintFromRGBA(0xfa, 0xeb, 0xd7); 213 214 /// Aqua paint. 215 Paint aqua = paintFromRGBA(0x00, 0xff, 0xff); 216 217 /// Aquamarine paint. 218 Paint aquamarine = paintFromRGBA(0x7f, 0xff, 0xd4); 219 220 /// Azure paint. 221 Paint azure = paintFromRGBA(0xf0, 0xff, 0xff); 222 223 /// Beige paint. 224 Paint beige = paintFromRGBA(0xf5, 0xf5, 0xdc); 225 226 /// Bisque paint. 227 Paint bisque = paintFromRGBA(0xff, 0xe4, 0xc4); 228 229 /// BlanchedAlmond paint. 230 Paint blanchedAlmond = paintFromRGBA(0xff, 0xeb, 0xcd); 231 232 /// BlueViolet paint. 233 Paint blueViolet = paintFromRGBA(0x8a, 0x2b, 0xe2); 234 235 /// Brown paint. 236 Paint brown = paintFromRGBA(0xa5, 0x2a, 0x2a); 237 238 /// BurlyWood paint. 239 Paint burlyWood = paintFromRGBA(0xde, 0xb8, 0x87); 240 241 /// CadetBlue paint. 242 Paint cadetBlue = paintFromRGBA(0x5f, 0x9e, 0xa0); 243 244 /// Chartreuse paint. 245 Paint chartreuse = paintFromRGBA(0x7f, 0xff, 0x00); 246 247 /// Chocolate paint. 248 Paint chocolate = paintFromRGBA(0xd2, 0x69, 0x1e); 249 250 /// Coral paint. 251 Paint coral = paintFromRGBA(0xff, 0x7f, 0x50); 252 253 /// CornflowerBlue paint. 254 Paint cornflowerBlue = paintFromRGBA(0x64, 0x95, 0xed); 255 256 /// Cornsilk paint. 257 Paint cornsilk = paintFromRGBA(0xff, 0xf8, 0xdc); 258 259 /// Crimson paint. 260 Paint crimson = paintFromRGBA(0xdc, 0x14, 0x3c); 261 262 /// Cyan paint. 263 Paint cyan = paintFromRGBA(0x00, 0xff, 0xff); 264 265 /// DarkBlue paint. 266 Paint darkBlue = paintFromRGBA(0x00, 0x00, 0x8b); 267 268 /// DarkCyan paint. 269 Paint darkCyan = paintFromRGBA(0x00, 0x8b, 0x8b); 270 271 /// DarkGoldenrod paint. 272 Paint darkGoldenrod = paintFromRGBA(0xb8, 0x86, 0x0b); 273 274 /// DarkGrey paint. 275 Paint darkGrey = paintFromRGBA(0xa9, 0xa9, 0xa9); 276 277 /// DarkGray paint. 278 Paint darkGray = paintFromRGBA(0xa9, 0xa9, 0xa9); 279 280 /// DarkGreen paint. 281 Paint darkGreen = paintFromRGBA(0x00, 0x64, 0x00); 282 283 /// DarkKhaki paint. 284 Paint darkKhaki = paintFromRGBA(0xbd, 0xb7, 0x6b); 285 286 /// DarkMagenta paint. 287 Paint darkMagenta = paintFromRGBA(0x8b, 0x00, 0x8b); 288 289 /// DarkOliveGreen paint. 290 Paint darkOliveGreen = paintFromRGBA(0x55, 0x6b, 0x2f); 291 292 /// DarkOrange paint. 293 Paint darkOrange = paintFromRGBA(0xff, 0x8c, 0x00); 294 295 /// DarkOrchid paint. 296 Paint darkOrchid = paintFromRGBA(0x99, 0x32, 0xcc); 297 298 /// DarkRed paint. 299 Paint darkRed = paintFromRGBA(0x8b, 0x00, 0x00); 300 301 /// DarkSalmon paint. 302 Paint darkSalmon = paintFromRGBA(0xe9, 0x96, 0x7a); 303 304 /// DarkSeaGreen paint. 305 Paint darkSeaGreen = paintFromRGBA(0x8f, 0xbc, 0x8f); 306 307 /// DarkSlateBlue paint. 308 Paint darkSlateBlue = paintFromRGBA(0x48, 0x3d, 0x8b); 309 310 /// DarkSlateGray paint. 311 Paint darkSlateGray = paintFromRGBA(0x2f, 0x4f, 0x4f); 312 313 /// DarkSlateGrey paint. 314 Paint darkSlateGrey = paintFromRGBA(0x2f, 0x4f, 0x4f); 315 316 /// DarkTurquoise paint. 317 Paint darkTurquoise = paintFromRGBA(0x00, 0xce, 0xd1); 318 319 /// DarkViolet paint. 320 Paint darkViolet = paintFromRGBA(0x94, 0x00, 0xd3); 321 322 /// DeepPink paint. 323 Paint deepPink = paintFromRGBA(0xff, 0x14, 0x93); 324 325 /// DeepSkyBlue paint. 326 Paint deepSkyBlue = paintFromRGBA(0x00, 0xbf, 0xff); 327 328 /// DimGray paint. 329 Paint dimGray = paintFromRGBA(0x69, 0x69, 0x69); 330 331 /// DimGrey paint. 332 Paint dimGrey = paintFromRGBA(0x69, 0x69, 0x69); 333 334 /// DodgerBlue paint. 335 Paint dodgerBlue = paintFromRGBA(0x1e, 0x90, 0xff); 336 337 /// FireBrick paint. 338 Paint fireBrick = paintFromRGBA(0xb2, 0x22, 0x22); 339 340 /// FloralWhite paint. 341 Paint floralWhite = paintFromRGBA(0xff, 0xfa, 0xf0); 342 343 /// ForestGreen paint. 344 Paint forestGreen = paintFromRGBA(0x22, 0x8b, 0x22); 345 346 /// Fuchsia paint. 347 Paint fuchsia = paintFromRGBA(0xff, 0x00, 0xff); 348 349 /// Gainsboro paint. 350 Paint gainsboro = paintFromRGBA(0xdc, 0xdc, 0xdc); 351 352 /// GhostWhite paint. 353 Paint ghostWhite = paintFromRGBA(0xf8, 0xf8, 0xff); 354 355 /// Gold paint. 356 Paint gold = paintFromRGBA(0xff, 0xd7, 0x00); 357 358 /// Goldenrod paint. 359 Paint goldenrod = paintFromRGBA(0xda, 0xa5, 0x20); 360 361 /// Gray paint. 362 Paint gray = paintFromRGBA(0x80, 0x80, 0x80); 363 364 /// Grey paint. 365 Paint grey = paintFromRGBA(0x80, 0x80, 0x80); 366 367 /// GreenYellow paint. 368 Paint greenYellow = paintFromRGBA(0xad, 0xff, 0x2f); 369 370 /// Honeydew paint. 371 Paint honeydew = paintFromRGBA(0xf0, 0xff, 0xf0); 372 373 /// HotPink paint. 374 Paint hotPink = paintFromRGBA(0xff, 0x69, 0xb4); 375 376 /// IndianRed paint. 377 Paint indianRed = paintFromRGBA(0xcd, 0x5c, 0x5c); 378 379 /// Indigo paint. 380 Paint indigo = paintFromRGBA(0x4b, 0x00, 0x82); 381 382 /// Ivory paint. 383 Paint ivory = paintFromRGBA(0xff, 0xff, 0xf0); 384 385 /// Khaki paint. 386 Paint khaki = paintFromRGBA(0xf0, 0xe6, 0x8c); 387 388 /// Lavender paint. 389 Paint lavender = paintFromRGBA(0xe6, 0xe6, 0xfa); 390 391 /// LavenderBlush paint. 392 Paint lavenderBlush = paintFromRGBA(0xff, 0xf0, 0xf5); 393 394 /// LawnGreen paint. 395 Paint lawnGreen = paintFromRGBA(0x7c, 0xfc, 0x00); 396 397 /// LemonChiffon paint. 398 Paint lemonChiffon = paintFromRGBA(0xff, 0xfa, 0xcd); 399 400 /// LightBlue paint. 401 Paint lightBlue = paintFromRGBA(0xad, 0xd8, 0xe6); 402 403 /// LightCoral paint. 404 Paint lightCoral = paintFromRGBA(0xf0, 0x80, 0x80); 405 406 /// LightCyan paint. 407 Paint lightCyan = paintFromRGBA(0xe0, 0xff, 0xff); 408 409 /// LightGoldenrodYellow paint. 410 Paint lightGoldenrodYellow = paintFromRGBA(0xfa, 0xfa, 0xd2); 411 412 /// LightGreen paint. 413 Paint lightGreen = paintFromRGBA(0x90, 0xee, 0x90); 414 415 /// LightGray paint. 416 Paint lightGray = paintFromRGBA(0xd3, 0xd3, 0xd3); 417 418 /// LightGrey paint. 419 Paint lightGrey = paintFromRGBA(0xd3, 0xd3, 0xd3); 420 421 /// LightPink paint. 422 Paint lightPink = paintFromRGBA(0xff, 0xb6, 0xc1); 423 424 /// LightSalmon paint. 425 Paint lightSalmon = paintFromRGBA(0xff, 0xa0, 0x7a); 426 427 /// LightSeaGreen paint. 428 Paint lightSeaGreen = paintFromRGBA(0x20, 0xb2, 0xaa); 429 430 /// LightSkyBlue paint. 431 Paint lightSkyBlue = paintFromRGBA(0x87, 0xce, 0xfa); 432 433 /// LightSlateGray paint. 434 Paint lightSlateGray = paintFromRGBA(0x77, 0x88, 0x99); 435 436 /// LightSlateGrey paint. 437 Paint lightSlateGrey = paintFromRGBA(0x77, 0x88, 0x99); 438 439 /// LightSteelBlue paint. 440 Paint lightSteelBlue = paintFromRGBA(0xb0, 0xc4, 0xde); 441 442 /// LightYellow paint. 443 Paint lightYellow = paintFromRGBA(0xff, 0xff, 0xe0); 444 445 /// Lime paint. 446 Paint lime = paintFromRGBA(0x00, 0xff, 0x00); 447 448 /// LimeGreen paint. 449 Paint limeGreen = paintFromRGBA(0x32, 0xcd, 0x32); 450 451 /// Linen paint. 452 Paint linen = paintFromRGBA(0xfa, 0xf0, 0xe6); 453 454 /// Magenta paint. 455 Paint magenta = paintFromRGBA(0xff, 0x00, 0xff); 456 457 /// Maroon paint. 458 Paint maroon = paintFromRGBA(0x80, 0x00, 0x00); 459 460 /// MediumAquamarine paint. 461 Paint mediumAquamarine = paintFromRGBA(0x66, 0xcd, 0xaa); 462 463 /// MediumBlue paint. 464 Paint mediumBlue = paintFromRGBA(0x00, 0x00, 0xcd); 465 466 /// MediumOrchid paint. 467 Paint mediumOrchid = paintFromRGBA(0xba, 0x55, 0xd3); 468 469 /// MediumPurple paint. 470 Paint mediumPurple = paintFromRGBA(0x93, 0x70, 0xdb); 471 472 /// MediumSeaGreen paint. 473 Paint mediumSeaGreen = paintFromRGBA(0x3c, 0xb3, 0x71); 474 475 /// MediumSlateBlue paint. 476 Paint mediumSlateBlue = paintFromRGBA(0x7b, 0x68, 0xee); 477 478 /// MediumSpringGreen paint. 479 Paint mediumSpringGreen = paintFromRGBA(0x00, 0xfa, 0x9a); 480 481 /// MediumTurquoise paint. 482 Paint mediumTurquoise = paintFromRGBA(0x48, 0xd1, 0xcc); 483 484 /// MediumVioletRed paint. 485 Paint mediumVioletRed = paintFromRGBA(0xc7, 0x15, 0x85); 486 487 /// MidnightBlue paint. 488 Paint midnightBlue = paintFromRGBA(0x19, 0x19, 0x70); 489 490 /// MintCream paint. 491 Paint mintCream = paintFromRGBA(0xf5, 0xff, 0xfa); 492 493 /// MistyRose paint. 494 Paint mistyRose = paintFromRGBA(0xff, 0xe4, 0xe1); 495 496 /// Moccasin paint. 497 Paint moccasin = paintFromRGBA(0xff, 0xe4, 0xb5); 498 499 /// NavajoWhite paint. 500 Paint navajoWhite = paintFromRGBA(0xff, 0xde, 0xad); 501 502 /// Navy paint. 503 Paint navy = paintFromRGBA(0x00, 0x00, 0x80); 504 505 /// OldLace paint. 506 Paint oldLace = paintFromRGBA(0xfd, 0xf5, 0xe6); 507 508 /// Olive paint. 509 Paint olive = paintFromRGBA(0x80, 0x80, 0x00); 510 511 /// OliveDrab paint. 512 Paint oliveDrab = paintFromRGBA(0x6b, 0x8e, 0x23); 513 514 /// Orange paint. 515 Paint orange = paintFromRGBA(0xff, 0xa5, 0x00); 516 517 /// OrangeRed paint. 518 Paint orangeRed = paintFromRGBA(0xff, 0x45, 0x00); 519 520 /// Orchid paint. 521 Paint orchid = paintFromRGBA(0xda, 0x70, 0xd6); 522 523 /// PaleGoldenrod paint. 524 Paint paleGoldenrod = paintFromRGBA(0xee, 0xe8, 0xaa); 525 526 /// PaleGreen paint. 527 Paint paleGreen = paintFromRGBA(0x98, 0xfb, 0x98); 528 529 /// PaleTurquoise paint. 530 Paint paleTurquoise = paintFromRGBA(0xaf, 0xee, 0xee); 531 532 /// PaleVioletRed paint. 533 Paint paleVioletRed = paintFromRGBA(0xdb, 0x70, 0x93); 534 535 /// PapayaWhip paint. 536 Paint papayaWhip = paintFromRGBA(0xff, 0xef, 0xd5); 537 538 /// PeachPuff paint. 539 Paint peachPuff = paintFromRGBA(0xff, 0xda, 0xb9); 540 541 /// Peru paint. 542 Paint peru = paintFromRGBA(0xcd, 0x85, 0x3f); 543 544 /// Pink paint. 545 Paint pink = paintFromRGBA(0xff, 0xc0, 0xcb); 546 547 /// Plum paint. 548 Paint plum = paintFromRGBA(0xdd, 0xa0, 0xdd); 549 550 /// PowderBlue paint. 551 Paint powderBlue = paintFromRGBA(0xb0, 0xe0, 0xe6); 552 553 /// Purple paint. 554 Paint purple = paintFromRGBA(0x80, 0x00, 0x80); 555 556 /// RosyBrown paint. 557 Paint rosyBrown = paintFromRGBA(0xbc, 0x8f, 0x8f); 558 559 /// RoyalBlue paint. 560 Paint royalBlue = paintFromRGBA(0x41, 0x69, 0xe1); 561 562 /// SaddleBrown paint. 563 Paint saddleBrown = paintFromRGBA(0x8b, 0x45, 0x13); 564 565 /// Salmon paint. 566 Paint salmon = paintFromRGBA(0xfa, 0x80, 0x72); 567 568 /// SandyBrown paint. 569 Paint sandyBrown = paintFromRGBA(0xf4, 0xa4, 0x60); 570 571 /// SeaGreen paint. 572 Paint seaGreen = paintFromRGBA(0x2e, 0x8b, 0x57); 573 574 /// Seashell paint. 575 Paint seashell = paintFromRGBA(0xff, 0xf5, 0xee); 576 577 /// Sienna paint. 578 Paint sienna = paintFromRGBA(0xa0, 0x52, 0x2d); 579 580 /// Silver paint. 581 Paint silver = paintFromRGBA(0xc0, 0xc0, 0xc0); 582 583 /// SkyBlue paint. 584 Paint skyBlue = paintFromRGBA(0x87, 0xce, 0xeb); 585 586 /// SlateBlue paint. 587 Paint slateBlue = paintFromRGBA(0x6a, 0x5a, 0xcd); 588 589 /// SlateGray paint. 590 Paint slateGray = paintFromRGBA(0x70, 0x80, 0x90); 591 592 /// SlateGrey paint. 593 Paint slateGrey = paintFromRGBA(0x70, 0x80, 0x90); 594 595 /// Snow paint. 596 Paint snow = paintFromRGBA(0xff, 0xfa, 0xfa); 597 598 /// SpringGreen paint. 599 Paint springGreen = paintFromRGBA(0x00, 0xff, 0x7f); 600 601 /// SteelBlue paint. 602 Paint steelBlue = paintFromRGBA(0x46, 0x82, 0xb4); 603 604 /// Tan paint. 605 Paint tan = paintFromRGBA(0xd2, 0xb4, 0x8c); 606 607 /// Teal paint. 608 Paint teal = paintFromRGBA(0x00, 0x80, 0x80); 609 610 /// Thistle paint. 611 Paint thistle = paintFromRGBA(0xd8, 0xbf, 0xd8); 612 613 /// Tomato paint. 614 Paint tomato = paintFromRGBA(0xff, 0x63, 0x47); 615 616 /// Turquoise paint. 617 Paint turquoise = paintFromRGBA(0x40, 0xe0, 0xd0); 618 619 /// Violet paint. 620 Paint violet = paintFromRGBA(0xee, 0x82, 0xee); 621 622 /// Wheat paint. 623 Paint wheat = paintFromRGBA(0xf5, 0xde, 0xb3); 624 625 /// WhiteSmoke paint. 626 Paint whiteSmoke = paintFromRGBA(0xf5, 0xf5, 0xf5); 627 628 /// Yellow paint. 629 Paint yellow = paintFromRGBA(0xff, 0xff, 0x00); 630 631 /// YellowGreen paint. 632 Paint yellowGreen = paintFromRGBA(0x9a, 0xcd, 0x32); 633 634 /// Paint structure. 635 struct Paint { 636 public: 637 /// The red channel. 638 ubyte r; 639 /// The green channel. 640 ubyte g; 641 /// The blue channel. 642 ubyte b; 643 /// The alpha channel. 644 ubyte a; 645 646 @property { 647 /// Gets the low-level sfml color equivalent to the paint. 648 Color sfmlColor() { 649 return Color(r,g,b,a); 650 } 651 } 652 }