ASCII Colors

0.11.21 · active · verified Fri Apr 17

A Python library for rich terminal output with advanced logging features. It provides functionalities for styling text, creating progress bars, and handling advanced terminal interactions. The current version is 0.11.21, with active development featuring regular updates.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates basic text coloring, style chaining, background/foreground combinations, and the integrated logging features. It also includes an example of ASCII art generation.

import ascii_colors as ac

# Basic text coloring
print(ac.red("This is red text."))
print(ac.green("This is green text."))

# Chaining styles (e.g., bold and blue)
print(ac.bold + ac.blue("Bold blue text.") + ac.reset)

# Background and foreground colors
print(ac.bg_yellow + ac.black("Black text on a yellow background.") + ac.reset)

# Using the advanced logging features
ac.log_info("This is an informational message.")
ac.log_warning("This is a warning message.")
ac.log_error("This is an error message.")

# Example of ASCII art (requires Pygments for complex fonts)
# For simple fonts, it often works without complex dependencies.
ac.print_ascii_art("Hello Registry!", font="slant")

view raw JSON →