Skip to main content

Make your program attractive by using TerminalColors.

Project description

PyTerminalColor

Create attractive python progams with foreground, background colors and styles.

Installation

Using PyPi

  • with pip
    pip install PyTerminalColor
    

Using git

  • clone repo

    git clone https://github.com/dmdhrumilmistry/PyTerminalColor.git
    
  • Change to PyTerminalColor repo directory

    cd PyTerminalColor
    
  • install PyTerminalColor

    pip install -e .
    

Verify installation

python -m PyTerminalColor

Features

  • Foreground Colors: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, LIGHT_GRAY, CYAN
  • Background Colors: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, LIGHT_GRAY, CYAN
  • Styles: NORMAL, BOLD, ITALIC, UNDERLINE

Usage

  • Import and create an TerminalColor object.
from PyTerminalColor.TerminalColor import TerminalColor


colorize = TerminalColor(fgcolor='YELLOW', bgcolor='RED', style='BOLD')
  • print colored text with default object values
colorize.cprint('TerminalColor')
  • print colored text with other values
colorize.cprint('TerminalColor',use_default=False, fgcolor='YELLOW', bgcolor='BLACK', style='ITALIC')

cprint default values:

use_default = True
fgcolor = 'LIGHT_GRAY'
bgcolor = 'BLACK'
style = 'NORMAL'

License

MIT License

Have any Issues?

Create an issue from Issues Tab

Leave A Star⭐

Connect With Me on:



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

PyTerminalColor-1.0.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

PyTerminalColor-1.0.0-py3-none-any.whl (4.6 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