The FrontGroundColor Module

It has 610 methods with color names and an additional function called set_default_style(). It is simple to utilize; all we have to do is call the names of the colors and import the ForeGroundColor function from Designer. The colorful ForeGround text will be returned.

BackGround Module set_default_style() function

It only requires one parameter of the type int, and its return type is None. It is employed to alter the default values or set the style’s value to all colors. Using this function we can set a single style to all of the functions.

Example 1:

To print the colorful foreground text

Python3




from Designer.ForeGroundColor import *
 
print(red("geeks")+brown("for")+blue("geeks"))
print(brown("it's"),pink("pink"),green("interesting"))
print(red("hello"+pink("world")))


Output:

 

Example 2: 

To make all of the text bold, use this set_default_style() method.

Python3




from Designer.ForeGroundColor import *
 
set_default_style(3)
print(green("This is"),blue("the")+brown3(" example"))
print(wheat2("to"),pink("set the default"),green("style"))
 
set_default_style(1)
print(green("This is"),blue("the")+brown3(" example"))
print(wheat2("to"),pink("set the default"),green("style"))
 
set_default_style(2)
print(green("This is"),blue("the")+brown3(" example"))
print(wheat2("to"),pink("set the default"),green("style"))
 
set_default_style(4)
print(green("This is"),blue("the")+brown3("example"))
print(wheat2("to"),pink("set the default"),green("style"))
 
set_default_style(5)
print(green("This is"),blue("the")+brown3("example"))
print(wheat2("to"),pink("set the default"),green("style"))


Output:

diverse kinds of styles

Python terminal processing with TerminalDesigner module

In this article, we’ll look at how to use TerminalDesigner to produce colorful text for the terminal in Python. This module is quite compact. This module can be used to change the font’s color, style, and background, print images onto terminals for video playback, convert images to ASCII art and serve a variety of other functions. You can install the TerminalDesigner module in Python 3 by using the following command:

pip install TerminalDesigner

This module contains 5 Python files:

  • BackGroundColor Module
  • ForeGroundColor Module
  • HexName Module
  • RandomColor Module
  • General Module

Similar Reads

The BackGroundColor Module

The set_default_stylebg() method in the Background Module:...

The FrontGroundColor Module

...

HaxName Module

...

RandomColor Module

It has 610 methods with color names and an additional function called set_default_style(). It is simple to utilize; all we have to do is call the names of the colors and import the ForeGroundColor function from Designer. The colorful ForeGround text will be returned....

General Module

...

Contact Us