Skip to main content

It's a simple package for you to customize the printing color.

Project description

Colorprt

It's a simple package for you to customize the printing color.

Usage

pip install colorprt
from colorprt import colorprt, Back, Fore

colorprt("Hello World", background=Back.RED)

Back stands for background;Fore stands for foreground

Also, you can use a config class to print colored strings.

from colorprt import ColorprtConfig, Mode, Back, Fore

pycolor_config = ColorprtConfig(mode=Mode.BOLD, background=Back.DEFAULT, foreground=Fore.RED)
pycolor_config("I love You!!", end="")

If you just want the ansi colored formatted strings, you can use clrstr class.

from colorprt import clrstr, Mode, Back, Fore, ColorprtConfig

hate_print_config = ColorprtConfig(mode=Mode.UNDER_LINE, background=Back.DEFAULT, foreground=Fore.YELLOW)
print(clrstr("I love You!!", mode=Mode.BOLD, background=Back.DEFAULT, foreground=Fore.RED)
      + clrstr("I hate you", hate_print_config))

Project details


Download files

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

Source Distribution

colorprt-1.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

colorprt-1.0.1-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

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