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.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bashcolor-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7402a1aba108c8e635a13a6576b683a77b24d1f36c248d15360a0eb2fd0ade
MD5 3a9356d323f4aedd4e6a575f72cdf942
BLAKE2b-256 af143805fcb6d50452f492993a3b3968b9a8575b98d0757ba62256c93ffc302b

See more details on using hashes here.

Provenance

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