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

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

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