#include <xtd/console>
auto main() -> int {
auto colors = {
console_color::black,
console_color::dark_blue,
console_color::dark_green,
console_color::dark_cyan,
console_color::dark_red,
console_color::dark_magenta,
console_color::dark_yellow,
console_color::gray,
console_color::dark_gray,
console_color::blue,
console_color::green,
console_color::cyan,
console_color::red,
console_color::magenta,
console_color::yellow,
console_color::white};
console::write_line(
"All the foreground colors except {}, the background color:", current_background);
for (auto color : colors) {
if (color == current_background) continue;
}
console::write_line(
"All the background colors except {}, the foreground color:", current_foreground);
for (auto color : colors) {
if (color == current_foreground) continue;
}
}
static console_color background_color()
Gets the background color of the console.
static console_color foreground_color()
Gets the foreground color of the console.
static bool reset_color()
Sets the foreground and background console colors to their defaults.
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
@ black
The color black.
Definition console_color.hpp:24
@ dark_blue
The color dark blue.
Definition console_color.hpp:26
@ blue
The color blue.
Definition console_color.hpp:42
@ dark_gray
The color dark gray.
Definition console_color.hpp:40
@ magenta
The color magenta (purplish red).
Definition console_color.hpp:50
@ dark_green
The color dark green.
Definition console_color.hpp:28
@ cyan
The color cyan (blue-green).
Definition console_color.hpp:46
@ dark_red
The color dark red.
Definition console_color.hpp:32
@ green
The color green.
Definition console_color.hpp:44
@ dark_magenta
The color dark magenta (dark purplish-red).
Definition console_color.hpp:34
@ red
The color red.
Definition console_color.hpp:48
@ dark_cyan
The color dark cyan (dark blue-green).
Definition console_color.hpp:30
@ gray
The color gray.
Definition console_color.hpp:38
@ yellow
The color yellow.
Definition console_color.hpp:52
@ white
The color white.
Definition console_color.hpp:54
@ dark_yellow
The color dark yellow (ochre).
Definition console_color.hpp:36
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8