Skip to main content

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. Colored now supports RGB color mode. As "true color" graphic cards with 16 to 24 bits of color became common, applications began to support 24-bit colors. Terminal emulators supporting setting 24-bit foreground and background colors with escape sequences include Xterm, KDE's Konsole, and iTerm, as well as all libvte based terminals, including GNOME Terminal.

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'
>>> 
>>> Fore.rgb('100%', '50%', '30%')
'\x1b[38;2;255;130;79m'
>>>
>>> print(f'{Fore.white}{Back.green}Colored is Awesome!!!{Style.reset}')

!!! success

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

!!! info We happily welcome contributions!

Donate

Did you know that we developers love coffee?

paypal

Metadata

Release files for colored 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colored 2.2.2
File Size Uploaded
colored-2.2.2.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colored 2.2.2
File Interpreter ABI Platform
colored-2.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / colored-2.2.2.tar.gz

Download URL colored-2.2.2.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dfc918ed2261cea8794eef4e9f8fccc41e1db9293d9634acc009b860f4b812b9
BLAKE2b-256 checksum
How to use checksums
1187e696653820d8845a791b0d72dd5a7cae6f9fd3466df64208ed08a3d70fed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / colored-2.2.2-py3-none-any.whl

Download URL colored-2.2.2-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7790b4557c8911ac877fff211a3ebe8b8655d4f0281dbbe1930d33ff23f96ed
BLAKE2b-256 checksum
How to use checksums
3d0315850bec2dcbccaa9c1d9779acd26e3c020b6c3528b086a3c5ecfaec956c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

This release

2.2.2 This release

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.93

1 release file

1.3.92

1 release file

1.3.9

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page