Skip to main content

Simple Python package to print & show colored text in the terminal.

Project description

Coloors

A simple Python package to print/show colored text in the terminal. Developed it while doing some side projects.

Installation

pip install coloors

Usage

from coloors import printp, printb, printc, printg, printy, printr, printu, printbld
from coloors import r, b, g, p, c, bld, u, ye

printp("This is purple/rose!")
printb("This is blue!")
printc("This is cyan!")
printg("This is green!")
printy("This is yellow!")
printr("This is red!")
printu("This is underlined!")
printbld("This is bold!")

red_text = r("This text will be red.")
blue_text = b("This text will be blue.")
green_text = g("This text will be green.")
purple_text = p("This text will be purple/rose.")
cyan_text = c("This text will be cyan.")
bold_text = bld("This text will be bold.")
underline_text = u("This text will be underlined.")
yellow_text = ye("This text will be yellow.")

print(red_text)
print(blue_text)
print(green_text)
print(purple_text)
print(cyan_text)
print(bold_text)
print(underline_text)
print(yellow_text)

Functions

The package provides the following functions for printing colored text:

  • printp(s): Prints the string s in purple or rose (depends on your color blindness).
  • printb(s): Prints the string s in blue.
  • printc(s): Prints the string s in cyan.
  • printg(s): Prints the string s in green.
  • printy(s): Prints the string s in yellow.
  • printr(s): Prints the string s in red.
  • printu(s): Prints the string s with underline.
  • printbld(s): Prints the string s in bold.

It also provides functions to return colored strings without immediately printing them:

  • r(s): Returns the string s in red.
  • b(s): Returns the string s in blue.
  • g(s): Returns the string s in green.
  • p(s): Returns the string s in purple.
  • c(s): Returns the string s in cyan.
  • bld(s): Returns the string s in bold.
  • u(s): Returns the string s with underline.
  • ye(s): Returns the string s in yellow.

Dependencies

Python, haha.

License

GNU GENERAL PUBLIC LICENSE

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

coloors-1.0.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

coloors-1.0.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file coloors-1.0.0.tar.gz.

File metadata

  • Download URL: coloors-1.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for coloors-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9e962698761ae5fbae2fd511021aa3d91c2de1656859cecb0bf95c045a62b670
MD5 cab74d008dd1cf1ccd49c8316faea659
BLAKE2b-256 50671e71487dfc96425392e60744dc4140f9d005b1fa2c5d9e6f7efd93f8a55a

See more details on using hashes here.

File details

Details for the file coloors-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: coloors-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.6

File hashes

Hashes for coloors-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d310e18465c9dd739883eabacbdb55a9fd91776032598fbeb59b85b1c664992c
MD5 bef885c7c9f25364847e0dc23dc7500d
BLAKE2b-256 36f69eed6f71b46fcfb69e5e4721813fb5b58ab6a9f5e9a437f79d9aaa128329

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