Skip to main content

Give your print output the tint it deserves!

Project description

tinted

Give your print output the tint it deserves! Give colors, styles, and more to the console, all with a simple markup language.

Installation

pip install tinted

Usage

From a Python script:

from tinted import tint

print(tint('Hello, [bold]world![/]'))

From a shell:

echo "Hello, [bold]world![/]" | tinted

Basic syntax

Strings can be styled easily with an HTML-like syntax.

[bold][blue]Tinted[/] is [underline]cool[/]![/]

[...] denotes a starting tag, where ... is a tag name.

[/...] indicates a closing tag. Tag names are not necessary, and are ignored if they are included.

Tags

All of the available tags are listed below.

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • lightgray
  • darkgray
  • lightred
  • lightgreen
  • lightyellow
  • lightblue
  • lightmagenta
  • lightcyan
  • white

Background colors

Prefix any of the colors above with bg. Eg. bglightred.

Styles

  • bold
  • dim
  • italic
  • underline
  • blink
  • reverse
  • hidden

Escaping tags

To escape a tag, simply include [] somewhere inside.

[[]blue]These tags will be shown[[]/]

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

tinted-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinted-1.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file tinted-1.0.1.tar.gz.

File metadata

  • Download URL: tinted-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for tinted-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b19e1ff4ef8f77d0b612b8ad7b767fe7f786eb70502e37ae0da852cba099302e
MD5 6488b298c1b6876db44750d77aa37904
BLAKE2b-256 d632b790da9a245a2059c131ff6e84790f0e228ef27a6ca4a5aca84fb1d11ec5

See more details on using hashes here.

File details

Details for the file tinted-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tinted-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for tinted-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c54fa7ae614f0b413a68d25e105ae554d6c0a34651b2629e7702cd9c05a7f9a
MD5 5bde50d05bc912bb1bc1f756669dc65f
BLAKE2b-256 7f2b7272ff40b1aad5dec0a7937753a6cca4a88f2c9eb39603af90821a5b24a2

See more details on using hashes here.

Supported by

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