InitConsoleColor(pen[, fgcolor, bgcolor])
pen to fgcolor and the background color to bgcolor. The pen could then be set as
the text pen using SetConsoleColor(). See SetConsoleColor for details.
The specified pen must be greater than 0. The number of available pens depends on the console. Typically, 256 pens are available which means that the highest pen number you can use is 255 but for the best compatibility you should use lower pen numbers because not all consoles might have 256 pens.
The fgcolor and bgcolor arguments can be either RGB values or colors allocated using
AllocConsoleColor(). Note that only a few colors are available by default and can be passed
in fgcolor or bgcolor without allocation. These are: #BLACK, #WHITE, #RED, #GREEN,
#BLUE, #YELLOW, #AQUA (cyan), and #FUCHSIA (magenta). If you want to use other colors,
you need to allocate them first using AllocConsoleColor(). See AllocConsoleColor for details.
Note that terminals might choose to use a darkened version of the colors you specify here so don't be surprised if your color appears as grey even though you specified white. Many terminals are configured to treat grey as white. If you want to avoid this, allocate custom colors using AllocConsoleColor().
You must enable advanced console mode using EnableAdvancedConsole() before you can use this function. See EnableAdvancedConsole for details.
#NOCOLOR)#NOCOLOR)
EnableAdvancedConsole()
SetConsoleStyle(#CONSOLESTYLE_BOLD)
InitConsoleColor(1, #BLACK, #WHITE)
SetConsoleColor(1)
ConsolePrint("Hello World")
RefreshConsole()
The code above prints the string "Hello World" in black on white background.