Un paquete para imprimir texto de colores en la terminal de Windows
Project description
░██████╗░██╗██╗░░░██╗███████╗░█████╗░░█████╗░██╗░░░░░░█████╗░██████╗░
██╔════╝░██║██║░░░██║██╔════╝██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗
██║░░██╗░██║╚██╗░██╔╝█████╗░░██║░░╚═╝██║░░██║██║░░░░░██║░░██║██████╔╝
██║░░╚██╗██║░╚████╔╝░██╔══╝░░██║░░██╗██║░░██║██║░░░░░██║░░██║██╔══██╗
╚██████╔╝██║░░╚██╔╝░░███████╗╚█████╔╝╚█████╔╝███████╗╚█████╔╝██║░░██║
░╚═════╝░╚═╝░░░╚═╝░░░╚══════╝░╚════╝░░╚════╝░╚══════╝░╚════╝░╚═╝░░╚═╝
@author: 𓂀 𝒥-𝒳𝒶𝓃𝒹𝑒𝓇 𓂀
@version: 0.1.5
@since: 2024/09/27
@date: 2024/10/7
Imprime texto de colores y con estilos en la terminal
Funcionalidad
Sobreescribe la funcion interna print y añade nuevos parametro:
fore: Recibe un identificador ansi para establecer el color del textoback: Recibe un identificador ansi para establecer un color de fondo el texto.style: Recibe un identificador ansi para establece un stylo en el texto.
Nota: Puede recibir tanto como un numero como una cadena o la secuencia de escape directa.
EJEMPLO DE USO
import givecolor
print('Texto en rojo y fondo blanco', fore='red', back='white')
print('Texto en rojo y fondo blanco', fore=31, back=47)
Podemos importar algunas clases Enum perteneciente a la libreria para poder optener una lista de todos los colores y stylos disponibles
Fore: Enumera los colores de texto disponibles.Back: Enumera los colores de fondo disponibles.Style: Enumero los stylos disponibles que podemos darle al texto.
Nota: Hay varios estilos que no estan añadidos ya que no soportados por ciertas terminales.
EJEMPLO DE USO
from givecolor import Fore, Back, Style
print('Texto en verde y tachado con fondo azul',
fore=Fore.GREEN,
back=Back.BLUE,
style=Style.CROSSED)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file givecolor-0.1.5.tar.gz.
File metadata
- Download URL: givecolor-0.1.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c162c62ba71185e430a9d52386c0ced25589d884ea3624fee39e24f5d6883257
|
|
| MD5 |
4900ebba7bd5e4f3c3991749ab0ce52a
|
|
| BLAKE2b-256 |
c189daa52273107e4d21a0aa13fa787171046cf6bd5d8665204393b2cf329379
|
File details
Details for the file givecolor-0.1.5-py3-none-any.whl.
File metadata
- Download URL: givecolor-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1c3e6d32112e7a3b1a5841dc049e8e4243e06b17b5b6a17cb4f04f9c7ed4227
|
|
| MD5 |
0fb40646d9bd0cdf1fbf1514d2c714ae
|
|
| BLAKE2b-256 |
4e1119afc1d2518cf5cbcde8135d86373cfa111b6210b7d68a283b3530ac1722
|