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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file colored-2.1.1.tar.gz.

File metadata

  • Download URL: colored-2.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for colored-2.1.1.tar.gz
Algorithm Hash digest
SHA256 ef37e90807a078293deda404f46596100fe941bf5af26e0180d25a99c7722b33
MD5 d37ccf2f8382ddd8a38a9bf241192486
BLAKE2b-256 311e3905b30016da892732662aedf828c80f348fd7bf956718d7ef7655cfdcbc

See more details on using hashes here.

File details

Details for the file colored-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: colored-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for colored-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64a2eb8443def36dd376df3fce5be1d00a3d06f96997de158039075c5e02f069
MD5 bfdd9b1a4a8507aff0343ceceaae6b35
BLAKE2b-256 5c1ec2173cb2f3d228cd45574be4462371b16620256d808d05be116031b91299

See more details on using hashes here.

Supported by

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