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 hashes)

Uploaded Python 3

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