xtd_c - Reference Guide 0.2.0
color.h File Reference
#include <xtd_c/object.h>
#include "known_color.h"

Definition

Contains color definitions.

Go to the source code of this file.

Data Structures

struct  xtd_drawing_color
 Represents an ARGB (alpha, red, green, blue) color. More...
 

Fields

xtd_drawing_color xtd_drawing_color_empty ()
 Represents a color that is null. More...
 
xtd_drawing_color xtd_drawing_color_transparent ()
 Gets a system-defined color that has an ARGB value of 0x00FFFFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_alice_blue ()
 Gets a system-defined color that has an ARGB value of 0xFFF0F8FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_antique_white ()
 Gets a system-defined color that has an ARGB value of 0xFFFAEBD7. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_aqua ()
 Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_aquamarine ()
 Gets a system-defined color that has an ARGB value of 0xFF7FFFD4. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_azure ()
 Gets a system-defined color that has an ARGB value of 0xFFF0FFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_beige ()
 Gets a system-defined color that has an ARGB value of 0xFFF5F5DC. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_bisque ()
 Gets a system-defined color that has an ARGB value of 0xFFFFE4C4. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_black ()
 Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_blanched_almond ()
 Gets a system-defined color that has an ARGB value of 0xFFFFEBCD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF0000FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_blue_violet ()
 Gets a system-defined color that has an ARGB value of 0xFF8A2BE2. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_brown ()
 Gets a system-defined color that has an ARGB value of 0xFFA52A2A. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_burly_wood ()
 Gets a system-defined color that has an ARGB value of 0xFFDEB887. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_cadet_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF5F9EA0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_chartreuse ()
 Gets a system-defined color that has an ARGB value of 0xFF7FFF00. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_chocolate ()
 Gets a system-defined color that has an ARGB value of 0xFFD2691E. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_coral ()
 Gets a system-defined color that has an ARGB value of 0xFFFF7F50. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_cornflower_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF6495ED. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_cornsilk ()
 Gets a system-defined color that has an ARGB value of 0xFFFFF8DC. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_crimson ()
 Gets a system-defined color that has an ARGB value of 0xFFDC143C. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_cyan ()
 Gets a system-defined color that has an ARGB value of 0xFF00FFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF00008B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_cyan ()
 Gets a system-defined color that has an ARGB value of 0xFF008B8B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_goldenrod ()
 Gets a system-defined color that has an ARGB value of 0xFFB8860B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_gray ()
 Gets a system-defined color that has an ARGB value of 0xFFA9A9A9. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_green ()
 Gets a system-defined color that has an ARGB value of 0xFF006400. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_khaki ()
 Gets a system-defined color that has an ARGB value of 0xFFBDB76B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_magenta ()
 Gets a system-defined color that has an ARGB value of 0xFF8B008B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_olive_green ()
 Gets a system-defined color that has an ARGB value of 0xFF556B2F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_orange ()
 Gets a system-defined color that has an ARGB value of 0xFFFF8C00. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_orchid ()
 Gets a system-defined color that has an ARGB value of 0xFF9932CC. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_red ()
 Gets a system-defined color that has an ARGB value of 0xFF8B0000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_salmon ()
 Gets a system-defined color that has an ARGB value of 0xFFE9967A. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_sea_green ()
 Gets a system-defined color that has an ARGB value of 0xFF8FBC8B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_slate_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF483D8B. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_slate_gray ()
 Gets a system-defined color that has an ARGB value of 0xFF2F4F4F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_turquoise ()
 Gets a system-defined color that has an ARGB value of 0xFF00CED1. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dark_violet ()
 Gets a system-defined color that has an ARGB value of 0xFF9400D3. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_deep_pink ()
 Gets a system-defined color that has an ARGB value of 0xFFFF1493. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_deep_sky_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF00BFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dim_gray ()
 Gets a system-defined color that has an ARGB value of 0xFF696969. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_dodger_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF1E90FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_firebrick ()
 Gets a system-defined color that has an ARGB value of 0xFFB22222. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_floral_white ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFAF0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_forest_green ()
 Gets a system-defined color that has an ARGB value of 0xFF228B22. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_fuchsia ()
 Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_gainsboro ()
 Gets a system-defined color that has an ARGB value of 0xFFDCDCDC. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_ghost_white ()
 Gets a system-defined color that has an ARGB value of 0xFFF8F8FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_gold ()
 Gets a system-defined color that has an ARGB value of 0xFFFFD700. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_goldenrod ()
 Gets a system-defined color that has an ARGB value of 0xFFDAA520. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_gray ()
 Gets a system-defined color that has an ARGB value of 0xFF808080. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_green ()
 Gets a system-defined color that has an ARGB value of 0xFF008000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_green_yellow ()
 Gets a system-defined color that has an ARGB value of 0xFFADFF2F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_honeydew ()
 Gets a system-defined color that has an ARGB value of 0xFFF0FFF0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_hot_pink ()
 Gets a system-defined color that has an ARGB value of 0xFFFF69B4. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_indian_red ()
 Gets a system-defined color that has an ARGB value of 0xFFCD5C5C. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_indigo ()
 Gets a system-defined color that has an ARGB value of 0xFF4B0082. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_ivory ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFFF0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_khaki ()
 Gets a system-defined color that has an ARGB value of 0xFFF0E68C. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lavender ()
 Gets a system-defined color that has an ARGB value of 0xFFE6E6FA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lavender_blush ()
 Gets a system-defined color that has an ARGB value of 0xFFFFF0F5. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lawn_green ()
 Gets a system-defined color that has an ARGB value of 0xFF7CFC00. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lemon_chiffon ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFACD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_blue ()
 Gets a system-defined color that has an ARGB value of 0xFFADD8E6. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_coral ()
 Gets a system-defined color that has an ARGB value of 0xFFF08080. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_cyan ()
 Gets a system-defined color that has an ARGB value of 0xFFE0FFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_goldenrod_yellow ()
 Gets a system-defined color that has an ARGB value of 0xFFFAFAD2. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_gray ()
 Gets a system-defined color that has an ARGB value of 0xFFD3D3D3. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_green ()
 Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_pink ()
 Gets a system-defined color that has an ARGB value of 0xFFFFB6C1. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_salmon ()
 Gets a system-defined color that has an ARGB value of 0xFFFFA07A. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_sea_green ()
 Gets a system-defined color that has an ARGB value of 0xFF20B2AA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_sky_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF87CEFA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_slate_gray ()
 Gets a system-defined color that has an ARGB value of 0xFF778899. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_steel_blue ()
 Gets a system-defined color that has an ARGB value of 0xFFB0C4DE. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_light_yellow ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFFE0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lime ()
 Gets a system-defined color that has an ARGB value of 0xFF00FF00. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_lime_green ()
 Gets a system-defined color that has an ARGB value of 0xFF32CD32. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_linen ()
 Gets a system-defined color that has an ARGB value of 0xFFFAF0E6. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_magenta ()
 Gets a system-defined color that has an ARGB value of 0xFFFF00FF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_maroon ()
 Gets a system-defined color that has an ARGB value of 0xFF800000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_aquamarine ()
 Gets a system-defined color that has an ARGB value of 0xFF66CDAA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF0000CD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_orchid ()
 Gets a system-defined color that has an ARGB value of 0xFFBA55D3. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_purple ()
 Gets a system-defined color that has an ARGB value of 0xFF9370DB. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_sea_green ()
 Gets a system-defined color that has an ARGB value of 0xFF3CB371. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_slate_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF7B68EE. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_spring_green ()
 Gets a system-defined color that has an ARGB value of 0xFF00FA9A. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_turquoise ()
 Gets a system-defined color that has an ARGB value of 0xFF48D1CC. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_medium_violet_red ()
 Gets a system-defined color that has an ARGB value of 0xFFC71585. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_midnight_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF191970. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_mint_cream ()
 Gets a system-defined color that has an ARGB value of 0xFFF5FFFA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_misty_rose ()
 Gets a system-defined color that has an ARGB value of 0xFFFFE4E1. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_moccasin ()
 Gets a system-defined color that has an ARGB value of 0xFFFFE4B5. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_navajo_white ()
 Gets a system-defined color that has an ARGB value of 0xFFFFDEAD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_navy ()
 Gets a system-defined color that has an ARGB value of 0xFF000080. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_old_lace ()
 Gets a system-defined color that has an ARGB value of 0xFFFDF5E6. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_olive ()
 Gets a system-defined color that has an ARGB value of 0xFF808000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_olive_drab ()
 Gets a system-defined color that has an ARGB value of 0xFF6B8E23. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_orange ()
 Gets a system-defined color that has an ARGB value of 0xFFFFA500. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_orange_red ()
 Gets a system-defined color that has an ARGB value of 0xFFFF4500. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_orchid ()
 Gets a system-defined color that has an ARGB value of 0xFFDA70D6. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_pale_goldenrod ()
 Gets a system-defined color that has an ARGB value of 0xFFEEE8AA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_pale_green ()
 Gets a system-defined color that has an ARGB value of 0xFF98FB98. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_pale_turquoise ()
 Gets a system-defined color that has an ARGB value of 0xFFAFEEEE. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_pale_violet_red ()
 Gets a system-defined color that has an ARGB value of 0xFFDB7093. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_papaya_whip ()
 Gets a system-defined color that has an ARGB value of 0xFFFFEFD5. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_peach_puff ()
 Gets a system-defined color that has an ARGB value of 0xFFFFDAB9. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_peru ()
 Gets a system-defined color that has an ARGB value of 0xFFCD853F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_pink ()
 Gets a system-defined color that has an ARGB value of 0xFFFFC0CB. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_plum ()
 Gets a system-defined color that has an ARGB value of 0xFFDDA0DD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_powder_blue ()
 Gets a system-defined color that has an ARGB value of 0xFFB0E0E6. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_purple ()
 Gets a system-defined color that has an ARGB value of 0xFF800080. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_rebecca_purple ()
 Gets a system-defined color that has an ARGB value of 0xFF663399. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_red ()
 Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_rosy_brown ()
 Gets a system-defined color that has an ARGB value of 0xFFBC8F8F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_royal_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF4169E1. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_saddle_brown ()
 Gets a system-defined color that has an ARGB value of 0xFF8B4513. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_salmon ()
 Gets a system-defined color that has an ARGB value of 0xFFFA8072. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_sandy_brown ()
 Gets a system-defined color that has an ARGB value of 0xFFF4A460. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_sea_green ()
 Gets a system-defined color that has an ARGB value of 0xFF2E8B57. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_sea_shell ()
 Gets a system-defined color that has an ARGB value of 0xFFFFF5EE. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_sienna ()
 Gets a system-defined color that has an ARGB value of 0xFFA0522D. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_silver ()
 Gets a system-defined color that has an ARGB value of 0xFFC0C0C0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_sky_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF87CEEB. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_slate_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF6A5ACD. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_slate_gray ()
 Gets a system-defined color that has an ARGB value of 0xFF708090. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_snow ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFAFA. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_spring_green ()
 Gets a system-defined color that has an ARGB value of 0xFF00FF7F. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_steel_blue ()
 Gets a system-defined color that has an ARGB value of 0xFF4682B4. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_tan ()
 Gets a system-defined color that has an ARGB value of 0xFFD2B48C. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_teal ()
 Gets a system-defined color that has an ARGB value of 0xFF008080. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_thistle ()
 Gets a system-defined color that has an ARGB value of 0xFFD8BFD8. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_tomato ()
 Gets a system-defined color that has an ARGB value of 0xFFFF6347. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_turquoise ()
 Gets a system-defined color that has an ARGB value of 0xFF40E0D0. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_violet ()
 Gets a system-defined color that has an ARGB value of 0xFFEE82EE. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_wheat ()
 Gets a system-defined color that has an ARGB value of 0xFFF5DEB3. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_white ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_white_smoke ()
 Gets a system-defined color that has an ARGB value of 0xFFF5F5F5. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_yellow ()
 Gets a system-defined color that has an ARGB value of 0xFFFFFF00. This field is constant. More...
 
