Skip to content

caizixian/crayons

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Crayons: Text UI colors for Python.

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

Features

  • If you call disable(), all future calls to colors will be ignored.
  • 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(crayons.red('red'))
red white

That's it!

Installation

$ pip install crayons

About

Text UI colors for Python.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%