colored
Colored is a simple Python library (current version 2.3.2) for adding color and formatting to terminal output. It provides a collection of color codes and names, supporting 256-color terminal setups and modern RGB color modes. It maintains an active development status with regular updates, having released version 2.3.2 on March 28, 2026.
Warnings
- gotcha Always remember to apply `Style.reset` after using any colors or formatting. Failing to do so can leave your terminal in a permanently colored or formatted state, affecting subsequent output.
- gotcha While `colored` supports 256-color and RGB (true color) modes, not all terminal emulators fully support these advanced features. Older or simpler terminals might only display 8/16 ANSI colors or render escape sequences as plain text.
- deprecated The syntax and API have remained relatively stable. Major breaking changes are not widely documented for recent versions. However, `colored` introduced RGB color support in recent versions. Code relying on this feature will not work with older `colored` versions that predate RGB support.
Install
-
pip install colored
Imports
- Fore
from colored import Fore
- Back
from colored import Back
- Style
from colored import Style
Quickstart
from colored import Fore, Back, Style
print(f'{Fore.white}{Back.green}Colored is Awesome!!!{Style.reset}')
print(f'{Fore.rgb(255, 100, 50)}This is a true color text.{Style.reset}')