xtd 0.2.0
Loading...
Searching...
No Matches
console_background_color.cpp

Shows how to use xtd::console::background_color property.

#include <xtd/console>
using namespace xtd;
auto main() -> int {
console::background_color(console_color::dark_blue);
console::write_line(" ");
console::background_color(console_color::blue);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_green);
console::write_line(" ");
console::background_color(console_color::green);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_cyan);
console::write_line(" ");
console::background_color(console_color::cyan);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_red);
console::write_line(" ");
console::background_color(console_color::red);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_magenta);
console::write_line(" ");
console::background_color(console_color::magenta);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_yellow);
console::write_line(" ");
console::background_color(console_color::yellow);
console::write_line(" ");
console::write_line();
console::background_color(console_color::dark_gray);
console::write_line(" ");
console::background_color(console_color::gray);
console::write_line(" ");
console::write_line();
console::background_color(console_color::black);
console::write_line(" ");
console::background_color(console_color::white);
console::write_line(" ");
console::reset_color();
}
// This code produces the following output with colors :
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10