xtd_drawing_color xtd_drawing_color_yellow_green ()
 Gets a system-defined color that has an ARGB value of 0xFF9ACD32. This field is constant. More...
 

Properties

bool xtd_drawing_color_is_dark (xtd_drawing_color color)
 Gets a value indicating wheter the specified xtd_drawing_color structure is dark color. More...
 
bool xtd_drawing_color_is_empty (xtd_drawing_color color)
 Specifies whether the specified xtd_drawing_color class is uninitialized. More...
 
bool xtd_drawing_color_is_known_color (xtd_drawing_color color)
 Gets a value indicating whether the specified xtd_drawing_color structure is a predefined color. Predefined colors are represented by the elements of the xtd::drawing::known_color enumeration. More...
 
bool xtd_drawing_color_is_light (xtd_drawing_color color)
 Gets a value indicating wheter the specified xtd_drawing_color structure is light color. More...
 
bool xtd_drawing_color_is_named_color (xtd_drawing_color color)
 Gets a value indicating whether the specified xtd_drawing_color structure is a named color or a member of the xtd::drawing::known_color enumeration. More...
 
bool xtd_drawing_color_is_system_color (xtd_drawing_color color)
 Gets a value indicating whether the specified 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. More...
 
const char * xtd_drawing_color_name (xtd_drawing_color color)
 Gets the name of the specified xtd_drawing_color. More...
 
