Skip to main content

python module to decorate text with ANSI colors and modifiers

Project description

python module to decorate text with ANSI colors and modifiers Version: 0.00.01


Author: Timo Furrer tuxtimo@gmail.com Version: 0.00.01 License: GPL (See LICENSE)

What the fuck?

With this module you can decorate some text with colors. The methods which gets invoked are dynamically generated.

For example:

from colorful import Colorful

print( Colorful.bold_red_on_black( "Hello World!" ))
print( Colorful.black_on_white( "Hello World!" ))
print( Colorful.underline( "Hello World!" ))
print( Colorful.bold_and_underline_green( "Hello World!" ))
print( Colorful.bold_and_underline_green_on_red( "Hello World!" ))
print( Colorful.bold_and_underline_and_strikethrough_green_on_red( "Hello World!" ))
print( Colorful.strikethrough( "Hello World!" ))

# Or direct print:
Colorful.out.bold_red_on_black( "Hello World" )
Colorful.out.underline( "Hello World" )
Colorful.out.bold_and_underline_green_on_white( "Hello World!" )

Available modifiers and colors

Modifiers:

-> reset -> bold -> italic -> underline -> blink -> inverse -> strikethrough

Forecolors:

-> black -> red -> green -> brown -> blue -> magenta -> cyan -> white -> normal

Backcolors:

-> black -> red -> green -> yellow -> blue -> magenta -> cyan -> white -> normal

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

colorful-0.00.02.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file colorful-0.00.02.tar.gz.

File metadata

  • Download URL: colorful-0.00.02.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for colorful-0.00.02.tar.gz
Algorithm Hash digest
SHA256 f453197e985a457a8e809353de84b7530cda2bd77fefb03b90e6f96db7277d77
MD5 806d5cc00d77dbb724db2e0893273bca
BLAKE2b-256 2962002e41b0177917230caf6e4e52a066231813e5a0a570297ab1c4a285ce81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page