Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple Python module to colorize your Linux terminal

Project Description

clicolors - Command Line Interface::Colors


>>> from clicolors import colorize

Example 1

>>> print colorize('Example text 1', fg='blue',bg='red',attr='bold')

Example 2

>>> print colorize('Example text 2', 'blue','red','bold')

Example 3

>>> print colorize('Example text 3', fg='yellow')

Example 4

>>> print colorize('Example text 4', 'yellow')

Example 5

>>> print colorize('Example text 5', bg='green')

Example 6

>>> print colorize('Example text 6',attr='underline')

Example 7

>>> print colorize('Example text 6',bg='cyan',attr='underline',fg='black')

Example: clicolors Demo

>>> from clicolors import colorize, COLORS, ATTRIBUTES
>>> print colorize('clicolors : A simple Python module to colorize your Linux terminal',fg='black',bg='white',attr='underline')
>>> print ('Foreground: '+' '.join([colorize(color, fg=color) for color in COLORS]))
>>> print ('Background: '+' '.join([colorize(color, bg=color) for color in COLORS]))
>>> print ('Attributes: '+' '.join([colorize(attributes, attr=attributes) for attributes in ATTRIBUTES]))

Release History

This version
History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(2.2 kB) Copy SHA256 Hash SHA256
Source Apr 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting