Skip to main content

A small colorful module to change text colors in terminal

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.negative()
Style.normal()
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.9.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

chromaconsole-0.2.9.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chromaconsole-0.2.9.1.tar.gz
  • Upload date:
  • Size: 3.5 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.9.1.tar.gz
Algorithm Hash digest
SHA256 e7aa515b1886ec85ba0b763c4d858553f8814c935d212b00a5a7c9a07ce9c008
MD5 6dd713ced46fe5f83bc7ce6576987f1f
BLAKE2b-256 3f059ad36c14250cd84ffc45277e2f93b82a20b5b00ff1b664a08cdb0333462c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromaconsole-0.2.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d75864404b6dc2798e3974d65186e158b16e5091b543c67f23f6b6dd474a7642
MD5 5a4d6ecac962423bd3c1d23d05ff3cd7
BLAKE2b-256 319e0b2911e79275551e9029407bc6d01fbc799ede1ade40df948dabd0ed17cf

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