Skip to main content

PyPI - Python Version PyPI Code style: black

Setup

pip3 install colorifix

Requirements

  • Python 3.6+

Usage

It's very simple to use, just remember three symbols:

  • # to set a color
  • @ to set a style
  • ! to set a background
from colorifix.colorifix import paint

paint("[#red]String to color in red [#blue]and in blue")
paint("[#yellow !green]One color and background at a time,[#red #cyan] last set win")
paint("[@bold @underline]Many styles in one [@dim]string")
paint("[#44 !123]You can use int bash colors")

Examples

Remove styles

You can remove every part of a style with the symbol / followed by the symbol of the style you want to remove. You can use it alone to remove every styles, it will remove every styles anyway at the end of the string.

paint("[#yellow @underline]This is a yellow underline string[/@], now only yellow[/].")

Remove example

Print or not print

You can choose to print the string or just save it in a variable.

colored_str = paint("[!black @dim]Hello Color![/]") # save it
ppaint("[!42]Again![/]") # print it directly
paint("[!42]Again![/]", False) # print it from main function, same as above

Colors

To disaply all different colors, you can use the function sample

from colorifix.colorifix import sample

sample()  # base colors
sample(complete=True)  # to display all bash int colors

Base colors

Metadata

Release files for colorifix 2.0.4

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

Source distribution (sdist)

Source distribution for colorifix 2.0.4
File Size Uploaded Provenance Actions
colorifix-2.0.4.tar.gz 4.4 kB Without provenance Details for colorifix-2.0.4.tar.gz

Release files / colorifix-2.0.4.tar.gz

Download URL colorifix-2.0.4.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
38fe5ed76dbdfa06efeffb392e0532e76abddd70c54d90646ea40b982f748f0b
BLAKE2b-256 checksum
How to use checksums
75f50ffd76c05f8aa537045c02a58b1ef097ad5e6a029851d5e8a9357d243039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.10

Security for colorifix 2.0.4

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