Skip to main content

clicolor

PyPI version Build Status

Quick python reference for terminal color escape codes

Usage

Install options:

  • Install the package clicolor

  • Add as a submodule

git submodule add https://github.com/camas/clicolor
  • Or just copy cli.py and LICENSE somewhere

Then from clicolor.cli import CLI, ...

Examples

print(f"{CLI.BG_YELLOW}{CLI.GREEN}Green on yellow.{CLI.RESET}")

Green text on yellow background example

print(f"{CLI.BOLD}{CLI.RED}Bold red.{CLI.RESET}")

Bold red text example

print(f"{CLIT.bg(128,0,0)}{CLIT.fg(255,99,71)}Truecolor tomato red on maroon red background{CLI.RESET}")

Truecolor red example

test.py

use test.py to run a variety of tests including modifiers, 8/16 colors, 256 colors and Truecolors.

Metadata

Release files for clicolor 1.0.7

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

Source distribution (sdist)

Source distribution for clicolor 1.0.7
File Size Uploaded
clicolor-1.0.7.tar.gz 6.6 kB Details

Built distribution (wheel)

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

Total release size: 13.7 kB

Release files / clicolor-1.0.7.tar.gz

Download URL clicolor-1.0.7.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cdd13b78654a6bb06486597c5292cdf0fe482cea1025e854b5256f0d159cd49a
BLAKE2b-256 checksum
How to use checksums
9e2d40a4af055e17da98be4496b30d4b018d705aeccdee77578fb2a2891390f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release files / clicolor-1.0.7-py3-none-any.whl

Download URL clicolor-1.0.7-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6262b22c5d46186d8322616bd85524a56773fa29fdb20fe488ffc7d21f798096
BLAKE2b-256 checksum
How to use checksums
f57db0a027dab665dad681b02c1c8ddb346a3afcaa57240be6f7467c613be94f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

1 release file

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

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