size_t xtd_drawing_color_name_s (xtd_drawing_color color, char *string, size_t size)
 Gets the name of the specified xtd_drawing_color. More...
 

Methods

xtd_drawing_color xtd_drawing_color_average_with_alpha (xtd_drawing_color color1, xtd_drawing_color color2, double weight, bool average_alpha)
 Returns the weighted average color between the two given colors. More...
 
xtd_drawing_color xtd_drawing_color_average (xtd_drawing_color color1, xtd_drawing_color color2, double weight)
 Returns the weighted average color between the two given colors. More...
 
xtd_drawing_color xtd_drawing_color_dark_with_weight (xtd_drawing_color color, double weight)
 Returns a darker version of the specified color. More...
 
xtd_drawing_color xtd_drawing_color_dark (xtd_drawing_color color)
 Returns a darker version of the specified color. More...
 
xtd_drawing_color xtd_drawing_color_light_with_weight (xtd_drawing_color color, double weight)
 Returns a lighter version of the specified color. More...
 
xtd_drawing_color xtd_drawing_color_light (xtd_drawing_color color)
 Returns a lighter version of the specified color. More...
 
xtd_drawing_color xtd_drawing_color_from_argb_with_32bits (uint32_t argb)
 Creates a xtd_drawing_color class from a 32-bit ARGB value. More...
 
