Represents an ARGB (alpha, red, green, blue) color.
Public Fields | |
static const xtd::drawing::color | empty |
Represents a color that is null. | |
static const xtd::drawing::color | transparent |
Gets a system-defined color that has an ARGB value of 0x00000000. This field is constant. | |
static const xtd::drawing::color | alice_blue |
Gets a system-defined color that has an ARGB value of 0xFFF0F8FF. This field is constant. | |
static const xtd::drawing::color | antique_white |
Gets a system-defined color that has an ARGB value of 0xFFFAEBD7. This field is constant. | |
static const xtd::drawing::color | aqua |
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant. | |
static const xtd::drawing::color | aquamarine |
Gets a system-defined color that has an ARGB value of 0xFF7FFFD4. This field is constant. | |
static const xtd::drawing::color | azure |
Gets a system-defined color that has an ARGB value of 0xFFF0FFFF. This field is constant. | |
static const xtd::drawing::color | beige |
Gets a system-defined color that has an ARGB value of 0xFFF5F5DC. This field is constant. | |
static const xtd::drawing::color | bisque |
Gets a system-defined color that has an ARGB value of 0xFFFFE4C4. This field is constant. | |
static const xtd::drawing::color | black |
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant. | |
static const xtd::drawing::color | blanched_almond |
Gets a system-defined color that has an ARGB value of 0xFFFFEBCD. This field is constant. | |
static const xtd::drawing::color | blue |
Gets a system-defined color that has an ARGB value of 0xFF0000FF. This field is constant. | |
static const xtd::drawing::color | blue_violet |
Gets a system-defined color that has an ARGB value of 0xFF8A2BE2. This field is constant. | |
static const xtd::drawing::color | brown |
Gets a system-defined color that has an ARGB value of 0xFFA52A2A. This field is constant. | |
static const xtd::drawing::color | burly_wood |
Gets a system-defined color that has an ARGB value of 0xFFDEB887. This field is constant. | |
static const xtd::drawing::color | cadet_blue |
Gets a system-defined color that has an ARGB value of 0xFF5F9EA0. This field is constant. | |
static const xtd::drawing::color | chartreuse |
Gets a system-defined color that has an ARGB value of 0xFF7FFF00. This field is constant. | |
static const xtd::drawing::color | chocolate |
Gets a system-defined color that has an ARGB value of 0xFFD2691E. This field is constant. | |
static const xtd::drawing::color | coral |
Gets a system-defined color that has an ARGB value of 0xFFFF7F50. This field is constant. | |
static const xtd::drawing::color | cornflower_blue |
Gets a system-defined color that has an ARGB value of 0xFF6495ED. This field is constant. | |
static const xtd::drawing::color | cornsilk |
Gets a system-defined color that has an ARGB value of 0xFFFFF8DC. This field is constant. | |
static const xtd::drawing::color | crimson |
Gets a system-defined color that has an ARGB value of 0xFFDC143C. This field is constant. | |
static const xtd::drawing::color | cyan |
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant. | |
static const xtd::drawing::color | dark_blue |
Gets a system-defined color that has an ARGB value of 0xFF00008B. This field is constant. | |
static const xtd::drawing::color | dark_cyan |
Gets a system-defined color that has an ARGB value of 0xFF008B8B. This field is constant. | |
static const xtd::drawing::color | dark_goldenrod |
Gets a system-defined color that has an ARGB value of 0xFFB8860B. This field is constant. | |
static const xtd::drawing::color | dark_gray |
Gets a system-defined color that has an ARGB value of 0xFFA9A9A9. This field is constant. | |
static const xtd::drawing::color | dark_green |
Gets a system-defined color that has an ARGB value of 0xFF006400. This field is constant. | |
static const xtd::drawing::color | dark_khaki |
Gets a system-defined color that has an ARGB value of 0xFFBDB76B. This field is constant. | |
static const xtd::drawing::color | dark_magenta |
Gets a system-defined color that has an ARGB value of 0xFF8B008B. This field is constant. | |
static const xtd::drawing::color | dark_olive_green |
Gets a system-defined color that has an ARGB value of 0xFF556B2F. This field is constant. | |
static const xtd::drawing::color | dark_orange |
Gets a system-defined color that has an ARGB value of 0xFFFF8C00. This field is constant. | |
static const xtd::drawing::color | dark_orchid |
Gets a system-defined color that has an ARGB value of 0xFF9932CC. This field is constant. | |
static const xtd::drawing::color | dark_red |
Gets a system-defined color that has an ARGB value of 0xFF8B0000. This field is constant. | |
static const xtd::drawing::color | dark_salmon |
Gets a system-defined color that has an ARGB value of 0xFFE9967A. This field is constant. | |
static const xtd::drawing::color | dark_sea_green |
Gets a system-defined color that has an ARGB value of 0xFF8FBC8B. This field is constant. | |
static const xtd::drawing::color | dark_slate_blue |
Gets a system-defined color that has an ARGB value of 0xFF483D8B. This field is constant. | |
static const xtd::drawing::color | dark_slate_gray |
Gets a system-defined color that has an ARGB value of 0xFF2F4F4F. This field is constant. | |
static const xtd::drawing::color | dark_turquoise |
Gets a system-defined color that has an ARGB value of 0xFF00CED1. This field is constant. | |
static const xtd::drawing::color | dark_violet |
Gets a system-defined color that has an ARGB value of 0xFF9400D3. This field is constant. | |
static const xtd::drawing::color | deep_pink |
Gets a system-defined color that has an ARGB value of 0xFFFF1493. This field is constant. | |
static const xtd::drawing::color | deep_sky_blue |
Gets a system-defined color that has an ARGB value of 0xFF00BFFF. This field is constant. | |
static const xtd::drawing::color | dim_gray |
Gets a system-defined color that has an ARGB value of 0xFF696969. This field is constant. | |
static const xtd::drawing::color | dodger_blue |
Gets a system-defined color that has an ARGB value of 0xFF1E90FF. This field is constant. | |
static const xtd::drawing::color | firebrick |
Gets a system-defined color that has an ARGB value of 0xFFB22222. This field is constant. | |
static const xtd::drawing::color | floral_white |
Gets a system-defined color that has an ARGB value of 0xFFFFFAF0. This field is constant. | |
static const xtd::drawing::color | forest_green |
Gets a system-defined color that has an ARGB value of 0xFF228B22. This field is constant. | |
static const xtd::drawing::color | fuchsia |
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant. | |
static const xtd::drawing::color | gainsboro |
Gets a system-defined color that has an ARGB value of 0xFFDCDCDC. This field is constant. | |
static const xtd::drawing::color | ghost_white |
Gets a system-defined color that has an ARGB value of 0xFFF8F8FF. This field is constant. | |
static const xtd::drawing::color | gold |
Gets a system-defined color that has an ARGB value of 0xFFFFD700. This field is constant. | |
static const xtd::drawing::color | goldenrod |
Gets a system-defined color that has an ARGB value of 0xFFDAA520. This field is constant. | |
static const xtd::drawing::color | gray |
Gets a system-defined color that has an ARGB value of 0xFF808080. This field is constant. | |
static const xtd::drawing::color | green |
Gets a system-defined color that has an ARGB value of 0xFF008000. This field is constant. | |
static const xtd::drawing::color | green_yellow |
Gets a system-defined color that has an ARGB value of 0xFFADFF2F. This field is constant. | |
static const xtd::drawing::color | honeydew |
Gets a system-defined color that has an ARGB value of 0xFFF0FFF0. This field is constant. | |
static const xtd::drawing::color | hot_pink |
Gets a system-defined color that has an ARGB value of 0xFFFF69B4. This field is constant. | |
static const xtd::drawing::color | indian_red |
Gets a system-defined color that has an ARGB value of 0xFFCD5C5C. This field is constant. | |
static const xtd::drawing::color | indigo |
Gets a system-defined color that has an ARGB value of 0xFF4B0082. This field is constant. | |
static const xtd::drawing::color | ivory |
Gets a system-defined color that has an ARGB value of 0xFFFFFFF0. This field is constant. | |
static const xtd::drawing::color | khaki |
Gets a system-defined color that has an ARGB value of 0xFFF0E68C. This field is constant. | |
static const xtd::drawing::color | lavender |
Gets a system-defined color that has an ARGB value of 0xFFE6E6FA. This field is constant. | |
static const xtd::drawing::color | lavender_blush |
Gets a system-defined color that has an ARGB value of 0xFFFFF0F5. This field is constant. | |
static const xtd::drawing::color | lawn_green |
Gets a system-defined color that has an ARGB value of 0xFF7CFC00. This field is constant. | |
static const xtd::drawing::color | lemon_chiffon |
Gets a system-defined color that has an ARGB value of 0xFFFFFACD. This field is constant. | |
static const xtd::drawing::color | light_blue |
Gets a system-defined color that has an ARGB value of 0xFFADD8E6. This field is constant. | |
static const xtd::drawing::color | light_coral |
Gets a system-defined color that has an ARGB value of 0xFFF08080. This field is constant. | |
static const xtd::drawing::color | light_cyan |
Gets a system-defined color that has an ARGB value of 0xFFE0FFFF. This field is constant. | |
static const xtd::drawing::color | light_goldenrod_yellow |
Gets a system-defined color that has an ARGB value of 0xFFFAFAD2. This field is constant. | |
static const xtd::drawing::color | light_gray |
Gets a system-defined color that has an ARGB value of 0xFFD3D3D3. This field is constant. | |
static const xtd::drawing::color | light_green |
Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant. | |
static const xtd::drawing::color | light_pink |
Gets a system-defined color that has an ARGB value of 0xFFFFB6C1. This field is constant. | |
static const xtd::drawing::color | light_salmon |
Gets a system-defined color that has an ARGB value of 0xFFFFA07A. This field is constant. | |
static const xtd::drawing::color | light_sea_green |
Gets a system-defined color that has an ARGB value of 0xFF20B2AA. This field is constant. | |
static const xtd::drawing::color | light_sky_blue |
Gets a system-defined color that has an ARGB value of 0xFF87CEFA. This field is constant. | |
static const xtd::drawing::color | light_slate_gray |
Gets a system-defined color that has an ARGB value of 0xFF778899. This field is constant. | |
static const xtd::drawing::color | light_steel_blue |
Gets a system-defined color that has an ARGB value of 0xFFB0C4DE. This field is constant. | |
static const xtd::drawing::color | light_yellow |
Gets a system-defined color that has an ARGB value of 0xFFFFFFE0. This field is constant. | |
static const xtd::drawing::color | lime |
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant. | |
static const xtd::drawing::color | lime_green |
Gets a system-defined color that has an ARGB value of 0xFF32CD32. This field is constant. | |
static const xtd::drawing::color | linen |
Gets a system-defined color that has an ARGB value of 0xFFFAF0E6. This field is constant. | |
static const xtd::drawing::color | magenta |
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant. | |
static const xtd::drawing::color | maroon |
Gets a system-defined color that has an ARGB value of 0xFF800000. This field is constant. | |
static const xtd::drawing::color | medium_aquamarine |
Gets a system-defined color that has an ARGB value of 0xFF66CDAA. This field is constant. | |
static const xtd::drawing::color | medium_blue |
Gets a system-defined color that has an ARGB value of 0xFF0000CD. This field is constant. | |
static const xtd::drawing::color | medium_orchid |
Gets a system-defined color that has an ARGB value of 0xFFBA55D3. This field is constant. | |
static const xtd::drawing::color | medium_purple |
Gets a system-defined color that has an ARGB value of 0xFF9370DB. This field is constant. | |
static const xtd::drawing::color | medium_sea_green |
Gets a system-defined color that has an ARGB value of 0xFF3CB371. This field is constant. | |
static const xtd::drawing::color | medium_slate_blue |
Gets a system-defined color that has an ARGB value of 0xFF7B68EE. This field is constant. | |
static const xtd::drawing::color | medium_spring_green |
Gets a system-defined color that has an ARGB value of 0xFF00FA9A. This field is constant. | |
static const xtd::drawing::color | medium_turquoise |
Gets a system-defined color that has an ARGB value of 0xFF48D1CC. This field is constant. | |
static const xtd::drawing::color | medium_violet_red |
Gets a system-defined color that has an ARGB value of 0xFFC71585. This field is constant. | |
static const xtd::drawing::color | midnight_blue |
Gets a system-defined color that has an ARGB value of 0xFF191970. This field is constant. | |
static const xtd::drawing::color | mint_cream |
Gets a system-defined color that has an ARGB value of 0xFFF5FFFA. This field is constant. | |
static const xtd::drawing::color | misty_rose |
Gets a system-defined color that has an ARGB value of 0xFFFFE4E1. This field is constant. | |
static const xtd::drawing::color | moccasin |
Gets a system-defined color that has an ARGB value of 0xFFFFE4B5. This field is constant. | |
static const xtd::drawing::color | navajo_white |
Gets a system-defined color that has an ARGB value of 0xFFFFDEAD. This field is constant. | |
static const xtd::drawing::color | navy |
Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant. | |
static const xtd::drawing::color | old_lace |
Gets a system-defined color that has an ARGB value of 0xFFFDF5E6. This field is constant. | |
static const xtd::drawing::color | olive |
Gets a system-defined color that has an ARGB value of 0xFF808000. This field is constant. | |
static const xtd::drawing::color | olive_drab |
Gets a system-defined color that has an ARGB value of 0xFF6B8E23. This field is constant. | |
static const xtd::drawing::color | orange |
Gets a system-defined color that has an ARGB value of 0xFFFFA500. This field is constant. | |
static const xtd::drawing::color | orange_red |
Gets a system-defined color that has an ARGB value of 0xFFFF4500. This field is constant. | |
static const xtd::drawing::color | orchid |
Gets a system-defined color that has an ARGB value of 0xFFDA70D6. This field is constant. | |
static const xtd::drawing::color | pale_goldenrod |
Gets a system-defined color that has an ARGB value of 0xFFEEE8AA. This field is constant. | |
static const xtd::drawing::color | pale_green |
Gets a system-defined color that has an ARGB value of 0xFF98FB98. This field is constant. | |
static const xtd::drawing::color | pale_turquoise |
Gets a system-defined color that has an ARGB value of 0xFFAFEEEE. This field is constant. | |
static const xtd::drawing::color | pale_violet_red |
Gets a system-defined color that has an ARGB value of 0xFFDB7093. This field is constant. | |
static const xtd::drawing::color | papaya_whip |
Gets a system-defined color that has an ARGB value of 0xFFFFEFD5. This field is constant. | |
static const xtd::drawing::color | peach_puff |
Gets a system-defined color that has an ARGB value of 0xFFFFDAB9. This field is constant. | |
static const xtd::drawing::color | peru |
Gets a system-defined color that has an ARGB value of 0xFFCD853F. This field is constant. | |
static const xtd::drawing::color | pink |
Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant. | |
static const xtd::drawing::color | plum |
Gets a system-defined color that has an ARGB value of 0xFFDDA0DD. This field is constant. | |
static const xtd::drawing::color | powder_blue |
Gets a system-defined color that has an ARGB value of 0xFFB0E0E6. This field is constant. | |
static const xtd::drawing::color | purple |
Gets a system-defined color that has an ARGB value of 0xFF800080. This field is constant. | |
static const xtd::drawing::color | rebecca_purple |
Gets a system-defined color that has an ARGB value of 0xFF663399. This field is constant. | |
static const xtd::drawing::color | red |
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant. | |
static const xtd::drawing::color | rosy_brown |
Gets a system-defined color that has an ARGB value of 0xFFBC8F8F. This field is constant. | |
static const xtd::drawing::color | royal_blue |
Gets a system-defined color that has an ARGB value of 0xFF4169E1. This field is constant. | |
static const xtd::drawing::color | saddle_brown |
Gets a system-defined color that has an ARGB value of 0xFF8B4513. This field is constant. | |
static const xtd::drawing::color | salmon |
Gets a system-defined color that has an ARGB value of 0xFFFA8072. This field is constant. | |
static const xtd::drawing::color | sandy_brown |
Gets a system-defined color that has an ARGB value of 0xFFF4A460. This field is constant. | |
static const xtd::drawing::color | sea_green |
Gets a system-defined color that has an ARGB value of 0xFF2E8B57. This field is constant. | |
static const xtd::drawing::color | sea_shell |
Gets a system-defined color that has an ARGB value of 0xFFFFF5EE. This field is constant. | |
static const xtd::drawing::color | sienna |
Gets a system-defined color that has an ARGB value of 0xFFA0522D. This field is constant. | |
static const xtd::drawing::color | silver |
Gets a system-defined color that has an ARGB value of 0xFFC0C0C0. This field is constant. | |
static const xtd::drawing::color | sky_blue |
Gets a system-defined color that has an ARGB value of 0xFF87CEEB. This field is constant. | |
static const xtd::drawing::color | slate_blue |
Gets a system-defined color that has an ARGB value of 0xFF6A5ACD. This field is constant. | |
static const xtd::drawing::color | slate_gray |
Gets a system-defined color that has an ARGB value of 0xFF708090. This field is constant. | |
static const xtd::drawing::color | snow |
Gets a system-defined color that has an ARGB value of 0xFFFFFAFA. This field is constant. | |
static const xtd::drawing::color | spring_green |
Gets a system-defined color that has an ARGB value of 0xFF00FF7F. This field is constant. | |
static const xtd::drawing::color | steel_blue |
Gets a system-defined color that has an ARGB value of 0xFF4682B4. This field is constant. | |
static const xtd::drawing::color | tan |
Gets a system-defined color that has an ARGB value of 0xFFD2B48C. This field is constant. | |
static const xtd::drawing::color | teal |
Gets a system-defined color that has an ARGB value of 0xFF008080. This field is constant. | |
static const xtd::drawing::color | thistle |
Gets a system-defined color that has an ARGB value of 0xFFD8BFD8. This field is constant. | |
static const xtd::drawing::color | tomato |
Gets a system-defined color that has an ARGB value of 0xFFFF6347. This field is constant. | |
static const xtd::drawing::color | turquoise |
Gets a system-defined color that has an ARGB value of 0xFF40E0D0. This field is constant. | |
static const xtd::drawing::color | violet |
Gets a system-defined color that has an ARGB value of 0xFFEE82EE. This field is constant. | |
static const xtd::drawing::color | wheat |
Gets a system-defined color that has an ARGB value of 0xFFF5DEB3. This field is constant. | |
static const xtd::drawing::color | white |
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant. | |
static const xtd::drawing::color | white_smoke |
Gets a system-defined color that has an ARGB value of 0xFFF5F5F5. This field is constant. | |
static const xtd::drawing::color | yellow |
Gets a system-defined color that has an ARGB value of 0xFFFFFF00. This field is constant. | |
static const xtd::drawing::color | yellow_green |
Gets a system-defined color that has an ARGB value of 0xFF9ACD32. This field is constant. | |
static constexpr double | lightness_threshold |
Represent the lightness threshold. | |
Public Constructors | |
color ()=default | |
Initialize a new instance of xtd::drawing::color class. | |
Public Properties | |
xtd::byte | a () const noexcept |
Gets the alpha component value of this xtd::drawing::color class. | |
xtd::byte | b () const noexcept |
Gets the blue component value of this xtd::drawing::color class. | |
xtd::byte | g () const noexcept |
Gets the green component value of this xtd::drawing::color class. | |
intptr | handle () const noexcept |
Gets the native handle of this xtd::drawing::color class. | |
bool | is_dark () const noexcept |
Gets a value indicating wheter this xtd::drawing::color structure is dark color. | |
bool | is_empty () const noexcept |
Specifies whether this xtd::drawing::color class is uninitialized. | |
bool | is_known_color () const noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a predefined color. Predefined colors are represented by the elements of the xtd::drawing::known_color enumeration. | |
bool | is_light () const noexcept |
Gets a value indicating wheter this xtd::drawing::color structure is light color. | |
bool | is_named_color () const noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a named color or a member of the xtd::drawing::known_color enumeration. | |
bool | is_system_color () const noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a system color. A system color is a color that is used in a Windows display element. System colors are represented by elements of the xtd::drawing::known_color enumeration. | |
xtd::string | name () const noexcept |
Gets the name of this xtd::drawing::color. | |
xtd::byte | r () const noexcept |
Gets the red component value of this xtd::drawing::color class. | |
Public Methods | |
bool | equals (const color &value) const noexcept override |
float | get_brightness () const noexcept |
Gets the hue-saturation-brightness (HSB) brightness value for this xtd::drawing::color structure. | |
float | get_hue () const noexcept |
Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this xtd::drawing::color structure. | |
float | get_lightness () const noexcept |
Gets the hue-saturation-lightness (HSL) lightness value for this xtd::drawing::color structure. | |
float | get_saturation () const noexcept |
Gets the hue-saturation-brightness (HSB) saturation value for this xtd::drawing::color structure. | |
float | get_u () const noexcept |
Gets the Y'UV color model U (chroma) value for this xtd::drawing::color structure. | |
float | get_v () const noexcept |
Gets the Y'UV color model V (chroma) value for this xtd::drawing::color structure. | |
float | get_y () const noexcept |
Gets the Y'UV color model Y (luma) value for this xtd::drawing::color structure. | |
uint32 | to_argb () const noexcept |
Gets the 32-bit ARGB value of this xtd::drawing::color class. | |
xtd::drawing::known_color | to_known_color () const noexcept |
Gets the xtd::drawing::known_color value of this xtd::drawing::color class. | |
xtd::string | to_string () const noexcept override |
Creates a human-readable string that represents this color class. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
Public Static Methods | |
static color | average (const color &color1, const color &color2, double weight) noexcept |
Returns the weighted average color between the two given colors. | |
static color | average (const color &color1, const color &color2, double weight, bool average_alpha) noexcept |
Returns the weighted average color between the two given colors. | |
static color | dark (const color &color) noexcept |
Creates a new darker color of the specified color with 33% factor. | |
static color | dark (const color &color, double percent) noexcept |
Creates a new darker color of the specified color with specified percent factor. | |
static xtd::drawing::color | from_argb (uint32 argb) noexcept |
Creates a xtd::drawing::color class from a 32-bit ARGB value. | |
static xtd::drawing::color | from_argb (xtd::byte alpha, const xtd::drawing::color &base_color) noexcept |
Creates a xtd::drawing::color class from the specified xtd::drawing::color structure, but with the new specified alpha value. Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits. | |
static xtd::drawing::color | from_argb (xtd::byte alpha, xtd::byte red, xtd::byte green, xtd::byte blue) noexcept |
Creates a xtd::drawing::color class from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits. | |
static xtd::drawing::color | from_argb (xtd::byte red, xtd::byte green, xtd::byte blue) noexcept |
Creates a xtd::drawing::color structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits. | |
static xtd::drawing::color | from_handle (intptr handle) noexcept |
Creates a xtd::drawing::color class from native handle. | |
static xtd::drawing::color | from_hsb (float hue, float saturation, float brightness) noexcept |
Creates a xtd::drawing::color class from the three HSV component (hue, saturation, and brightness) values. | |
static xtd::drawing::color | from_hsl (float hue, float saturation, float lightness) noexcept |
Creates a xtd::drawing::color class from the three HSL component (hue, saturation, and lightness) values. | |
static xtd::drawing::color | from_known_color (xtd::drawing::known_color color) |
Creates a xtd::drawing::color class from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits. | |
static xtd::drawing::color | from_name (const xtd::string &name) noexcept |
Creates a xtd::drawing::color class from the specified name of a predefined color. | |
static xtd::drawing::color | from_yuv (float y, float u, float v) noexcept |
Creates a xtd::drawing::color class from the three YUV components (luma and choma) values. | |
static color | light (const color &color) noexcept |
Creates a new lighter color of the specified color with 33% factor. | |
static color | light (const color &color, double percent) noexcept |
Creates a new lighter color of the specified color with specified percent factor. | |
static xtd::drawing::color | parse (const xtd::string &color) noexcept |
Creates a xtd::drawing::color class from the specified name. | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::iequatable< color > | |
virtual bool | equals (const color &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
|
default |
Initialize a new instance of xtd::drawing::color class.
|
noexcept |
Gets the alpha component value of this xtd::drawing::color class.
|
noexcept |
Gets the blue component value of this xtd::drawing::color class.
|
noexcept |
Gets the green component value of this xtd::drawing::color class.
|
noexcept |
Gets the native handle of this xtd::drawing::color class.
|
noexcept |
Gets a value indicating wheter this xtd::drawing::color structure is dark color.
|
noexcept |
Specifies whether this xtd::drawing::color class is uninitialized.
|
noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a predefined color. Predefined colors are represented by the elements of the xtd::drawing::known_color enumeration.
|
noexcept |
Gets a value indicating wheter this xtd::drawing::color structure is light color.
|
noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a named color or a member of the xtd::drawing::known_color enumeration.
|
noexcept |
Gets a value indicating whether this xtd::drawing::color structure is a system color. A system color is a color that is used in a Windows display element. System colors are represented by elements of the xtd::drawing::known_color enumeration.
|
noexcept |
Gets the name of this xtd::drawing::color.
|
noexcept |
Gets the red component value of this xtd::drawing::color class.
|
noexcept |
Gets the hue-saturation-brightness (HSB) brightness value for this xtd::drawing::color structure.
|
noexcept |
Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this xtd::drawing::color structure.
|
noexcept |
Gets the hue-saturation-lightness (HSL) lightness value for this xtd::drawing::color structure.
|
noexcept |
Gets the hue-saturation-brightness (HSB) saturation value for this xtd::drawing::color structure.
|
noexcept |
Gets the Y'UV color model U
(chroma) value for this xtd::drawing::color structure.
U
value of this xtd::drawing::color. The y ranges from -0.5 through0.5. When U
and V
are both 0, the color is neutral (gray). Positive U
values represent the red-green axis, and positive V
values represent the blue-yellow axis
|
noexcept |
Gets the Y'UV color model V
(chroma) value for this xtd::drawing::color structure.
V
value of this xtd::drawing::color. The y ranges from -0.5 through0.5. When U
and V
are both 0, the color is neutral (gray). Positive U
values represent the red-green axis, and positive V
values represent the blue-yellow axis
|
noexcept |
Gets the Y'UV color model Y
(luma) value for this xtd::drawing::color structure.
Y
value of this xtd::drawing::color. The y ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.
|
noexcept |
Gets the 32-bit ARGB value of this xtd::drawing::color class.
|
noexcept |
Gets the xtd::drawing::known_color value of this xtd::drawing::color class.
|
overridevirtualnoexcept |
Creates a human-readable string that represents this color class.
Reimplemented from xtd::object.
|
staticnoexcept |
Returns the weighted average color between the two given colors.
color1 | The first color. |
color2 | The second color. |
weight | The weighting factor |
1.0
will return the second color, while a value of 0.0
will return the first color.
|
staticnoexcept |
Returns the weighted average color between the two given colors.
color1 | The first color. |
color2 | The second color. |
weight | The weighting factor |
average_alpha | if true alpha was compute to; otherwise the alpha result is the alpha of color1 |
Creates a new darker color of the specified color with 33% factor.
color | The color to dark. |
Creates a new darker color of the specified color with specified percent factor.
color | The color to dark. |
percent | The darker factor in % (from 0.0 to 1.0). |
1.0
will return the xtd::drawing::color::black, while a value of 0.0
will return the color.
|
staticnoexcept |
Creates a xtd::drawing::color class from a 32-bit ARGB value.
argb | A value specifying the 32-bit ARGB value |
|
staticnoexcept |
Creates a xtd::drawing::color class from the specified xtd::drawing::color structure, but with the new specified alpha value. Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits.
alpha | The alpha value for the new xtd::drawing::color. Valid values are 0 through 255. |
base_color | The xtd::drawing::color from which to create the new xtd::drawing::color. |
|
staticnoexcept |
Creates a xtd::drawing::color class from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
alpha | The alpha value for the new xtd::drawing::color. Valid values are 0 through 255. |
red | The red component. Valid values are 0 through 255. |
green | The green component. Valid values are 0 through 255. |
blue | The blue component. Valid values are 0 through 255. |
|
staticnoexcept |
Creates a xtd::drawing::color structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
red | The red component. Valid values are 0 through 255. |
green | The green component. Valid values are 0 through 255. |
blue | The blue component. Valid values are 0 through 255. |
|
staticnoexcept |
Creates a xtd::drawing::color class from native handle.
handle | the handle for the new xtd::drawing::color. |
|
staticnoexcept |
Creates a xtd::drawing::color class from the three HSV component (hue, saturation, and brightness) values.
hue | The xtd::drawing::color saturation. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated. |
saturation | The xtd::drawing::color saturation. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated. |
brightness | The xtd::drawing::color lightness. The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white. |
|
staticnoexcept |
Creates a xtd::drawing::color class from the three HSL component (hue, saturation, and lightness) values.
hue | The xtd::drawing::color saturation. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated. |
saturation | The xtd::drawing::color saturation. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated. |
lightness | The xtd::drawing::color lightness. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white. |
|
static |
Creates a xtd::drawing::color class from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
alpha | The alpha value for the new xtd::drawing::color. Valid values are 0 through 255. |
red | The red component. Valid values are 0 through 255. |
green | The green component. Valid values are 0 through 255. |
blue | The blue component. Valid values are 0 through 255. |
std::invalid_argument | color is not a known_color. |
|
staticnoexcept |
Creates a xtd::drawing::color class from the specified name of a predefined color.
name | A string that is the name of a predefined color. Valid names are the same as the names of the elements of the xtd::drawing::known_color enumeration. |
|
staticnoexcept |
Creates a xtd::drawing::color class from the three YUV components (luma and choma) values.
y | The Y'UV Y value of this xtd::drawing::color. The y ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white. |
u | The Y'UV U value of this xtd::drawing::color. The y ranges from -0.5 through0.5. When U and V are both 0, the color is neutral (gray). Positive U values represent the red-green axis, and positive V values represent the blue-yellow axis |
v | The Y'UV V value of this xtd::drawing::color. The y ranges from -0.5 through0.5. When U and V are both 0, the color is neutral (gray). Positive U values represent the red-green axis, and positive V values represent the blue-yellow axis |
Creates a new lighter color of the specified color with 33% factor.
color | The color to light. |
Creates a new lighter color of the specified color with specified percent factor.
color | The color to light. |
percent | The lighter factor in % (from 0.0 to 1.0). |
1.0
will return the xtd::drawing::color::black, while a value of 0.0
will return the color.
|
staticnoexcept |
Creates a xtd::drawing::color class from the specified name.
name | A string that is the name of a predefined color. Valid names are the same as the names of the elements of the xtd::drawing::known_color enumeration or hexadecimal value that represents argb value, or four decimal values separated by a comma representing respectively a, r, g, b, values. |
|
virtualnoexcept |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
inlinestaticnoexcept |
Determines whether the specified object instances are considered equal.
object_a | The first object to compare. |
object_b | The second object to compare. |
|
static |
Represents a color that is null.
|
static |
Gets a system-defined color that has an ARGB value of 0x00000000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF0F8FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFAEBD7. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF7FFFD4. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF0FFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF5F5DC. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFE4C4. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFEBCD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF0000FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF8A2BE2. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFA52A2A. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDEB887. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF5F9EA0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF7FFF00. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFD2691E. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF7F50. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF6495ED. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFF8DC. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDC143C. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00008B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF008B8B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFB8860B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFA9A9A9. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF006400. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFBDB76B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF8B008B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF556B2F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF8C00. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF9932CC. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF8B0000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFE9967A. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF8FBC8B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF483D8B. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF2F4F4F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00CED1. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF9400D3. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF1493. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00BFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF696969. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF1E90FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFB22222. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFAF0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF228B22. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDCDCDC. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF8F8FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFD700. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDAA520. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF808080. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF008000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFADFF2F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF0FFF0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF69B4. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFCD5C5C. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF4B0082. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFFF0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF0E68C. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFE6E6FA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFF0F5. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF7CFC00. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFACD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFADD8E6. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF08080. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFE0FFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFAFAD2. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFD3D3D3. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFB6C1. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFA07A. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF20B2AA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF87CEFA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF778899. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFB0C4DE. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFFE0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF32CD32. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFAF0E6. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF800000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF66CDAA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF0000CD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFBA55D3. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF9370DB. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF3CB371. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF7B68EE. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00FA9A. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF48D1CC. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFC71585. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF191970. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF5FFFA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFE4E1. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFE4B5. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFDEAD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFDF5E6. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF808000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF6B8E23. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFA500. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF4500. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDA70D6. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFEEE8AA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF98FB98. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFAFEEEE. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDB7093. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFEFD5. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFDAB9. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFCD853F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFDDA0DD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFB0E0E6. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF800080. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF663399. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFBC8F8F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF4169E1. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF8B4513. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFA8072. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF4A460. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF2E8B57. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFF5EE. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFA0522D. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFC0C0C0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF87CEEB. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF6A5ACD. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF708090. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFAFA. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF00FF7F. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF4682B4. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFD2B48C. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF008080. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFD8BFD8. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFF6347. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF40E0D0. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFEE82EE. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF5DEB3. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFF5F5F5. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFFFFFF00. This field is constant.
|
static |
Gets a system-defined color that has an ARGB value of 0xFF9ACD32. This field is constant.
|
staticconstexpr |
Represent the lightness threshold.