✏️ zpp_color
Informations
Librairie pour la colorisation de texte dans un terminal.
Permet de modifier la couleur du texte, la couleur de fond et le style.
Prise en charge de 256 couleurs.
Sélection de la couleur avec le nom, l'id ou une combinaison RGB
Prérequis
- Python 3
Installation
pip install zpp_color
Utilisation
Conseil d'importation du module
Depuis Pypi
from zpp_color import fg, bg, attr
Depuis le code source
from color import fg, bg, attr
Modification de la couleur du texte
Avec le nom
print(f"{fg('blue')}Ceci est un texte en bleu{attr(0)}")
Avec l'id
print(f"{fg(3)}Ceci est un texte en bleu{attr(0)}")
Avec un code RGB
print(f"{fg('0,0,255')}Ceci est un texte en bleu{attr(0)}")
NOTE: Toujours rajouter attr(0) Ã la fin du texte, sinon la couleur s'appliquera pour les lignes suivantes.
Modification de la couleur de fond
Avec le nom
print(f"{bg('red')}Ceci est un texte avec un fond rouge{attr(0)}")
Avec l'id
print(f"{bg(1)}Ceci est un texte avec un fond rouge{attr(0)}")
Avec un code RGB
print(f"{bg('255,0,0')}Ceci est un texte avec un fond rouge{attr(0)}")
Modification du style du texte
Avec le nom
print(f"{attr('italic')}Ceci est un texte en italic{attr(0)}")
Avec l'id
print(f"{attr(3)}Ceci est un texte en italic{attr(0)}")
Lister les possibilités
Lister les couleurs possibles
zpp_color.list_fg()
zpp_color.list_bg()
Lister les styles possibles
zpp_color.list_attr()
Metadata
Release files for zpp_color 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zpp_color-1.0.4.tar.gz | 4.7 kB | Without provenance | Details for zpp_color-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zpp_color-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for zpp_color-1.0.4-py3-none-any.whl |
Total release size: 10.1 kB
Release files / zpp_color-1.0.4.tar.gz
| Download URL | zpp_color-1.0.4.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cd8382d0aa3f9374eb8ad8bc41739ab4c91041ca95f290e3677b37885fd71a9
|
|
BLAKE2b-256 checksum How to use checksums |
b5aba750530b9315f58ea4e9c90a5d8bd653243f03febf00a4938709ba380c98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
nexus/0.5.0 CPython/3.12.4 Windows/11
|
Release files / zpp_color-1.0.4-py3-none-any.whl
| Download URL | zpp_color-1.0.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5874a09b2cdc01415433885ab1be4a30e78da218c825cd20502f95ab7c64870
|
|
BLAKE2b-256 checksum How to use checksums |
d9a541c844d0a5beac4798dc179dff5b7f56f0e2723ecce7ea040919106b30fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
nexus/0.5.0 CPython/3.12.4 Windows/11
|
Security for zpp_color 1.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.