xtd_drawing_color from_argb_with_base_color (uint8_t alpha, xtd_drawing_color base_color)
 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. More...
 
xtd_drawing_color xtd_drawing_color_from_argb (uint8_t alpha, uint8_t red, uint8_t green, uint8_t blue)
 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. More...
 
xtd_drawing_color xtd_drawing_color_from_argb_without_alpha (uint8_t red, uint8_t green, uint8_t blue)
 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. More...
 
xtd_drawing_color xtd_drawing_color_from_handle (intptr_t handle)
 Creates a xtd_drawing_color class from native handle. More...
 
xtd_drawing_color xtd_drawing_color_from_hsb (float hue, float saturation, float brightness)
 Creates a xtd_drawing_color class from the three HSV component (hue, saturation, and brightness) values. More...
 
xtd_drawing_color xtd_drawing_color_from_hsl (float hue, float saturation, float lightness)
 Creates a xtd_drawing_color class from the three HSL component (hue, saturation, and lightness) values. More...
 
xtd_drawing_color 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. More...
 
xtd_drawing_color xtd_drawing_color_from_name (const char *name)
 Creates a xtd_drawing_color class from the specified name of a predefined color. More...
 
float xtd_drawing_color_get_brightness (xtd_drawing_color color)
 Gets the hue-saturation-brightness (HSB) brightness value for the specified xtd_drawing_color structure. More...
 
