Skip to main content

Latest Release pipeline status coverage report Python Code style: flake8 Type checked: mypy Linting: pylint License: MIT

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.

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.3.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.3.2
File Size Uploaded
colored-2.3.2.tar.gz 17.1 kB Details

Built distribution (wheel)

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

Total release size: 37.4 kB

Release files / colored-2.3.2.tar.gz

Download URL colored-2.3.2.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d6b7f0737a732c54c92b271f2932c91e386238c8b6ded49d4180eed44eb50684
BLAKE2b-256 checksum
How to use checksums
7ab6c07f766b24cc3c92e3e24339ccacbc949d004f0fde759cdf24727c5c02bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.0

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

Download URL colored-2.3.2-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f192e0545b7214f5479031495d14f4a46b29695650c46a50bf5bb8fb5cbd7893
BLAKE2b-256 checksum
How to use checksums
ee932cfa674b84be707dc0b1653b00f7da9270c78a8fd43f7d80f0d8b1f5ead9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.0

Release history Release notifications | RSS feed

This release

2.3.2 This release

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

2.2.2

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