DEV Community

Titandrake
Titandrake

Posted on

`tolor` — A Python package for colorful terminal output and gradients 🎨

tolor 🎨

A Python package to easily print colorful and gradient-rich text in the terminal.


🔧 What My Project Does

tolor is a lightweight Python package that helps you print colored and gradient text easily in your terminal.

✅ Predefined colors like red, blue, green, purple, pink, brown, etc.

✅ Custom color support with HEX, RGB, HSL

✅ Smooth per-character color gradients

✅ Cross-platform support (Windows, Linux, macOS)

Example:

from tolor import init, color, gradient

init()

print(f"{color.red}This is red text{color.reset}")
print(f"{color.hex('#06E978')}Custom HEX color text{color.reset}")
print(f"{gradient(color.purple, color.blue)}This is gradient text!{color.reset}")
print(gradient("#FF0000", "#06E978", "Gradient text with hex!"))
Enter fullscreen mode Exit fullscreen mode

🎯 Target Audience

tolor is designed for:

  • Developers building CLI tools
  • Students or educators making visually engaging scripts
  • Terminal-based UI or dashboards
  • Anyone who wants to make Python output more fun!

⚖️ Comparison

Other libraries like colorama, termcolor, and rich are great, but:

  • tolor focuses on minimalism and ease of use
  • Built-in support for full color systems (HEX, RGB, HSL)
  • gradient() feature applies color per-character — no manual styling needed

🔗 Links

📦 PyPI: https://pypi.org/project/tolor/

📂 GitHub: https://github.com/TiraTitan/tolor
📷 Screenshot: https://imgur.com/a/oecp1gm


Feel free to star ⭐ the project or open an issue if you have ideas, bugs, or feedback!

Top comments (0)