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.2.0.tar.gz (12.7 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.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for colored-2.2.0.tar.gz
Algorithm Hash digest
SHA256 a6fe8517b81510cdb47a11fd91da04b3a4eabb49f9025b1c9adba2fa7f2ef2f5
MD5 798347b66600ff4614537e935a7ea37b
BLAKE2b-256 5aac1bd8fea22728659417bad6af3f0db39b625a82324fe1e918d81aa51e9837

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for colored-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1394ade3ecbbbaa66c8e4e17b22e927e3fa969316bcc99874a8339108ee57913
MD5 cd33567ff9d4f7a68305f8c9b50e4f68
BLAKE2b-256 63bbd42b490a3ecbd7652b8f868fd2498f6bc53787e51f77ea711c9df00b7384

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