Skip to main content

Simple python library for color and formatting to terminal

Project description

About

Colored, it's a simple Python library for color and formatting in terminal. Collection of color codes and names for 256 color terminal setups.

A list of 256 colors for Xterm, containing an example of the displayed color, Xterm Name, Xterm Number and HEX.

The colors work with most terminals and terminals emulators. ANSI/VT100 escape sequences can be used in every programming languages.

Colored is powerful and easy to use:

>>> from colored import Fore, Back, Style
>>>
>>> Fore.red
'\x1b[38;5;1m'
>>>
>>> Back.red
'\x1b[48;5;1m'
>>>
>>> Style.reset
'\x1b[0m'
>>> 
>>> print(f'{Fore.white}{Back.green}Colored is Awesome!!!{Style.reset}')

>>> Colored is Awesome!!!

Installing

Open up a terminal and install colored with pip command:

$ pip install colored

Alternatively, you can grab the latest source code from GitLab:

$ git clone https://gitlab.com/dslackw/colored.git
$ cd colored
$ pip install .

Usage

The User Guide is the place to go to learn how to use the library.

The API Reference documentation provides API-level documentation.

License

colored is made available under the MIT License. For more details, see here.

Contributing

We happily welcome contributions!

Donate

Did you know that we developers love coffee?

Donate me a coffee ☕ ⬇

paypal

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

colored-2.1.1.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

colored-2.1.1-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

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