Skip to main content

Change the Python terminal text color.

Project description

Python_Version License

Pypi_Version Pypi_Package

TerminalColor is used to change the color of the text displayed on the Python terminal.

Brightnesses(3/4bit) and Bit modes(8bit, 24bit)

  • dark

  • light

  • 8bit

  • 24bit or rgb


  • red

  • green

  • yellow

  • blue

  • magenta

  • cyan

Text Types

  • bold

  • italic

  • underline

3/4bit color mode

  • ctext(color=”brightness-color_name”)

8bit color mode

  • ctext(color=”8bit-color_code”)

24bit color mode

  • ctext(color=”24bit-r;g;b”)

  • ctext(color=”rgb-r;g;b”)

Example Code

from terminalcolor import ctext, cprint


# color
print(ctext(text="example", color="dark-blue"))
# background color
print(ctext(text="example", bg_color="light-blue"))
# single text type
print(ctext(text="example", text_type="bold"))
# multiple text type
print(ctext(text="example", text_type=["italic", "underline"]))

# 8bit color mode
print(ctext(text="example", color="8bit-231"))
# 24bit color mode
print(ctext(text="example", color="24bit-91;92;239"))
print(ctext(text="example", color="rgb-91;92;239"))


cprint(text="example", color="light-yellow", bg_color="dark-blue", text_type="bold")

Project details

Download files

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

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

terminalcolor-1.0.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page