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.7.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

chromaconsole-0.2.7-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chromaconsole-0.2.7.tar.gz
  • Upload date:
  • Size: 3.2 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.7.tar.gz
Algorithm Hash digest
SHA256 c08dd528fab268b81a131cb86d6d8bee9dd06e2b6ea0f55479304b09bdaa25e2
MD5 fe197c169e941005662b09866c9e95c2
BLAKE2b-256 1b3defc3b510c4ba1a556273d40958e7dec598b85c4cf0fe98598231a4f124f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromaconsole-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c232518b1d4db5bff1c19ed4d6eae4c1a2000d973efc1bc3ff60ebd42f4a5407
MD5 bb720f216461dfb37903da33725bd120
BLAKE2b-256 ddc1fd1709c0fb63cb330cdbc16e7228177e80945631a28c984567033351569c

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