Skip to main content

Sets text colors and effects in console

Project description

Colorant

Intro

  • Sets text colors and effects in console.

Installation

pip install colorant

Features

  • Foreground and background colors
    • Black
    • Red
    • Green
    • Yellow
    • Blue
    • Magenta
    • Cyan
    • White
    • Bright black
    • Bright red
    • Bright green
    • Bright yellow
    • Bright blue
    • Bright magenta
    • Bright cyan
    • Bright white
  • Decorations
    • Bold
    • Underline
    • Reversed
  • Function chaining
    • e.g. Colorant().bg_lt_green().black('OK').flush() prints OK in black on a light green background.
    • tests/demo.py contains more example usages.

demo

Reference

  1. Build your own Command Line with ANSI escape codes
  2. ANSI escape code
  3. Colors In Terminal
  4. STY

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

colorant-1.0.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

colorant-1.0.0-py3-none-any.whl (4.5 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