xtd - Reference Guide 0.2.0
color.h
Go to the documentation of this file.
1 #pragma once
5 #include <cstdint>
6 #include <ostream>
7 #include <string>
8 #include <xtd/object.h>
9 #include <xtd/ustring.h>
10 #include "../drawing_export.h"
11 #include "known_color.h"
12 
14 namespace xtd {
16  namespace drawing {
44  class drawing_export_ color : public xtd::object {
45  public:
47 
50  static const xtd::drawing::color empty;
51 
55 
58 
61 
63  static const xtd::drawing::color aqua;
64 
67 
69  static const xtd::drawing::color azure;
70 
72  static const xtd::drawing::color beige;
73 
76 
78  static const xtd::drawing::color black;
79 
82 
84  static const xtd::drawing::color blue;
85 
88 
90  static const xtd::drawing::color brown;
91 
94 
97 
100 
103 
106 
109 
112 
115 
117  static const xtd::drawing::color cyan;
118 
121 
124 
127 
130 
133 
136 
139 
142 
145 
148 
151 
154 
157 
160 
163 
166 
169 
172 
175 
178 
181 
184 
187 
190 
193 
196 
199 
201  static const xtd::drawing::color gold;
202 
205 
207  static const xtd::drawing::color gray;
208 
211 
214 
217 
220 
223 
226 
229 
232 
235 
238 
241 
244 
247 
250 
253 
256 
259 
262 
265 
268 
271 
274 
277 
280 
283 
285  static const xtd::drawing::color lime;
286 
289 
292 
295 
298 
301 
304 
307 
310 
313 
316 
319 
322 
325 
328 
331 
334 
337 
340 
342  static const xtd::drawing::color navy;
343 
346 
349 
352 
355 
358 
361 
364 
367 
370 
373 
376 
379 
381  static const xtd::drawing::color peru;
382 
384  static const xtd::drawing::color pink;
385 
387  static const xtd::drawing::color plum;
388 
391 
394 
397 
399  static const xtd::drawing::color red;
400 
403 
406 
409 
412 
415 
418 
421 
424 
427 
430 
433 
436 
438  static const xtd::drawing::color snow;
439 
442 
445 
447  static const xtd::drawing::color tan;
448 
450  static const xtd::drawing::color teal;
451 
454 
457 
460 
463 
466 
469 
472 
475 
478 
481  static constexpr double lightness_threshold = 0.5;
483 
485 
488  color() = default;
490 
492  color(const color& color) = default;
493  color& operator =(const color& color) = default;
494  bool operator ==(const color& value) const {return argb_ == value.argb_ && handle_ == value.handle_ && name_ == value.name_ && empty_ == value.empty_;}
495  bool operator !=(const color& value) const {return !operator ==(value);}
497 
499 
518  uint8_t a() const {return (uint8_t)((to_argb() & 0xFF000000) >> 24);}
519 
537  uint8_t b() const {return (uint8_t)(to_argb() & 0x000000FF);}
538 
556  uint8_t g() const {return (uint8_t)((to_argb() & 0x0000FF00) >> 8);}
557 
560  intptr_t handle() const {return handle_;}
561 
564  bool is_dark() const {return get_lightness() < lightness_threshold;}
565 
568  bool is_empty() const {return empty_;}
569 
573  bool is_known_color() const {return known_color_ != (xtd::drawing::known_color)0;}
574 
577  bool is_light() const {return get_lightness() >= lightness_threshold;}
578 
581  bool is_named_color() const {return name_ != ustring::format("{:X8}", argb_) && name_ != "0";}
582 
585  bool is_system_color() const;
586 
589  xtd::ustring name() const {return name_;}
590 
608  uint8_t r() const {return (uint8_t)((to_argb() & 0x00FF0000) >> 16);}
610 
612 
625  static color average(const color& color1, const color& color2, double weight, bool average_alpha) {return from_argb(average_alpha ? static_cast<uint8_t>(color1.a() * (1 - weight) + color2.a() * weight) : static_cast<uint8_t>(color1.a()), static_cast<uint8_t>(color1.r() * (1 - weight) + color2.r() * weight), static_cast<uint8_t>(color1.g() * (1 - weight) + color2.g() * weight), static_cast<uint8_t>(color1.b() * (1 - weight) + color2.b() * weight));}
626 
638  static color average(const color& color1, const color& color2, double weight) {return average(color1, color2, weight, false);}
639 
643  static color dark(const color& color, double weight) {return color::average(color, drawing::color::black, weight);}
644 
648  static color dark(const color& color) {return color::dark(color, 1.0 / 3);}
649 
653  static color light(const color& color, double weight) {return color::average(color, drawing::color::white, weight);}
654 
658  static color light(const color& color) {return color::light(color, 1.0 / 3);}
659 
692  static xtd::drawing::color from_argb(uint32_t argb);
693 
757  static xtd::drawing::color from_argb(uint8_t alpha, const xtd::drawing::color& base_color);
758 
793  static xtd::drawing::color from_argb(uint8_t alpha, uint8_t red, uint8_t green, uint8_t blue);
794 
859  static xtd::drawing::color from_argb(uint8_t red, uint8_t green, uint8_t blue);
860 
865  static xtd::drawing::color from_handle(intptr_t handle);
866 
871  static xtd::drawing::color from_hsb(float hue, float saturation, float brightness);
872 
877  static xtd::drawing::color from_hsl(float hue, float saturation, float lightness);
878 
933  static xtd::drawing::color from_known_color(xtd::drawing::known_color color);
934 
953  static xtd::drawing::color from_name(const xtd::ustring& name);
954 
1004  float get_brightness() const;
1005 
1055  float get_hue() const;
1056 
1059  float get_lightness() const;
1060 
1110  float get_saturation() const;
1111 
1115  static xtd::drawing::color parse(const xtd::ustring& color);
1116 
1172  uint32_t to_argb() const;
1173 
1177  xtd::drawing::known_color to_known_color() const;
1178 
1228  xtd::ustring to_string() const noexcept override;
1230 
1231  private:
1232  explicit color(uint32_t argb) : argb_(argb), name_(argb ? ustring::format("{:X8}", argb) : "0"), empty_(false) {}
1233  explicit color(intptr_t handle) : handle_(handle), name_(ustring::format("{:X}h", handle)), empty_(false) {}
1234  color(const color& color, const xtd::drawing::known_color& know_color);
1235 
1236  uint32_t argb_ = 0;
1237  intptr_t handle_ = 0;
1239  xtd::ustring name_ = "0";
1240  bool empty_ = true;
1241  };
1242  }
1243 
1248  template<>
1249  inline drawing::color parse<drawing::color>(const std::string& str) {
1250  return drawing::color::parse(str);
1251  }
1252 }
static const xtd::drawing::color firebrick
Gets a system-defined color that has an ARGB value of 0xFFB22222. This field is constant.
Definition: color.h:183
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition: color.h:399
uint8_t a() const
Gets the alpha component value of this xtd::drawing::color class.
Definition: color.h:518
static const xtd::drawing::color orange
Gets a system-defined color that has an ARGB value of 0xFFFFA500. This field is constant.
Definition: color.h:354
intptr_t handle() const
Gets the native handle of this xtd::drawing::color class.
Definition: color.h:560
static const xtd::drawing::color medium_blue
Gets a system-defined color that has an ARGB value of 0xFF0000CD. This field is constant.
Definition: color.h:303
static const xtd::drawing::color royal_blue
Gets a system-defined color that has an ARGB value of 0xFF4169E1. This field is constant.
Definition: color.h:405
static const xtd::drawing::color medium_violet_red
Gets a system-defined color that has an ARGB value of 0xFFC71585. This field is constant.
Definition: color.h:324
static const xtd::drawing::color salmon
Gets a system-defined color that has an ARGB value of 0xFFFA8072. This field is constant.
Definition: color.h:411
static const xtd::drawing::color magenta
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
Definition: color.h:294
static const xtd::drawing::color saddle_brown
Gets a system-defined color that has an ARGB value of 0xFF8B4513. This field is constant.
Definition: color.h:408
static const xtd::drawing::color alice_blue
Gets a system-defined color that has an ARGB value of 0xFFF0F8FF. This field is constant.
Definition: color.h:57
static const xtd::drawing::color dark_slate_blue
Gets a system-defined color that has an ARGB value of 0xFF483D8B. This field is constant.
Definition: color.h:159
static const xtd::drawing::color dark_blue
Gets a system-defined color that has an ARGB value of 0xFF00008B. This field is constant.
Definition: color.h:120
value_t parse(const std::string &str)
Convert a string into a type.
Definition: parse.h:22
static const xtd::drawing::color dark_slate_gray
Gets a system-defined color that has an ARGB value of 0xFF2F4F4F. This field is constant.
Definition: color.h:162
static const xtd::drawing::color violet
Gets a system-defined color that has an ARGB value of 0xFFEE82EE. This field is constant.
Definition: color.h:462
static const xtd::drawing::color floral_white
Gets a system-defined color that has an ARGB value of 0xFFFFFAF0. This field is constant.
Definition: color.h:186
static color average(const color &color1, const color &color2, double weight, bool average_alpha)
Returns the weighted average color between the two given colors.
Definition: color.h:625
static const xtd::drawing::color light_blue
Gets a system-defined color that has an ARGB value of 0xFFADD8E6. This field is constant.
Definition: color.h:246
static const xtd::drawing::color rosy_brown
Gets a system-defined color that has an ARGB value of 0xFFBC8F8F. This field is constant.
Definition: color.h:402
static const xtd::drawing::color light_salmon
Gets a system-defined color that has an ARGB value of 0xFFFFA07A. This field is constant.
Definition: color.h:267
static const xtd::drawing::color maroon
Gets a system-defined color that has an ARGB value of 0xFF800000. This field is constant.
Definition: color.h:297
static const xtd::drawing::color dark_gray
Gets a system-defined color that has an ARGB value of 0xFFA9A9A9. This field is constant.
Definition: color.h:129
uint8_t b() const
Gets the blue component value of this xtd::drawing::color class.
Definition: color.h:537
static const xtd::drawing::color light_slate_gray
Gets a system-defined color that has an ARGB value of 0xFF778899. This field is constant.
Definition: color.h:276
static const xtd::drawing::color azure
Gets a system-defined color that has an ARGB value of 0xFFF0FFFF. This field is constant.
Definition: color.h:69
static const xtd::drawing::color brown
Gets a system-defined color that has an ARGB value of 0xFFA52A2A. This field is constant.
Definition: color.h:90
static const xtd::drawing::color wheat
Gets a system-defined color that has an ARGB value of 0xFFF5DEB3. This field is constant.
Definition: color.h:465
static const xtd::drawing::color light_sky_blue
Gets a system-defined color that has an ARGB value of 0xFF87CEFA. This field is constant.
Definition: color.h:273
static const xtd::drawing::color lemon_chiffon
Gets a system-defined color that has an ARGB value of 0xFFFFFACD. This field is constant.
Definition: color.h:243
static const xtd::drawing::color dark_red
Gets a system-defined color that has an ARGB value of 0xFF8B0000. This field is constant.
Definition: color.h:150
static const xtd::drawing::color old_lace
Gets a system-defined color that has an ARGB value of 0xFFFDF5E6. This field is constant.
Definition: color.h:345
static const xtd::drawing::color light_yellow
Gets a system-defined color that has an ARGB value of 0xFFFFFFE0. This field is constant.
Definition: color.h:282
static const xtd::drawing::color lime_green
Gets a system-defined color that has an ARGB value of 0xFF32CD32. This field is constant.
Definition: color.h:288
static const xtd::drawing::color light_coral
Gets a system-defined color that has an ARGB value of 0xFFF08080. This field is constant.
Definition: color.h:249
static const xtd::drawing::color silver
Gets a system-defined color that has an ARGB value of 0xFFC0C0C0. This field is constant.
Definition: color.h:426
static const xtd::drawing::color lime
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant.
Definition: color.h:285
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static const xtd::drawing::color empty
Represents a color that is null.
Definition: color.h:50
static const xtd::drawing::color cadet_blue
Gets a system-defined color that has an ARGB value of 0xFF5F9EA0. This field is constant.
Definition: color.h:96
static const xtd::drawing::color rebecca_purple
Gets a system-defined color that has an ARGB value of 0xFF663399. This field is constant.
Definition: color.h:396
static const xtd::drawing::color aqua
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
Definition: color.h:63
static const xtd::drawing::color green_yellow
Gets a system-defined color that has an ARGB value of 0xFFADFF2F. This field is constant.
Definition: color.h:213
static const xtd::drawing::color sienna
Gets a system-defined color that has an ARGB value of 0xFFA0522D. This field is constant.
Definition: color.h:423
static const xtd::drawing::color thistle
Gets a system-defined color that has an ARGB value of 0xFFD8BFD8. This field is constant.
Definition: color.h:453
static const xtd::drawing::color olive
Gets a system-defined color that has an ARGB value of 0xFF808000. This field is constant.
Definition: color.h:348
static const xtd::drawing::color crimson
Gets a system-defined color that has an ARGB value of 0xFFDC143C. This field is constant.
Definition: color.h:114
static const xtd::drawing::color lavender
Gets a system-defined color that has an ARGB value of 0xFFE6E6FA. This field is constant.
Definition: color.h:234
static const xtd::drawing::color purple
Gets a system-defined color that has an ARGB value of 0xFF800080. This field is constant.
Definition: color.h:393
static color light(const color &color)
Returns a lighter version of the specified color.
Definition: color.h:658
static const xtd::drawing::color antique_white
Gets a system-defined color that has an ARGB value of 0xFFFAEBD7. This field is constant.
Definition: color.h:60
static const xtd::drawing::color light_green
Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant.
Definition: color.h:261
static const xtd::drawing::color deep_sky_blue
Gets a system-defined color that has an ARGB value of 0xFF00BFFF. This field is constant.
Definition: color.h:174
static const xtd::drawing::color pale_goldenrod
Gets a system-defined color that has an ARGB value of 0xFFEEE8AA. This field is constant.
Definition: color.h:363
static const xtd::drawing::color pale_green
Gets a system-defined color that has an ARGB value of 0xFF98FB98. This field is constant.
Definition: color.h:366
static const xtd::drawing::color dark_violet
Gets a system-defined color that has an ARGB value of 0xFF9400D3. This field is constant.
Definition: color.h:168
static const xtd::drawing::color dark_green
Gets a system-defined color that has an ARGB value of 0xFF006400. This field is constant.
Definition: color.h:132
static const xtd::drawing::color white_smoke
Gets a system-defined color that has an ARGB value of 0xFFF5F5F5. This field is constant.
Definition: color.h:471
static const xtd::drawing::color pale_violet_red
Gets a system-defined color that has an ARGB value of 0xFFDB7093. This field is constant.
Definition: color.h:372
static const xtd::drawing::color mint_cream
Gets a system-defined color that has an ARGB value of 0xFFF5FFFA. This field is constant.
Definition: color.h:330
static const xtd::drawing::color midnight_blue
Gets a system-defined color that has an ARGB value of 0xFF191970. This field is constant.
Definition: color.h:327
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:51
static const xtd::drawing::color green
Gets a system-defined color that has an ARGB value of 0xFF008000. This field is constant.
Definition: color.h:210
static const xtd::drawing::color dim_gray
Gets a system-defined color that has an ARGB value of 0xFF696969. This field is constant.
Definition: color.h:177
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1100
static const xtd::drawing::color gray
Gets a system-defined color that has an ARGB value of 0xFF808080. This field is constant.
Definition: color.h:207
static const xtd::drawing::color burly_wood
Gets a system-defined color that has an ARGB value of 0xFFDEB887. This field is constant.
Definition: color.h:93
static color light(const color &color, double weight)
Returns a lighter version of the specified color.
Definition: color.h:653
static const xtd::drawing::color dark_sea_green
Gets a system-defined color that has an ARGB value of 0xFF8FBC8B. This field is constant.
Definition: color.h:156
static const xtd::drawing::color sea_shell
Gets a system-defined color that has an ARGB value of 0xFFFFF5EE. This field is constant.
Definition: color.h:420
static const xtd::drawing::color steel_blue
Gets a system-defined color that has an ARGB value of 0xFF4682B4. This field is constant.
Definition: color.h:444
uint8_t g() const
Gets the green component value of this xtd::drawing::color class.
Definition: color.h:556
static const xtd::drawing::color light_goldenrod_yellow
Gets a system-defined color that has an ARGB value of 0xFFFAFAD2. This field is constant.
Definition: color.h:255
static const xtd::drawing::color linen
Gets a system-defined color that has an ARGB value of 0xFFFAF0E6. This field is constant.
Definition: color.h:291
uint8_t r() const
Gets the red component value of this xtd::drawing::color class.
Definition: color.h:608
static color dark(const color &color, double weight)
Returns a darker version of the specified color.
Definition: color.h:643
static const xtd::drawing::color aquamarine
Gets a system-defined color that has an ARGB value of 0xFF7FFFD4. This field is constant.
Definition: color.h:66
static const xtd::drawing::color light_gray
Gets a system-defined color that has an ARGB value of 0xFFD3D3D3. This field is constant.
Definition: color.h:258
static const xtd::drawing::color ivory
Gets a system-defined color that has an ARGB value of 0xFFFFFFF0. This field is constant.
Definition: color.h:228
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:44
static const xtd::drawing::color yellow_green
Gets a system-defined color that has an ARGB value of 0xFF9ACD32. This field is constant.
Definition: color.h:477
static const xtd::drawing::color medium_sea_green
Gets a system-defined color that has an ARGB value of 0xFF3CB371. This field is constant.
Definition: color.h:312
static const xtd::drawing::color transparent
Gets a system-defined color that has an ARGB value of 0x00FFFFFF. This field is constant.
Definition: color.h:54
static const xtd::drawing::color dark_salmon
Gets a system-defined color that has an ARGB value of 0xFFE9967A. This field is constant.
Definition: color.h:153
static const xtd::drawing::color cornflower_blue
Gets a system-defined color that has an ARGB value of 0xFF6495ED. This field is constant.
Definition: color.h:108
static const xtd::drawing::color medium_spring_green
Gets a system-defined color that has an ARGB value of 0xFF00FA9A. This field is constant.
Definition: color.h:318
static const xtd::drawing::color forest_green
Gets a system-defined color that has an ARGB value of 0xFF228B22. This field is constant.
Definition: color.h:189
static const xtd::drawing::color teal
Gets a system-defined color that has an ARGB value of 0xFF008080. This field is constant.
Definition: color.h:450
static const xtd::drawing::color blue
Gets a system-defined color that has an ARGB value of 0xFF0000FF. This field is constant.
Definition: color.h:84
static const xtd::drawing::color fuchsia
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
Definition: color.h:192
static const xtd::drawing::color navy
Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant.
Definition: color.h:342
bool is_dark() const
Gets a value indicating wheter this xtd::drawing::color structure is dark color.
Definition: color.h:564
static const xtd::drawing::color gainsboro
Gets a system-defined color that has an ARGB value of 0xFFDCDCDC. This field is constant.
Definition: color.h:195
static const xtd::drawing::color tan
Gets a system-defined color that has an ARGB value of 0xFFD2B48C. This field is constant.
Definition: color.h:447
static const xtd::drawing::color beige
Gets a system-defined color that has an ARGB value of 0xFFF5F5DC. This field is constant.
Definition: color.h:72
static const xtd::drawing::color medium_orchid
Gets a system-defined color that has an ARGB value of 0xFFBA55D3. This field is constant.
Definition: color.h:306
static const xtd::drawing::color light_pink
Gets a system-defined color that has an ARGB value of 0xFFFFB6C1. This field is constant.
Definition: color.h:264
static const xtd::drawing::color dark_goldenrod
Gets a system-defined color that has an ARGB value of 0xFFB8860B. This field is constant.
Definition: color.h:126
static const xtd::drawing::color medium_slate_blue
Gets a system-defined color that has an ARGB value of 0xFF7B68EE. This field is constant.
Definition: color.h:315
static const xtd::drawing::color dark_orchid
Gets a system-defined color that has an ARGB value of 0xFF9932CC. This field is constant.
Definition: color.h:147
Contains xtd::drawing::known_color enum class.
bool is_named_color() const
Gets a value indicating whether this xtd::drawing::color structure is a named color or a member of th...
Definition: color.h:581
static const xtd::drawing::color snow
Gets a system-defined color that has an ARGB value of 0xFFFFFAFA. This field is constant.
Definition: color.h:438
static const xtd::drawing::color slate_gray
Gets a system-defined color that has an ARGB value of 0xFF708090. This field is constant.
Definition: color.h:435
static const xtd::drawing::color cornsilk
Gets a system-defined color that has an ARGB value of 0xFFFFF8DC. This field is constant.
Definition: color.h:111
static const xtd::drawing::color khaki
Gets a system-defined color that has an ARGB value of 0xFFF0E68C. This field is constant.
Definition: color.h:231
static const xtd::drawing::color sea_green
Gets a system-defined color that has an ARGB value of 0xFF2E8B57. This field is constant.
Definition: color.h:417
static const xtd::drawing::color powder_blue
Gets a system-defined color that has an ARGB value of 0xFFB0E0E6. This field is constant.
Definition: color.h:390
static const xtd::drawing::color misty_rose
Gets a system-defined color that has an ARGB value of 0xFFFFE4E1. This field is constant.
Definition: color.h:333
Contains xtd::ustring class.
static const xtd::drawing::color yellow
Gets a system-defined color that has an ARGB value of 0xFFFFFF00. This field is constant.
Definition: color.h:474
bool is_light() const
Gets a value indicating wheter this xtd::drawing::color structure is light color. ...
Definition: color.h:577
static const xtd::drawing::color light_cyan
Gets a system-defined color that has an ARGB value of 0xFFE0FFFF. This field is constant.
Definition: color.h:252
static const xtd::drawing::color lavender_blush
Gets a system-defined color that has an ARGB value of 0xFFFFF0F5. This field is constant.
Definition: color.h:237
static const xtd::drawing::color orange_red
Gets a system-defined color that has an ARGB value of 0xFFFF4500. This field is constant.
Definition: color.h:357
static const xtd::drawing::color chocolate
Gets a system-defined color that has an ARGB value of 0xFFD2691E. This field is constant.
Definition: color.h:102
known_color
Specifies the known system colors.
Definition: known_color.h:18
static const xtd::drawing::color deep_pink
Gets a system-defined color that has an ARGB value of 0xFFFF1493. This field is constant.
Definition: color.h:171
static const xtd::drawing::color blanched_almond
Gets a system-defined color that has an ARGB value of 0xFFFFEBCD. This field is constant.
Definition: color.h:81
static const xtd::drawing::color dark_orange
Gets a system-defined color that has an ARGB value of 0xFFFF8C00. This field is constant.
Definition: color.h:144
Contains xtd::object class.
static const xtd::drawing::color tomato
Gets a system-defined color that has an ARGB value of 0xFFFF6347. This field is constant.
Definition: color.h:456
static const xtd::drawing::color navajo_white
Gets a system-defined color that has an ARGB value of 0xFFFFDEAD. This field is constant.
Definition: color.h:339
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:30
static const xtd::drawing::color dodger_blue
Gets a system-defined color that has an ARGB value of 0xFF1E90FF. This field is constant.
Definition: color.h:180
static const xtd::drawing::color plum
Gets a system-defined color that has an ARGB value of 0xFFDDA0DD. This field is constant.
Definition: color.h:387
static color average(const color &color1, const color &color2, double weight)
Returns the weighted average color between the two given colors.
Definition: color.h:638
static const xtd::drawing::color sky_blue
Gets a system-defined color that has an ARGB value of 0xFF87CEEB. This field is constant.
Definition: color.h:429
static const xtd::drawing::color pink
Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant.
Definition: color.h:384
static const xtd::drawing::color ghost_white
Gets a system-defined color that has an ARGB value of 0xFFF8F8FF. This field is constant.
Definition: color.h:198
static const xtd::drawing::color coral
Gets a system-defined color that has an ARGB value of 0xFFFF7F50. This field is constant.
Definition: color.h:105
static const xtd::drawing::color lawn_green
Gets a system-defined color that has an ARGB value of 0xFF7CFC00. This field is constant.
Definition: color.h:240
static const xtd::drawing::color olive_drab
Gets a system-defined color that has an ARGB value of 0xFF6B8E23. This field is constant.
Definition: color.h:351
static const xtd::drawing::color spring_green
Gets a system-defined color that has an ARGB value of 0xFF00FF7F. This field is constant.
Definition: color.h:441
static const xtd::drawing::color peru
Gets a system-defined color that has an ARGB value of 0xFFCD853F. This field is constant.
Definition: color.h:381
static const xtd::drawing::color light_steel_blue
Gets a system-defined color that has an ARGB value of 0xFFB0C4DE. This field is constant.
Definition: color.h:279
static const xtd::drawing::color dark_magenta
Gets a system-defined color that has an ARGB value of 0xFF8B008B. This field is constant.
Definition: color.h:138
bool is_known_color() const
Gets a value indicating whether this xtd::drawing::color structure is a predefined color...
Definition: color.h:573
static const xtd::drawing::color orchid
Gets a system-defined color that has an ARGB value of 0xFFDA70D6. This field is constant.
Definition: color.h:360
static const xtd::drawing::color bisque
Gets a system-defined color that has an ARGB value of 0xFFFFE4C4. This field is constant.
Definition: color.h:75
static const xtd::drawing::color indian_red
Gets a system-defined color that has an ARGB value of 0xFFCD5C5C. This field is constant.
Definition: color.h:222
static const xtd::drawing::color papaya_whip
Gets a system-defined color that has an ARGB value of 0xFFFFEFD5. This field is constant.
Definition: color.h:375
static const xtd::drawing::color medium_purple
Gets a system-defined color that has an ARGB value of 0xFF9370DB. This field is constant.
Definition: color.h:309
static ustring format(const ustring &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
Definition: ustring.h:706
static const xtd::drawing::color pale_turquoise
Gets a system-defined color that has an ARGB value of 0xFFAFEEEE. This field is constant.
Definition: color.h:369
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition: color.h:468
static const xtd::drawing::color goldenrod
Gets a system-defined color that has an ARGB value of 0xFFDAA520. This field is constant.
Definition: color.h:204
static const xtd::drawing::color turquoise
Gets a system-defined color that has an ARGB value of 0xFF40E0D0. This field is constant.
Definition: color.h:459
static const xtd::drawing::color dark_turquoise
Gets a system-defined color that has an ARGB value of 0xFF00CED1. This field is constant.
Definition: color.h:165
static const xtd::drawing::color honeydew
Gets a system-defined color that has an ARGB value of 0xFFF0FFF0. This field is constant.
Definition: color.h:216
static const xtd::drawing::color dark_khaki
Gets a system-defined color that has an ARGB value of 0xFFBDB76B. This field is constant.
Definition: color.h:135
static const xtd::drawing::color chartreuse
Gets a system-defined color that has an ARGB value of 0xFF7FFF00. This field is constant.
Definition: color.h:99
static const xtd::drawing::color medium_aquamarine
Gets a system-defined color that has an ARGB value of 0xFF66CDAA. This field is constant.
Definition: color.h:300
static const xtd::drawing::color blue_violet
Gets a system-defined color that has an ARGB value of 0xFF8A2BE2. This field is constant.
Definition: color.h:87
static const xtd::drawing::color sandy_brown
Gets a system-defined color that has an ARGB value of 0xFFF4A460. This field is constant.
Definition: color.h:414
static const xtd::drawing::color peach_puff
Gets a system-defined color that has an ARGB value of 0xFFFFDAB9. This field is constant.
Definition: color.h:378
bool is_empty() const
Specifies whether this xtd::drawing::color class is uninitialized.
Definition: color.h:568
static const xtd::drawing::color medium_turquoise
Gets a system-defined color that has an ARGB value of 0xFF48D1CC. This field is constant.
Definition: color.h:321
static const xtd::drawing::color slate_blue
Gets a system-defined color that has an ARGB value of 0xFF6A5ACD. This field is constant.
Definition: color.h:432
static const xtd::drawing::color indigo
Gets a system-defined color that has an ARGB value of 0xFF4B0082. This field is constant.
Definition: color.h:225
static xtd::drawing::color parse(const xtd::ustring &color)
Creates a xtd::drawing::color class from the specified name.
static const xtd::drawing::color light_sea_green
Gets a system-defined color that has an ARGB value of 0xFF20B2AA. This field is constant.
Definition: color.h:270
static const xtd::drawing::color cyan
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
Definition: color.h:117
static const xtd::drawing::color hot_pink
Gets a system-defined color that has an ARGB value of 0xFFFF69B4. This field is constant.
Definition: color.h:219
xtd::ustring name() const
Gets the name of this xtd::drawing::color.
Definition: color.h:589
static const xtd::drawing::color dark_cyan
Gets a system-defined color that has an ARGB value of 0xFF008B8B. This field is constant.
Definition: color.h:123
static const xtd::drawing::color dark_olive_green
Gets a system-defined color that has an ARGB value of 0xFF556B2F. This field is constant.
Definition: color.h:141
static color dark(const color &color)
Returns a darker version of the specified color.
Definition: color.h:648
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition: color.h:78
static const xtd::drawing::color moccasin
Gets a system-defined color that has an ARGB value of 0xFFFFE4B5. This field is constant.
Definition: color.h:336
static const xtd::drawing::color gold
Gets a system-defined color that has an ARGB value of 0xFFFFD700. This field is constant.
Definition: color.h:201