float xtd_drawing_color_get_hue (xtd_drawing_color color)
 Gets the hue-saturation-brightness (HSB) hue value, in degrees, for the specified xtd_drawing_color structure. More...
 
float xtd_drawing_color_get_lightness (xtd_drawing_color color)
 Gets the hue-saturation-lightness (HSL) lightness value for the specified xtd_drawing_color structure. More...
 
float xtd_drawing_color_get_saturation (xtd_drawing_color color)
 Gets the hue-saturation-brightness (HSB) saturation value for the specified xtd_drawing_color structure. More...
 
xtd_drawing_color xtd_drawing_color_parse (const char *color)
 Creates a xtd_drawing_color class from the specified name. More...
 
uint32_t xtd_drawing_color_to_argb (xtd_drawing_color color)
 Gets the 32-bit ARGB value of the specified xtd_drawing_color class. More...
 
xtd_drawing_known_color xtd_drawing_color_to_known_color (xtd_drawing_color color)
 Gets the xtd::drawing::known_color value of the specified xtd_drawing_color class. More...
 
const char * xtd_drawing_color_to_string (xtd_drawing_color color)
 Creates a human-readable string that represents this color class. More...
 
size_t xtd_drawing_color_to_string_s (char *string, size_t size, xtd_drawing_color color)
 Creates a human-readable string that represents this color class. More...
 

Function Documentation

◆ from_argb_with_base_color()

xtd_drawing_color from_argb_with_base_color ( uint8_t  alpha,
xtd_drawing_color  base_color 
)

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.

Parameters
alphaThe alpha value for the new xtd_drawing_color. Valid values are 0 through 255.
base_colorThe xtd_drawing_color from which to create the new xtd_drawing_color.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.

◆ xtd_drawing_color_average()

xtd_drawing_color xtd_drawing_color_average ( xtd_drawing_color  color1,
xtd_drawing_color  color2,
double  weight 
)

Returns the weighted average color between the two given colors.

Parameters
color1The first color.
color2The second color.
weightThe weighting factor
Returns
The average color.
Remarks
The alpha of color1 is conserved.
The red, green and blue values are averages using the following formula:
color = color1 * (1 - weight) + color2 * weight;
Thus, a weight value of 1.0 will return the second color, while a value of 0.0 will return the first color.

◆ xtd_drawing_color_average_with_alpha()

xtd_drawing_color xtd_drawing_color_average_with_alpha ( xtd_drawing_color  color1,
xtd_drawing_color  color2,
double  weight,
bool  average_alpha 
)

Returns the weighted average color between the two given colors.

Parameters
color1The first color.
color2The second color.
weightThe weighting factor
average_alphaif true alpha was compute to; otherwise the alpha result is the alpha of color1
Returns
The average color.
Remarks
The alpha, red, green and blue values are averages using the following formula:
color = color1 * (1 - weight) + color2 * weight;
Thus, a weight value of 1.0 will return the first color, while a value of 0.0 will return the second color.

◆ xtd_drawing_color_dark()

xtd_drawing_color xtd_drawing_color_dark ( xtd_drawing_color  color)

