11 #include "../drawing_export.h" 482 static constexpr
double lightness_threshold = 0.5;
559 intptr handle() const noexcept;
563 bool is_dark() const noexcept;
567 bool is_empty() const noexcept;
572 bool is_known_color() const noexcept;
576 bool is_light() const noexcept;
580 bool is_named_color() const noexcept;
584 bool is_system_color() const noexcept;
624 static
color average(const
color& color1, const
color& color2,
double weight,
bool average_alpha) noexcept;
637 static
color average(const
color& color1, const
color& color2,
double weight) noexcept;
647 static color dark(const color& color) noexcept;
649 bool equals(const color& value) const noexcept override;
683 static
xtd::drawing::color from_argb(
uint32 argb) noexcept;
748 static
xtd::drawing::color from_argb(
xtd::
byte alpha, const
xtd::drawing::color& base_color) noexcept;
856 static
xtd::drawing::color from_handle(
intptr handle) noexcept;
862 static
xtd::drawing::color from_hsb(
float hue,
float saturation,
float brightness) noexcept;
868 static
xtd::drawing::color from_hsl(
float hue,
float saturation,
float lightness) noexcept;
944 static
xtd::drawing::color from_name(const
xtd::
ustring& name) noexcept;
995 float get_brightness() const noexcept;
1046 float get_hue() const noexcept;
1050 float get_lightness() const noexcept;
1101 float get_saturation() const noexcept;
1106 static color light(const color& color,
double weight) noexcept;
1111 static color light(const color& color) noexcept;
1173 uint32 to_argb() const noexcept;
1234 explicit color(
uint32 argb);
1235 explicit color(
intptr handle);
1236 color(const color& color, const
xtd::drawing::
known_color& know_color);
1251 inline drawing::color
parse<drawing::color>(const std::
string& str) {
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:184
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:400
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:355
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:304
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:406
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:325
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:412
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:295
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
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:409
Contains xtd::iequatable interface.
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:58
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:160
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:121
value_t parse(const std::string &str)
Convert a string into a type.
Definition: parse.h:23
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:163
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:463
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:187
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:247
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:403
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:268
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:298
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:130
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:277
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:70
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:91
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:466
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:274
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:244
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:151
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:346
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:283
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:289
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:250
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:427
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:286
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:51
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:97
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:397
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:64
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:214
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:424
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:454
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:349
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:115
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:235
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:394
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:61
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:262
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:175
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:364
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:367
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:169
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:133
static xtd::drawing::color parse(const xtd::ustring &color) noexcept
Creates a xtd::drawing::color class from the specified name.
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:472
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:373
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:331
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:328
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
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:211
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:178
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:1063
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:208
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:94
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:157
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:421
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:445
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:256
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:292
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:67
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:259
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:229
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
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:478
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:313
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:55
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:154
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:109
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:319
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:190
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:451
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:85
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:193
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:343
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
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:196
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:448
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:73
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:307
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:265
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:127
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:316
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:148
Contains xtd::drawing::known_color enum class.
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:439
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:436
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:112
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:232
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:418
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:391
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:334
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:475
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:253
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:238
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:358
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:103
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:172
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:82
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:145
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:457
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:340
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
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:181
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:388
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:430
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:385
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:199
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:106
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:241
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:352
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:442
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:382
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:280
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:139
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:361
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:76
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:223
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:376
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:310
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:370
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:469
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:205
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:460
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:166
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:217
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:136
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:100
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:301
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:88
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:415
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:379
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
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:322
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:433
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
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:226
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:271
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:118
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:220
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:124
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:142
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:79
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:337
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:202