Skip to main content

Small package to facilitate colored terminal output.

Project description

Python module to facilitate effortless color terminal output.

Installation

Chromaprint requires Python 3.X.

Install via pip with pip install chromaprint

Usage

from chromaprint import print
print('green on magenta', fg='green', bg='magenta')

It’s that easy.

Chromaprint contains one property colors and two methods print and set_default.

colors

chromaprint.colors is a tuple containing the names of all available colors. Attempts to use colors not in this tuple will raise an exception.

print()

The print() method functions the same as Python’s built-in print method. Simply pass any strings you wish to print with the foreground color as fg='green' and background color as bg='magenta'. Color selections only apply to a single print, so the next print call will use the default colors. You can change the default colors using chromaprint.set_default()

set_default()

A custom set of default colors may be specified and changed at will. Simply call set_default() using the same syntax as chromaprint.print(), ie chromaprint.set_default(bg='green', fg='magenta'). You may set either bg, fg, or both. To return to the system default color output pass bg='default', fg='default'

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

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

Source Distribution

chromaprint-0.5.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

chromaprint-0.5-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file chromaprint-0.5.tar.gz.

File metadata

  • Download URL: chromaprint-0.5.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for chromaprint-0.5.tar.gz
Algorithm Hash digest
SHA256 77833e89e350a485dc9c41f55b22169d36197b73fe639f16d2ecf5b983f02d01
MD5 471ce82e7d69146eb30bba4c3a638ada
BLAKE2b-256 a2e29fe5d05767c677b75a003a323cb7baaabc2243dfd311b29e1804c65b140a

See more details on using hashes here.

File details

Details for the file chromaprint-0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for chromaprint-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1cb68ec49103d89fcb5f432d461921ede1aa511004b6649f6d699bc224b78231
MD5 39ecec9beb3ceefe5775552d60601c38
BLAKE2b-256 19c039ed246555585599c174db4ee2d61a89c0b80dee0f40b38f64f2c6ecdfd4

See more details on using hashes here.

Supported by

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