Skip to main content

Un paquete para imprimir texto de colores en la terminal de Windows

Reason this release was yanked:

Fallo al usar sep y end en el print

Project description

░██████╗░██╗██╗░░░██╗███████╗░█████╗░░█████╗░██╗░░░░░░█████╗░██████╗░
██╔════╝░██║██║░░░██║██╔════╝██╔══██╗██╔══██╗██║░░░░░██╔══██╗██╔══██╗
██║░░██╗░██║╚██╗░██╔╝█████╗░░██║░░╚═╝██║░░██║██║░░░░░██║░░██║██████╔╝
██║░░╚██╗██║░╚████╔╝░██╔══╝░░██║░░██╗██║░░██║██║░░░░░██║░░██║██╔══██╗
╚██████╔╝██║░░╚██╔╝░░███████╗╚█████╔╝╚█████╔╝███████╗╚█████╔╝██║░░██║
░╚═════╝░╚═╝░░░╚═╝░░░╚══════╝░╚════╝░░╚════╝░╚══════╝░╚════╝░╚═╝░░╚═╝

@author: 𓂀 𝒥-𝒳𝒶𝓃𝒹𝑒𝓇 𓂀
@version: 0.1.4
@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 texto
  • back: 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

givecolor-0.1.4.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

givecolor-0.1.4-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file givecolor-0.1.4.tar.gz.

File metadata

  • Download URL: givecolor-0.1.4.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

Hashes for givecolor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0420122b8bd1ad61fff4658f6640e6bf5e93bd413fd03dd2c8c4f0d2d3fec2e0
MD5 ae81b0e4e86d0798f9c354327c9471c7
BLAKE2b-256 3b91fff3a67d70e6d25a153caba79113745f2a6f8f3d7521faf4837ff5b24e8d

See more details on using hashes here.

File details

Details for the file givecolor-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: givecolor-0.1.4-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

Hashes for givecolor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a33c589eb445f99dbb7cd6d024f28c8d4d581e69f404333c3a054ff5512e4c
MD5 1e8d8ad7e383c5643383163cb9ffa383
BLAKE2b-256 3c699b878b25f60654b2294331e6f4d2dbefa1279c8e544e47a7d2d082b6c208

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page