Skip to main content

Colored text for terminal

Project description

TINGE

Output colored text in terminal

Setup and Installation

Using pip

pip install tinge

For developers / Contributors

  1. Clone this repository
git clone https://github.com/g-paras/tinge.git
cd tinge
  1. Install the module
python setup.py install

Installation Complete :thumbsup:

Example

Foreground

from tinge import colored

print(colored("This is red text", color="red"))

Foreground and Background

from tinge import colored

print(colored("Green on white", color="green", on_color="white"))

Styling

underline & italic are not supported on windows

from tinge import italic, underline, bold

print(italic("This is italic"))
print(underline("This is underlined"))
print(bold("This is bold"))

Styling with Foreground and Background

from tinge import colored, italic, underline, bold

print(
    underline("This is red on white",
    color="red",
    on_color="white")
)

print(
    italic("This is italic",
    color="green")
)

Specific Use Case

from tinge import warn, error, info, success

print(warn("This is warning")) # yellow bold text
print(info("This is to inform")) # blue bold text
print(success("Success", strong=False)) # green normal text
print(error("Error: File Missing")) # red bold text

Available Colors and Styles

Foreground(color) Background(on_color)
Black Grey
Red Red
Green Green
Yellow Yellow
Blue Blue
Magenta Magenta
Cyan Cyan
White White
Style Bold Italic Underline
Function Parameters Use for
colored text8, color, on_color Colored text
italic text8, color, on_color Italic colored text
underline text8, color, on_color Underlined colored text
bold text8, color, on_color Bold colored text
warn text8 Yellow Bold Warning text
error text8 Red Bold Error text
info text8 Blue Bold Information text
success text8 Green Bold Success text

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

Tinge-0.0.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

Tinge-0.0.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file Tinge-0.0.4.tar.gz.

File metadata

  • Download URL: Tinge-0.0.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for Tinge-0.0.4.tar.gz
Algorithm Hash digest
SHA256 10916896f5e1da708bebff29347a21ac0d0afd964c1765f2187bc3e5553ab354
MD5 72548070ed735da68ffb95936315808c
BLAKE2b-256 bc9ca8d1e035dacccc680c2a23abe4ed6087d689bbcc4f66899f3556ac366b6d

See more details on using hashes here.

File details

Details for the file Tinge-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: Tinge-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for Tinge-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 53e42fc317796b1e77d940b6fcdc0b457069c4cf7f43c3d770100d1f06985e22
MD5 55847f40c223f4d798bb660125c14c65
BLAKE2b-256 8da1a65d8d1aca03e45c7fe560ff03d6f258bdadfc39a32550e4913a330d3152

See more details on using hashes here.

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