Skip to main content

TextUI colors for Python.

Project description

Better Crayons: Text UI colors for Python.

pypi build license wheel python

This module is really simple, it gives you colored strings for terminal usage. Included colors are red, green, yellow, blue, black, magenta, cyan, white, and normal ( as well as clean and disable).

Better Crayons is nice because it automatically wraps a given string in both the foreground color, as well as returning to the original state after the string is complete. Most terminal color libraries make you manage this yourself.

example

Arguments include always=True and bold=True.

Features

  • If you call disable(), all future calls to colors will be ignored.
  • If you call normal(), color is reset to default foreground color
  • If the current process is not in a TTY (e.g. being piped), no colors will be displayed.
  • Length of ColoredStrings can be properly calculated.
  • Powered by colorama.

Usage is simple

# red is red, white is white.
>>> print('{} white'.format(better_crayons.red('red')))
red white

That's it!

Installation

$ pip install better_crayons

Download files

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

Files for better-crayons, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size better_crayons-0.0.2-py3-none-any.whl (2.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size better_crayons-0.0.2.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page