Skip to main content

Simple and lightweight shell color output function.

Project description

python-kolors

Simple and lightweight shell color output function.

It also checks if terminal supports color before vomitting ANSI codes.

Usage

from kolors import c

print c('Some <red>Red</end> and <blue>blue</end> text')
print c('<green bg>Some green background</end>')
print c('Some <cyan bold bg>{}</end>').format('interpolation')

Note: the keyword in the closing tag isn’t really relevant, but I like to use “” everywhere for shortness and consistency. Simple shell color output function.

Colors

  • grey (alias: gray)

  • red

  • green

  • yellow

  • blue

  • magenta (alias: purple)

  • cyan

  • white

Styles

  • bold

  • bg

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

kolors-0.0.3.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

kolors-0.0.3-py2.py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 2 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