xtd 1.0.0
Loading...
Searching...
No Matches
color.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "argb.hpp"
7#include "cmyk.hpp"
8#include "known_color.hpp"
9#include "hsb.hpp"
10#include "hsl.hpp"
11#include "hsv.hpp"
12#include "yuv.hpp"
13#include <xtd/iequatable>
14#include <xtd/object>
15#include <xtd/string>
16
18namespace xtd {
20 namespace drawing {
22 class image;
24
52 class drawing_export_ color : public xtd::object, public xtd::iequatable<color> {
53 public:
55
59
63
66
69
72
75
78
81
84
87
90
93
96
99
102
105
108
111
114
117
120
123
126
129
132
135
138
141
144
147
150
153
156
159
162
165
168
171
174
177
180
183
186
189
192
195
198
201
204
207
210
213
216
219
222
225
228
231
234
237
240
243
246
249
252
255
258
261
264
267
270
273
276
279
282
285
288
291
294
297
300
303
306
309
312
315
318
321
324
327
330
333
336
339
342
345
348
351
354
357
360
363
366
369
372
375
378
381
384
387
390
393
396
399
402
405
408
411
414
417
420
423
426
429
432
435
438
441
444
447
450
453
456
459
462
465
468
471
474
477
480
483
486
489 static constexpr double lightness_threshold = 0.5;
491
493
496 color() = default;
498
500 color(const color& color) = default;
501 color& operator =(const color& color) = default;
503
505
524 [[nodiscard]] auto a() const noexcept -> xtd::byte;
525
543 [[nodiscard]] auto b() const noexcept -> xtd::byte;
544
562 [[nodiscard]] auto g() const noexcept -> xtd::byte;
563
566 [[nodiscard]] auto handle() const noexcept -> xtd::intptr;
567
570 [[nodiscard]] auto is_dark() const noexcept -> bool;
571
574 [[nodiscard]] auto is_empty() const noexcept -> bool;
575
579 [[nodiscard]] auto is_known_color() const noexcept -> bool;
580
583 [[nodiscard]] auto is_light() const noexcept -> bool;
584
587 [[nodiscard]] auto is_named_color() const noexcept -> bool;
588
591 [[nodiscard]] bool is_system_color() const noexcept;
592
595 [[nodiscard]] auto name() const noexcept -> xtd::string;
596
614 [[nodiscard]] auto r() const noexcept -> xtd::byte;
616
618
623 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
627 [[nodiscard]] auto equals(const color& other) const noexcept -> bool override;
628
631 [[nodiscard]] auto get_brightness() const noexcept -> float;
632
635 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize override;
636
639 [[nodiscard]] auto get_hue() const noexcept -> float;
640
643 [[nodiscard]] auto get_saturation() const noexcept -> float;
644
700 [[nodiscard]] auto to_argb() const noexcept -> xtd::drawing::argb;
701
704 [[nodiscard]] auto to_cmyk() const noexcept -> xtd::drawing::cmyk;
705
709 [[nodiscard]] auto to_known_color() const noexcept -> xtd::drawing::known_color;
710
713 [[nodiscard]] auto to_hsb() const noexcept -> xtd::drawing::hsb;
714
717 [[nodiscard]] auto to_hsl() const noexcept -> xtd::drawing::hsl;
718
721 [[nodiscard]] auto to_hsv() const noexcept -> xtd::drawing::hsv;
722
772 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
773
777 [[nodiscard]] auto to_uint32() const noexcept -> xtd::uint32;
778
781 [[nodiscard]] auto to_yuv() const noexcept -> xtd::drawing::yuv;
783
785
789 [[nodiscard]] operator xtd::drawing::argb() const noexcept;
792 [[nodiscard]] operator xtd::drawing::cmyk() const noexcept;
795 [[nodiscard]] operator xtd::drawing::hsb() const noexcept;
798 [[nodiscard]] operator xtd::drawing::hsl() const noexcept;
801 [[nodiscard]] operator xtd::drawing::hsv() const noexcept;
804 [[nodiscard]] operator xtd::drawing::yuv() const noexcept;
807 [[nodiscard]] operator xtd::uint32() const noexcept;
809
811
818 [[nodiscard]] static auto dark(const color& color, double percent) noexcept -> xtd::drawing::color;
819
852
853 [[nodiscard]] static auto from_argb(uint32 argb) noexcept -> xtd::drawing::color;
917 [[nodiscard]] static auto from_argb(xtd::byte alpha, const xtd::drawing::color& base_color) noexcept -> xtd::drawing::color;
952 [[nodiscard]] static auto from_argb(xtd::byte alpha, xtd::byte red, xtd::byte green, xtd::byte blue) noexcept -> xtd::drawing::color;
1017 [[nodiscard]] static auto from_argb(xtd::byte red, xtd::byte green, xtd::byte blue) noexcept -> xtd::drawing::color;
1021 [[nodiscard]] static auto from_argb(const xtd::drawing::argb& argb) noexcept -> xtd::drawing::color;
1022
1029 [[nodiscard]] static auto from_cmyk(float cyan, float magenta, float yellow, float black) noexcept -> xtd::drawing::color;
1033 [[nodiscard]] static auto from_cmyk(const xtd::drawing::cmyk& cmyk) noexcept -> xtd::drawing::color;
1034
1039 [[nodiscard]] static auto from_handle(intptr handle) noexcept -> xtd::drawing::color;
1040
1046 [[nodiscard]] static auto from_hsb(float hue, float saturation, float brightness) noexcept -> xtd::drawing::color;
1050 [[nodiscard]] static auto from_hsb(const xtd::drawing::hsb& hsb) noexcept -> xtd::drawing::color;
1051
1057 [[nodiscard]] static auto from_hsl(float hue, float saturation, float lightness) noexcept -> xtd::drawing::color;
1061 [[nodiscard]] static auto from_hsl(const xtd::drawing::hsl& hsl) noexcept -> xtd::drawing::color;
1062
1068 [[nodiscard]] static auto from_hsv(float hue, float saturation, float value) noexcept -> xtd::drawing::color;
1072 [[nodiscard]] static auto from_hsv(const xtd::drawing::hsv& hsv) noexcept -> xtd::drawing::color;
1073
1128 [[nodiscard]] static auto from_known_color(xtd::drawing::known_color color) -> xtd::drawing::color;
1129
1148 [[nodiscard]] static auto from_name(const xtd::string& name) noexcept -> xtd::drawing::color;
1149
1154 [[nodiscard]] static auto from_uint32(xtd::uint32 argb) noexcept -> xtd::drawing::color;
1155
1161 [[nodiscard]] static auto from_yuv(float y, float u, float v) noexcept -> xtd::drawing::color;
1165 [[nodiscard]] static auto from_yuv(const xtd::drawing::yuv& yuv) noexcept -> xtd::drawing::color;
1166
1170 [[nodiscard]] static auto parse(const xtd::string& color) noexcept -> xtd::drawing::color;
1172
1174
1179 [[deprecated("Replaced by xtd::drawing::color::to_hsl - Will be removed in version 1.2.0.")]]
1180 [[nodiscard]] auto get_lightness() const noexcept -> float;
1181
1185 [[deprecated("Replaced by xtd::drawing::color::to_yuv - Will be removed in version 1.2.0.")]]
1186 [[nodiscard]] auto get_u() const noexcept -> float;
1187
1191 [[deprecated("Replaced by xtd::drawing::color::to_hsv - Will be removed in version 1.2.0.")]]
1192 [[nodiscard]] auto get_value() const noexcept -> float;
1193
1197 [[deprecated("Replaced by xtd::drawing::color::to_yuv - Will be removed in version 1.2.0.")]]
1198 [[nodiscard]] auto get_v() const noexcept -> float;
1199
1203 [[deprecated("Replaced by xtd::drawing::color::to_yuv - Will be removed in version 1.2.0.")]]
1204 [[nodiscard]] auto get_y() const noexcept -> float;
1206
1208
1222 [[deprecated("Replaced by xtd::drawing::color_converter::average - Will be removed in version 1.2.0.")]]
1223 [[nodiscard]] static auto average(const color& color1, const color& color2, double weight) noexcept -> xtd::drawing::color;
1236 [[deprecated("Replaced by xtd::drawing::color_converter::average - Will be removed in version 1.2.0.")]]
1237 [[nodiscard]] static auto average(const color& color1, const color& color2, double weight, bool average_alpha) noexcept -> xtd::drawing::color;
1238
1243 [[deprecated("Replaced by xtd::drawing::color_converter::dark - Will be removed in version 1.2.0.")]]
1244 [[nodiscard]] static auto dark(const color& color) noexcept -> xtd::drawing::color;
1249 [[deprecated("Replaced by xtd::drawing::color_converter::light - Will be removed in version 1.2.0.")]]
1250 [[nodiscard]] static auto light(const color& color) noexcept -> xtd::drawing::color;
1257 [[deprecated("Replaced by xtd::drawing::color_converter::light - Will be removed in version 1.2.0.")]]
1258 [[nodiscard]] static auto light(const color& color, double percent) noexcept -> xtd::drawing::color;
1260
1261 private:
1262 static constexpr xtd::drawing::known_color start_know_system_colors_range = static_cast<xtd::drawing::known_color>(0xFF01);
1263 explicit color(uint32 argb);
1264 explicit color(intptr handle);
1265 color(const color& color, const xtd::drawing::known_color& know_color);
1266
1267 uint32 argb_ = 0;
1268 bool empty_ = true;
1269 intptr handle_ = 0;
1270 xtd::drawing::known_color known_color_ = static_cast<xtd::drawing::known_color>(0);
1271 xtd::string name_;
1272 };
1273 }
1274
1279 template<>
1280 inline drawing::color parse<drawing::color>(const std::string& str) {
1281 return drawing::color::parse(str);
1282 }
1283}
1284
1285#include "../literals/color.hpp"
Contains xtd::drawing::argb struct.
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:52
static auto dark(const color &color, double percent) noexcept -> xtd::drawing::color
Creates a new darker color of the specified color with specified percent factor.
operator xtd::drawing::hsl() const noexcept
Converts to xtd::drawing::hsl operator of this xtd::drawing::color class.
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.hpp:329
operator xtd::uint32() const noexcept
Gets the 32-bit ARGB value of this xtd::drawing::color class.
operator xtd::drawing::hsb() const noexcept
Converts to xtd::drawing::hsb operator of this xtd::drawing::color class.
auto to_uint32() const noexcept -> xtd::uint32
Gets the 32-bit ARGB value of this xtd::drawing::color class.
auto r() const noexcept -> xtd::byte
Gets the red component value of this xtd::drawing::color class.
static const xtd::drawing::color chartreuse
Gets a system-defined color that has an ARGB value of 0xFF7FFF00. This field is constant.
Definition color.hpp:107
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.hpp:428
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.hpp:284
static constexpr double lightness_threshold
Represent the lightness threshold.
Definition color.hpp:489
static const xtd::drawing::color wheat
Gets a system-defined color that has an ARGB value of 0xFFF5DEB3. This field is constant.
Definition color.hpp:473
static const xtd::drawing::color peru
Gets a system-defined color that has an ARGB value of 0xFFCD853F. This field is constant.
Definition color.hpp:389
color()=default
Initialize a new instance of xtd::drawing::color class.
static auto from_handle(intptr handle) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from native handle.
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.hpp:131
static auto from_hsb(float hue, float saturation, float brightness) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the three HSV component (hue, saturation,...
auto g() const noexcept -> xtd::byte
Gets the green component value of this xtd::drawing::color class.
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.hpp:134
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
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.hpp:437
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.hpp:65
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.hpp:449
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.hpp:365
static auto from_argb(uint32 argb) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from a 32-bit ARGB value.
static const xtd::drawing::color sienna
Gets a system-defined color that has an ARGB value of 0xFFA0522D. This field is constant.
Definition color.hpp:431
static const xtd::drawing::color transparent
Gets a system-defined color that has an ARGB value of 0x00000000. This field is constant.
Definition color.hpp:62
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
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.hpp:323
static const xtd::drawing::color thistle
Gets a system-defined color that has an ARGB value of 0xFFD8BFD8. This field is constant.
Definition color.hpp:461
static const xtd::drawing::color yellow
Gets a system-defined color that has an ARGB value of 0xFFFFFF00. This field is constant.
Definition color.hpp:482
operator xtd::drawing::hsv() const noexcept
Converts to xtd::drawing::hsv operator of this xtd::drawing::color class.
static const xtd::drawing::color teal
Gets a system-defined color that has an ARGB value of 0xFF008080. This field is constant.
Definition color.hpp:458
static const xtd::drawing::color plum
Gets a system-defined color that has an ARGB value of 0xFFDDA0DD. This field is constant.
Definition color.hpp:395
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.hpp:425
static const xtd::drawing::color gray
Gets a system-defined color that has an ARGB value of 0xFF808080. This field is constant.
Definition color.hpp:215
static const xtd::drawing::color coral
Gets a system-defined color that has an ARGB value of 0xFFFF7F50. This field is constant.
Definition color.hpp:113
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.hpp:68
auto get_hue() const noexcept -> float
Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this xtd::drawing::color structur...
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.hpp:440
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition color.hpp:476
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.hpp:290
auto handle() const noexcept -> xtd::intptr
Gets the native handle of this xtd::drawing::color class.
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.hpp:116
auto name() const noexcept -> xtd::string
Gets the name of this xtd::drawing::color.
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.hpp:254
auto a() const noexcept -> xtd::byte
Gets the alpha component value of this xtd::drawing::color class.
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.hpp:221
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.hpp:308
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.hpp:266
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.hpp:374
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.hpp:485
auto b() const noexcept -> xtd::byte
Gets the blue component value of this xtd::drawing::color class.
static auto from_cmyk(float cyan, float magenta, float yellow, float black) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the four CMYK component (cyan, magenta, yellow,...
auto to_string() const noexcept -> xtd::string override
Creates a human-readable string that represents this color class.
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.hpp:128
static const xtd::drawing::color gold
Gets a system-defined color that has an ARGB value of 0xFFFFD700. This field is constant.
Definition color.hpp:209
static const xtd::drawing::color goldenrod
Gets a system-defined color that has an ARGB value of 0xFFDAA520. This field is constant.
Definition color.hpp:212
static const xtd::drawing::color moccasin
Gets a system-defined color that has an ARGB value of 0xFFFFE4B5. This field is constant.
Definition color.hpp:344
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.hpp:314
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.hpp:311
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.hpp:404
auto is_empty() const noexcept -> bool
Specifies whether this xtd::drawing::color class is uninitialized.
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.hpp:197
auto to_hsl() const noexcept -> xtd::drawing::hsl
Gets the xtd::drawing::hsl value of this xtd::drawing::color class.
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.hpp:413
static const xtd::drawing::color aqua
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
Definition color.hpp:71
static const xtd::drawing::color lime
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant.
Definition color.hpp:293
static auto from_hsv(float hue, float saturation, float value) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the three HSV component (hue, saturation,...
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.hpp:164
static const xtd::drawing::color green
Gets a system-defined color that has an ARGB value of 0xFF008000. This field is constant.
Definition color.hpp:218
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.hpp:179
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.hpp:167
static const xtd::drawing::color bisque
Gets a system-defined color that has an ARGB value of 0xFFFFE4C4. This field is constant.
Definition color.hpp:83
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.hpp:158
operator xtd::drawing::cmyk() const noexcept
Converts to xtd::drawing::cmyk operator of this xtd::drawing::color class.
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.hpp:287
auto to_known_color() const noexcept -> xtd::drawing::known_color
Gets the xtd::drawing::known_color value of this xtd::drawing::color class.
static const xtd::drawing::color beige
Gets a system-defined color that has an ARGB value of 0xFFF5F5DC. This field is constant.
Definition color.hpp:80
static const xtd::drawing::color violet
Gets a system-defined color that has an ARGB value of 0xFFEE82EE. This field is constant.
Definition color.hpp:470
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.hpp:263
static auto parse(const xtd::string &color) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the specified name.
static auto from_name(const xtd::string &name) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the specified name of a predefined color.
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.hpp:443
auto get_value() const noexcept -> float
Gets the hue-saturation-value (HSB) value value for this xtd::drawing::color structure.
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.hpp:278
auto is_named_color() const noexcept -> bool
Gets a value indicating whether this xtd::drawing::color structure is a named color or a member of th...
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.hpp:176
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.hpp:269
auto get_brightness() const noexcept -> float
Gets the hue-saturation-brightness (HSB) brightness value for this xtd::drawing::color structure.
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.hpp:332
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.hpp:317
auto get_y() const noexcept -> float
Gets the Y'UV color model Y (luma) value for this xtd::drawing::color structure.
static const xtd::drawing::color salmon
Gets a system-defined color that has an ARGB value of 0xFFFA8072. This field is constant.
Definition color.hpp:419
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.hpp:149
static const xtd::drawing::color tomato
Gets a system-defined color that has an ARGB value of 0xFFFF6347. This field is constant.
Definition color.hpp:464
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.hpp:380
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition color.hpp:407
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.hpp:416
auto to_hsb() const noexcept -> xtd::drawing::hsb
Gets the xtd::drawing::hsb value of this xtd::drawing::color class.
static const xtd::drawing::color firebrick
Gets a system-defined color that has an ARGB value of 0xFFB22222. This field is constant.
Definition color.hpp:191
static const xtd::drawing::color khaki
Gets a system-defined color that has an ARGB value of 0xFFF0E68C. This field is constant.
Definition color.hpp:239
auto to_yuv() const noexcept -> xtd::drawing::yuv
Gets the Y'UV color model of this xtd::drawing::color class.
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.hpp:95
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.hpp:182
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.hpp:326
auto to_cmyk() const noexcept -> xtd::drawing::cmyk
Gets the xtd::drawing::cmyk value of this xtd::drawing::color 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.hpp:446
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.hpp:359
static const xtd::drawing::color olive
Gets a system-defined color that has an ARGB value of 0xFF808000. This field is constant.
Definition color.hpp:356
static const xtd::drawing::color crimson
Gets a system-defined color that has an ARGB value of 0xFFDC143C. This field is constant.
Definition color.hpp:122
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.hpp:245
static const xtd::drawing::color maroon
Gets a system-defined color that has an ARGB value of 0xFF800000. This field is constant.
Definition color.hpp:305
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.hpp:248
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.hpp:335
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.hpp:152
static const xtd::drawing::color orchid
Gets a system-defined color that has an ARGB value of 0xFFDA70D6. This field is constant.
Definition color.hpp:368
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.hpp:281
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.hpp:377
static const xtd::drawing::color blue
Gets a system-defined color that has an ARGB value of 0xFF0000FF. This field is constant.
Definition color.hpp:92
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.hpp:398
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.hpp:155
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.hpp:260
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.hpp:383
operator xtd::drawing::yuv() const noexcept
Converts to xtd::drawing::yuv operator of this xtd::drawing::color class.
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.hpp:140
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.hpp:257
static const xtd::drawing::color fuchsia
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
Definition color.hpp:200
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.hpp:173
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.hpp:227
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.hpp:251
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.hpp:320
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.hpp:353
static auto from_yuv(float y, float u, float v) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the three YUV components (luma and choma) values.
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.hpp:146
static const xtd::drawing::color lavender
Gets a system-defined color that has an ARGB value of 0xFFE6E6FA. This field is constant.
Definition color.hpp:242
static auto light(const color &color) noexcept -> xtd::drawing::color
Creates a new lighter color of the specified color with 33% factor.
static const xtd::drawing::color chocolate
Gets a system-defined color that has an ARGB value of 0xFFD2691E. This field is constant.
Definition color.hpp:110
auto get_u() const noexcept -> float
Gets the Y'UV color model U (chroma) value for this xtd::drawing::color structure.
static auto average(const color &color1, const color &color2, double weight) noexcept -> xtd::drawing::color
Returns the weighted average color between the two given colors.
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.hpp:143
static const xtd::drawing::color navy
Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant.
Definition color.hpp:350
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.hpp:422
static const xtd::drawing::color orange
Gets a system-defined color that has an ARGB value of 0xFFFFA500. This field is constant.
Definition color.hpp:362
static const xtd::drawing::color gainsboro
Gets a system-defined color that has an ARGB value of 0xFFDCDCDC. This field is constant.
Definition color.hpp:203
auto to_argb() const noexcept -> xtd::drawing::argb
Gets the 32-bit ARGB value of this xtd::drawing::color class.
static const xtd::drawing::color brown
Gets a system-defined color that has an ARGB value of 0xFFA52A2A. This field is constant.
Definition color.hpp:98
static const xtd::drawing::color purple
Gets a system-defined color that has an ARGB value of 0xFF800080. This field is constant.
Definition color.hpp:401
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.hpp:296
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.hpp:185
static auto from_known_color(xtd::drawing::known_color color) -> xtd::drawing::color
Creates a xtd::drawing::color class from the four ARGB component (alpha, red, green,...
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.hpp:161
auto is_dark() const noexcept -> bool
Gets a value indicating wheter this xtd::drawing::color structure is dark color.
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.hpp:347
static const xtd::drawing::color azure
Gets a system-defined color that has an ARGB value of 0xFFF0FFFF. This field is constant.
Definition color.hpp:77
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.hpp:386
auto is_known_color() const noexcept -> bool
Gets a value indicating whether this xtd::drawing::color structure is a predefined color....
auto to_hsv() const noexcept -> xtd::drawing::hsv
Gets the xtd::drawing::hsv value of this xtd::drawing::color class.
static const xtd::drawing::color pink
Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant.
Definition color.hpp:392
static const xtd::drawing::color cyan
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
Definition color.hpp:125
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition color.hpp:86
static const xtd::drawing::color empty
Represents a color that is null.
Definition color.hpp:58
static const xtd::drawing::color aquamarine
Gets a system-defined color that has an ARGB value of 0xFF7FFFD4. This field is constant.
Definition color.hpp:74
static auto from_hsl(float hue, float saturation, float lightness) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from the three HSL component (hue, saturation,...
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.hpp:101
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.hpp:410
static const xtd::drawing::color ivory
Gets a system-defined color that has an ARGB value of 0xFFFFFFF0. This field is constant.
Definition color.hpp:236
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.hpp:275
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.hpp:371
auto get_v() const noexcept -> float
Gets the Y'UV color model V (chroma) value for this xtd::drawing::color structure.
bool is_system_color() const noexcept
Gets a value indicating whether this xtd::drawing::color structure is a system color....
static const xtd::drawing::color indigo
Gets a system-defined color that has an ARGB value of 0xFF4B0082. This field is constant.
Definition color.hpp:233
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.hpp:452
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.hpp:230
auto get_lightness() const noexcept -> float
Gets the hue-saturation-lightness (HSL) lightness value for this xtd::drawing::color structure.
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.hpp:479
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.hpp:272
auto get_saturation() const noexcept -> float
Gets the hue-saturation-brightness (HSB) saturation value for this xtd::drawing::color structure.
static const xtd::drawing::color cornsilk
Gets a system-defined color that has an ARGB value of 0xFFFFF8DC. This field is constant.
Definition color.hpp:119
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.hpp:338
static const xtd::drawing::color tan
Gets a system-defined color that has an ARGB value of 0xFFD2B48C. This field is constant.
Definition color.hpp:455
static const xtd::drawing::color linen
Gets a system-defined color that has an ARGB value of 0xFFFAF0E6. This field is constant.
Definition color.hpp:299
operator xtd::drawing::argb() const noexcept
Converts to xtd::drawing::argb operator of this xtd::drawing::color class.
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.hpp:104
auto is_light() const noexcept -> bool
Gets a value indicating wheter this xtd::drawing::color structure is light color.
static const xtd::drawing::color magenta
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
Definition color.hpp:302
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.hpp:194
static auto from_uint32(xtd::uint32 argb) noexcept -> xtd::drawing::color
Creates a xtd::drawing::color class from a 32-bit ARGB value.
static const xtd::drawing::color silver
Gets a system-defined color that has an ARGB value of 0xFFC0C0C0. This field is constant.
Definition color.hpp:434
static const xtd::drawing::color turquoise
Gets a system-defined color that has an ARGB value of 0xFF40E0D0. This field is constant.
Definition color.hpp:467
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.hpp:137
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.hpp:89
static const xtd::drawing::color honeydew
Gets a system-defined color that has an ARGB value of 0xFFF0FFF0. This field is constant.
Definition color.hpp:224
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.hpp:170
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.hpp:341
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.hpp:188
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.hpp:206
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains xtd::drawing::cmyk struct.
Contains drawing_export_ keyword.
known_color
Specifies the known system colors.
Definition known_color.hpp:18
#define drawing_export_
Define shared library export.
Definition drawing_export.hpp:13
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
auto parse(const std::string &str) -> value_t
Convert a string into a type.
Definition parse.hpp:34
Contains xtd::drawing::hsb struct.
Contains xtd::drawing::hsl struct.
Contains xtd::drawing::hsv struct.
Contains xtd::drawing::known_color enum class.
Contains xtd::drawing::color suffixex.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::drawing::yuv struct.