#include <xtd/xtd>
auto format =
"| {,-26} | {,-7} | {,-28} | {,-27} | {,-27} | {,-24} | {,-18} | {,-8} |";
auto print_line() {
println(
::format,
string(
'-', 26),
string(
'-', 7),
string(
'-', 28),
string(
'-', 27),
string(
'-', 27),
string(
'-', 24),
string(
'-', 18),
string(
'-', 8));
}
auto print_title() {
print_line();
println(
::format,
"Name",
"Hex",
"CMYK",
"HSL",
"HSV",
"HTML",
"RGB",
"Win32");
print_line();
}
}
auto main() -> int {
print_title();
print_line();
}
static auto to_hsv(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an HSV string color representation.
static auto to_hsl(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an HSL string color representation.
static auto to_rgb(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an RGB string color representation.
static auto to_hex(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an HEX string color representation.
static auto to_html(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an HTML string color representation.
static auto to_win32(const xtd::drawing::color &value) noexcept -> xtd::int32
Translates the specified xtd::drawing::color structure to a Windows color.
static auto to_cmyk(const xtd::drawing::color &value) noexcept -> xtd::string
Translates the specified xtd::drawing::color structure to an CMYK string color representation.
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:52
auto name() const noexcept -> xtd::string
Gets the name of this xtd::drawing::color.
static auto get_colors() noexcept -> const xtd::array< xtd::drawing::color > &
Gets an array of colors.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
auto println(FILE *file) -> void
Writes the current line terminator to the file output stream using the specified format information.
Definition println.hpp:15