Returns a darker version of the specified color.

Parameters
colorThe color to dark.
Returns
the darker color result.

◆ xtd_drawing_color_dark_with_weight()

xtd_drawing_color xtd_drawing_color_dark_with_weight ( xtd_drawing_color  color,
double  weight 
)

Returns a darker version of the specified color.

Parameters
colorThe color to dark.
Returns
the darker color result.

◆ xtd_drawing_color_from_argb()

xtd_drawing_color xtd_drawing_color_from_argb ( uint8_t  alpha,
uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

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.

Parameters
alphaThe alpha value for the new xtd_drawing_color. Valid values are 0 through 255.
redThe red component. Valid values are 0 through 255.
greenThe green component. Valid values are 0 through 255.
blueThe blue component. Valid values are 0 through 255.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.

◆ xtd_drawing_color_from_argb_with_32bits()

xtd_drawing_color xtd_drawing_color_from_argb_with_32bits ( uint32_t  argb)

Creates a xtd_drawing_color class from a 32-bit ARGB value.

Parameters
argbA value specifying the 32-bit ARGB value
Returns
The xtd_drawing_color structure that this method creates.
Remarks
The byte-ordering of the 32-bit ARGB value is AARRGGBB. The most significant byte (MSB), represented by AA, is the alpha component value. The second, third, and fourth bytes, represented by RR, GG, and BB, respectively, are the color components red, green, and blue, respectively.

◆ xtd_drawing_color_from_argb_without_alpha()

xtd_drawing_color xtd_drawing_color_from_argb_without_alpha ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

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.

Parameters
redThe red component. Valid values are 0 through 255.
greenThe green component. Valid values are 0 through 255.
blueThe blue component. Valid values are 0 through 255.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.

◆ xtd_drawing_color_from_handle()

xtd_drawing_color xtd_drawing_color_from_handle ( intptr_t  handle)

Creates a xtd_drawing_color class from native handle.

Parameters
handlethe handle for the new xtd_drawing_color.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.
Remarks
For internal use only.

◆ xtd_drawing_color_from_hsb()

xtd_drawing_color xtd_drawing_color_from_hsb ( float  hue,
float  saturation,
float  brightness 
)

Creates a xtd_drawing_color class from the three HSV component (hue, saturation, and brightness) values.

Parameters
hueThe 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.
saturationThe 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.
brightnessThe xtd_drawing_color lightness. The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

◆ xtd_drawing_color_from_hsl()

xtd_drawing_color xtd_drawing_color_from_hsl ( float  hue,
float  saturation,
float  lightness 
)

Creates a xtd_drawing_color class from the three HSL component (hue, saturation, and lightness) values.

Parameters
hueThe 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.
saturationThe 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.
lightnessThe xtd_drawing_color lightness. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

◆ xtd_drawing_color_from_known_color()

xtd_drawing_color 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.

Parameters
alphaThe alpha value for the new xtd_drawing_color. Valid values are 0 through 255.
redThe red component. Valid values are 0 through 255.
greenThe green component. Valid values are 0 through 255.
blueThe blue component. Valid values are 0 through 255.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.
Exceptions
std::invalid_argumentcolor is not a known_color.

◆ xtd_drawing_color_from_name()

xtd_drawing_color xtd_drawing_color_from_name ( const char *  name)

Creates a xtd_drawing_color class from the specified name of a predefined color.

Parameters
nameA 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.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.
Remarks
A predefined color is also called a known color and is represented by an element of the xtd::drawing::known_color enumeration. If the name parameter is not the valid name of a predefined color, the xtd_drawing_color::from_name method creates a xtd_drawing_color structure that has an ARGB value of 0 (that is, all ARGB components are 0).

◆ xtd_drawing_color_get_brightness()

float xtd_drawing_color_get_brightness ( xtd_drawing_color  color)

Gets the hue-saturation-brightness (HSB) brightness value for the specified xtd_drawing_color structure.

Returns
The brightness of the specified xtd_drawing_color. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

◆ xtd_drawing_color_get_hue()

float xtd_drawing_color_get_hue ( xtd_drawing_color  color)

Gets the hue-saturation-brightness (HSB) hue value, in degrees, for the specified xtd_drawing_color structure.

Returns
The hue, in degrees, of the specified xtd_drawing_color. The hue is measured in degrees, ranging from 0.0 through 360.0, in HSL color space.

◆ xtd_drawing_color_get_lightness()

float xtd_drawing_color_get_lightness ( xtd_drawing_color  color)

Gets the hue-saturation-lightness (HSL) lightness value for the specified xtd_drawing_color structure.

Returns
The lightness of the specified xtd_drawing_color. The lightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

◆ xtd_drawing_color_get_saturation()

float xtd_drawing_color_get_saturation ( xtd_drawing_color  color)

Gets the hue-saturation-brightness (HSB) saturation value for the specified xtd_drawing_color structure.

Returns
The saturation of the specified xtd_drawing_color. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.

◆ xtd_drawing_color_light()

xtd_drawing_color xtd_drawing_color_light ( xtd_drawing_color  color)

Returns a lighter version of the specified color.

Parameters
colorThe color to light.
Returns
the lighter color result.

◆ xtd_drawing_color_light_with_weight()

xtd_drawing_color xtd_drawing_color_light_with_weight ( xtd_drawing_color  color,
double  weight 
)

Returns a lighter version of the specified color.

Parameters
colorThe color to light.
Returns
the lighter color result.

◆ xtd_drawing_color_parse()

xtd_drawing_color xtd_drawing_color_parse ( const char *  color)

Creates a xtd_drawing_color class from the specified name.

Parameters
nameA 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.
Returns
xtd_drawing_color The xtd_drawing_color structure that this method creates.

◆ xtd_drawing_color_to_argb()

uint32_t xtd_drawing_color_to_argb ( xtd_drawing_color  color)

Gets the 32-bit ARGB value of the specified xtd_drawing_color class.

Returns
The 32-bit ARGB value of the specified xtd_drawing_color.
Remarks
The byte-ordering of the 32-bit ARGB value is AARRGGBB. The most significant byte (MSB), represented by AA, is the alpha component value. The second, third, and fourth bytes, represented by RR, GG, and BB, respectively, are the color components red, green, and blue, respectively.

◆ xtd_drawing_color_to_known_color()

xtd_drawing_known_color xtd_drawing_color_to_known_color ( xtd_drawing_color  color)

Gets the xtd::drawing::known_color value of the specified xtd_drawing_color class.

Returns
xtd::drawing::known_color An element of the xtd::drawing::known_color enumeration, if the xtd_drawing_color is created from a predefined color by using either the xtd_drawing_color::from_name method or the xtd_drawing_color::from_known_color method; otherwise, 0.
Remarks
A predefined color is also called a known color and is represented by an element of the xtd::drawing::known_color enumeration. When the xtd_drawing_color::to_known_color method is applied to a xtd_drawing_color structure that is created by using the FromArgb method, xtd_drawing_color::to_known_color returns 0, even if the ARGB value matches the ARGB value of a predefined color. xtd_drawing_color::to_known_color also returns 0 when it is applied to a xtd_drawing_color structure that is created by using the xtd_drawing_color::from_name method with a string name that is not valid.

◆ xtd_drawing_color_to_string()

const char* xtd_drawing_color_to_string ( xtd_drawing_color  color)

Creates a human-readable string that represents this color class.

Returns
string A string that represents this Size.

◆ xtd_drawing_color_to_string_s()

size_t xtd_drawing_color_to_string_s ( char *  string,
size_t  size,
xtd_drawing_color  color 
)

Creates a human-readable string that represents this color class.

Returns
string A string that represents this Size.