Skip to main content

a small colorfull module

Project description

Chroma Console

Chroma console is a python package for adding color and style to terminal text output using ANSI escape codes.

Installation

pip install chromaconsole

Functions

Style.bold()
Style.italic()
Style.underline()
Style.strikethrough()
Style.reset()
Style.minecraft(*args)
Color.text(*args)
Color.background(*args)

Example usage

from chromaconsole import Color, Style

print(f"{Color.text(r, g, b)}here is RGB colored text{Style.reset()}")
print(f"{Color.background(r, g, b)}here is RGB colored background{Style.reset()}")

print(f"{Color.text('#rrggbb')}here is HEX colored text{Style.reset()}")
print(f"{Color.background('#rrggbb')}here is HEX colored background{Style.reset()}")

print(f"{Style.bold()}Bold {Style.reset()}")
print(f"{Style.italic()}Italic {Style.reset()}")
print(f"{Style.underline()}Underline {Style.reset()}")
print(f"{Style.strikethrough()}Strikethrough {Style.reset()}")

print(f"{Style.bold()}{Style.italic()}bold+italic {Style.reset()}")
print(f"{Style.minecraft('§','§ahello §4world§r')}")

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

chromaconsole-0.2.4.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

chromaconsole-0.2.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file chromaconsole-0.2.4.tar.gz.

File metadata

  • Download URL: chromaconsole-0.2.4.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for chromaconsole-0.2.4.tar.gz
Algorithm Hash digest
SHA256 06bfe0197b3dc47cb4767cde4872c9dc5032196f653b46c26bc320a51d8fd488
MD5 df503e512aa34dcb3b2ae54060a68ed9
BLAKE2b-256 ae0ec0f8cc4aed08779ee557213bf7eb9ef2a7093efe0dfb0583574f33fb914a

See more details on using hashes here.

File details

Details for the file chromaconsole-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for chromaconsole-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d0dcfe80e3ee5c9471e7ecbfbfb1dfd632820567a825b72ea43409ed55be3842
MD5 4fed7f85087bc9a38ec111a4d019990a
BLAKE2b-256 e673264afc509fe3b0fe45a955cacf13cf5f6eb77591d0104459cb9e0eed1af8

See more details on using hashes here.

Supported by

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