Skip to main content

A simple library to get colors in the bash terminal

Project description

Bash color

Available colors

  • BLACK
  • RED
  • GREEN
  • BROWN
  • BLUE
  • PURPLE
  • CYAN
  • LIGHT_GRAY
  • DEFAULT
  • DARK_GRAY
  • LIGHT_RED
  • LIGHT_GREEN
  • YELLOW
  • LIGHT_BLUE
  • LIGHT_PURPLE
  • LIGHT_CYAN
  • WHITE

Available effect

  • BOLD
  • DIM (not working on Konsole)
  • UNDERLINE
  • BLINK (not working on Konsole and Gnome Terminal)
  • INVERSE
  • HIDDEN (not working on Konsole)

Example

from bashcolor import RED, UNDERLINE, colorize

print(colorize('Red color', RED))
print(colorize('Red background', background=RED))
print(colorize('Underline', effects=[UNDERLINE]))

API

def colorize(
    text,
    color=None,
    background=None,
    effects=[],
    color_256=None,
    background_256=None,
    with_end=True):

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bashcolor-1.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file bashcolor-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: bashcolor-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for bashcolor-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77f02f25dcf64bc6282985cf1f9c6b76019dbcfd2744dc02c86897b41350796b
MD5 146f9ff540126f32920e8938f8a49f8e
BLAKE2b-256 9200ebe438b30e933b1b8da0dfc4aecd9145c07ba7a7f53ecb63464de34a71f7

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