Skip to main content

A simple package to convert strings to colored strings using ANSI escape codes

Project description

zyjared-color

Reference

Installation

pip install zyjared-color

Usage

from zyjared_color import Color

a = Color.red('Hello World!')
print(a)

b = Color.bold('Hello World!').italic().underline().bg_blue()
print(b)

c = Color.red('Hello') + ' ' + Color.blue('World') + '!!!'
print(c)

d = Color('extend styles').extend(a)
print(d)

e = b.clean().red()
print(e)

Styles

  • Color.bold()
  • Color.italic()
  • Color.underline()
  • Color.dim()
  • Color.through()
  • Color.reverse()
  • Color.blink()
  • Color.blink_fast()
  • Color.hidden()

foreground

  • Color.black()
  • Color.red()
  • Color.green()
  • Color.yellow()
  • Color.blue()
  • Color.magenta()
  • Color.cyan()
  • Color.white()
  • Color.bright_black()
  • Color.bright_red()
  • Color.bright_green()
  • Color.bright_yellow()
  • Color.bright_blue()
  • Color.bright_magenta()
  • Color.bright_cyan()
  • Color.bright_white()

background

  • Color.bg_black()
  • Color.bg_red()
  • Color.bg_green()
  • Color.bg_yellow()
  • Color.bg_blue()
  • Color.bg_magenta()
  • Color.bg_cyan()
  • Color.bg_white()
  • Color.bg_bright_black()
  • Color.bg_bright_red()
  • Color.bg_bright_green()
  • Color.bg_bright_yellow()
  • Color.bg_bright_blue()
  • Color.bg_bright_magenta()
  • Color.bg_bright_cyan()
  • Color.bg_bright_white()

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

zyjared_color-0.1.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

zyjared_color-0.1.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file zyjared_color-0.1.5.tar.gz.

File metadata

  • Download URL: zyjared_color-0.1.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for zyjared_color-0.1.5.tar.gz
Algorithm Hash digest
SHA256 82d51a0007bf168ba070a56422dd6d345bda650884b1e9d59a6c86b3ef25c20c
MD5 30cc243cb805b38ee3db5d17226177ac
BLAKE2b-256 11bda965af3917b68f728fe8f7d66631149c75f05997a1c93d98425942770973

See more details on using hashes here.

File details

Details for the file zyjared_color-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for zyjared_color-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 91ffbd473d517278c4c657ca4101fe6d0bfb6cc395afb381066e99cd343f1e37
MD5 b40e8dad26d9ae05a2e0cc1311dfb164
BLAKE2b-256 182c8ff5c1fffc6b1242ae5c31b236be7fe24d75099589ab8d6e751065412198

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