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.0-4.tar.gz (3.4 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.0-4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file tinted-1.0.0-4.tar.gz.

File metadata

  • Download URL: tinted-1.0.0-4.tar.gz
  • Upload date:
  • Size: 3.4 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.0-4.tar.gz
Algorithm Hash digest
SHA256 3dc04697785417f753e8b197fc01efcdbba1116fcd440f5d3ff4c7b55135b21e
MD5 c867db92c68a25b38e88b7ab6272b3b5
BLAKE2b-256 f89e62366901058abdc44bf88c47c770cb9ba8f3a3a04f145b586b9bbb17b632

See more details on using hashes here.

File details

Details for the file tinted-1.0.0-4-py3-none-any.whl.

File metadata

  • Download URL: tinted-1.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.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.0-4-py3-none-any.whl
Algorithm Hash digest
SHA256 11432e08417e5d22c0c300a1a3070cefaeb474314c43541cca495a005747f7ce
MD5 686b60a625ba816e759775d8ad11d6f0
BLAKE2b-256 7f908540d3052bd136cde35c84036e8203ba903cc312098c6a004ff0eec78797

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