Skip to main content

QuickColor

QuickColor is a Python library providing tags for color formatting sections of printable content. The tags can be flexibly used as part of any string as they simply resolve to the ASCII color codes interpreted by your terminal or terminal emulator.

Installation

Use the package manager pip to install quickcolor.

pip install quickcolor

Library Usage For Color Application

from quickcolor.color_def import color

# colorize printable content
print(f"{color.CGREEN2}This text is bold green{color.CEND}")
from quickcolor.color_def import colors

# alternate method to colorize printable content
print(f"Formatting this phrase part to {colors.fg.yellow}display yellow{colors.off}")

Library Usage For Color Stripping

from quickcolor.color_filter import strip_ansi_esc_sequences_from_string

testString = f'{color.CYELLOW2}Yellow String!{color.CEND}'
print(testString)
print(f'No longer a {strip_ansi_esc_sequences_from_string(testString)}')
from quickcolor.color_filter import strip_ansi_esc_sequences_from_input

testString = f'{color.CBLUE2}Blue String!{color.CEND}'
testBytes = testString.encode(encoding="utf-8")
print(testString)
print(testBytes)
print(f'No longer a {strip_ansi_esc_sequences_from_input(stringOrBytes = testBytes)}')

CLI Utility

The following CLI is included with this package for visualizing available color fields and code combinations.

# qc -h
usage: qc [-h] {shell.colors,color.fields,strip.color.string,strip.color.input} ...

-.-.-. Color attributes for python scripts

positional arguments:
  {shell.colors,color.fields,strip.color.string,strip.color.input}
    shell.colors        display a color chart for current shell
    color.fields        display class color fields
    strip.color.string  strip color codes from a string
    strip.color.input   strip color codes from a byte input

options:
  -h, --help            show this help message and exit

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

License

MIT

Acknowledgements

Inspiration for the color names came from this StackOverflow reply. The color grid method inspiration came from this StackOverflow reply. The regex content for the strip methods are also floting around StackOverflow.

Metadata

Release files for quickcolor 0.1.3

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

Source distribution (sdist)

Source distribution for quickcolor 0.1.3
File Size Uploaded Provenance Actions
quickcolor-0.1.3.tar.gz 7.0 kB Without provenance Details for quickcolor-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 14.4 kB

Release files / quickcolor-0.1.3.tar.gz

Download URL quickcolor-0.1.3.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
15fa9009c2afd04c8854e6dc26329ae73331771f136decd6bb1e45c0f9ef3fe2
BLAKE2b-256 checksum
How to use checksums
9c6e0d116178ef531093a71db23dc26614edf0714842a4c3a2f2dc45c5ba9a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / quickcolor-0.1.3-py3-none-any.whl

Download URL quickcolor-0.1.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
253f39e9876b8eef0a0bf697d4cde984321e777693a0dcb8145117c82ee1135e
BLAKE2b-256 checksum
How to use checksums
05186ef4b2da5df8ff4a3b423b791ee3858e91d4dcd24880cdb033a2d2130840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for quickcolor 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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