xtd
0.2.0
console_background_color2.cpp
Shows how to use
xtd::console::background_color
method.
#include <xtd/background_color>
#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:
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
Generated on Mon Oct 9 2023 14:41:55 for xtd by
Gammasoft
. All rights reserved.