A simple, lightweight, and colorful text printing library for Python. Supports colors, styles, HTML hex colors, and even gradient text.
Join our Discord server for support, questions, and community discussions:
- 🎨 Support for 16 different colors
- 🔤 Support for 8 different font styles (Bold, Italic, Underline, etc.)
- 🌈 2-color gradient printing using HTML hex colors (#RRGGBB)
- 🔧 Runtime color & style overrides
- 📦 Zero dependencies
- 🐍 Python 3.8+ support
pip install printfxpyfrom printfx import PrintFX
# Basic color printing
printer = PrintFX("RED")
printer.printfx("Hello World!")
# With font styles
bold = PrintFX("GREEN", "BOLD")
bold.printfx("Bold text")
# Runtime style changes
printer.printfx("Italic text", font_style="ITALIC")
printer.printfx("Underlined text", font_style="UNDERLINE")BLACK,RED,GREEN,YELLOW,BLUE,MAGENTA,CYAN,WHITEBRIGHT_BLACK,BRIGHT_RED,BRIGHT_GREEN,BRIGHT_YELLOW,BRIGHT_BLUE,BRIGHT_MAGENTA,BRIGHT_CYAN,BRIGHT_WHITE
NORMAL- Default text styleBOLD- Bold textDIM- Dimmed textITALIC- Italic textUNDERLINE- Underlined textBLINK- Blinking textREVERSE- Reversed colorsSTRIKETHROUGH- Strikethrough text
from printfx import PrintFX
printer = PrintFX()
printer.gradient(
"Gradient Text Example!",
start="#ff0000",
end="#0000ff"
)from printfx import PrintFX
# Create printer with default settings
printer = PrintFX("BLUE")
# Change color and style at runtime
printer.printfx("Red bold text", color="RED", font_style="BOLD")
printer.printfx("Green underlined text", color="GREEN", font_style="UNDERLINE")
# Combine multiple effects
printer.printfx("Magenta italic text", color="MAGENTA", font_style="ITALIC")