Skip to main content

Consolor provides highlighting functions for terminals.

Project description

Consolor provides highlighting functions for terminals.

It comes with there 3 functions:


Returns a string with the given formatting.


Prints a string with the given formatting.


Overwrites the output of the current line and prints s on the same line without a new line.

All these functions accept the following formatting parameters:

  • bold: bool, default False

  • underline: bool, default False

  • blinking: bool, default False

  • color: str, default None

  • bgcolor: str, default None

Some examples:

import consolor

consolor.print_line('light green', color=consolor.Color.LightGreen)
consolor.print_line('underline', underline=True)
consolor.print_line('green bg', bgcolor=consolor.BgColor.Green)

For more colors and background colors see consolor.Color and consolor.BgColor.

You can also use it in builtin print():

import consolor

print(consolor.Color.Red, 'Red')
print('Red two')
print(consolor.Color.Reset, end='') # You have to handle resetting your self.
print('Not Red')

print(consolor.BgColor.Red, 'Red')
print('Red two', consolor.BgColor.Reset)

To install consolor use pip.

pip install consolor

Bugs and improvements

Feel free to open tickets or send pull requests with improvements. These contributors have done so.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

consolor-0.1.2.tar.gz (3.8 kB view hashes)

Uploaded source

Built Distribution

consolor-0.1.2-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded 3 3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page