Colourfulprint for Rainbow print that works in Linux as well as in Windows(improved).
Project description
ColourfulPrint
A cross-platform Python tool to print text in vibrant, high-intensity rainbow colors.
ColourfulPrint is a modern, improved version of the classic lolcat for Linux, now fully optimized for Windows, Linux, and macOS. It uses high-intensity ANSI 256-color modes to generate bright, neon-like gradients and supports animated output, random color seeds, and piped input.
🚀 Features
- Cross-Platform Compatibility: Works perfectly on Windows (CMD & PowerShell), Linux, and macOS.
- High-Intensity Colors: Uses a specialized 256-color mapping formula for brighter, more vivid text than standard ANSI tools.
- Randomized Start: Every run starts with a different color phase, ensuring a fresh look every time.
- Animation Mode: Support for "Typewriter" style animation with customizable speeds.
- Pipe Support: Works seamlessly with piped input (e.g.,
echo "Hello" | colourfulprint). - Customizable: Tweak the rainbow spread, frequency, and seed to get the exact gradient you want.
🖥️ Requirements
- Python 3.6 or higher
- Colorama (Required for Windows ANSI support)
📦 Installation & Setup
- Install Python 3.6+ if you haven't already. Download it from python.org.
- Install it from PyPI using pip :
pip install colourfulprint
or clone the repository and install manually :git clone https://github.com/Nishant2009/ColourFulPrint cd ColourFulPrint pip install .
- Verify the installation by running:
colourfulprint --version
🛠️ Usage
You can use ColourfulPrint in two ways: reading from a file or piping text directly into it.
1. Pipe Text (Echo)
Great for simple messages or system output.
Windows (PowerShell):
echo "Welcome to the Windows" | colourfulprint
Linux / Mac:
echo "Welcome to the Linux" | colourfulprint
2. Read from File
Colorize an entire text file instantly.
colourfulprint my_text_file.txt
3. Animated Output
Add the -a flag to enable the typewriter animation effect.
echo "Loading System..." | colourfulprint -a -s 30
⚙️ Configuration Options
| Flag | Long Option | Description | Default |
|---|---|---|---|
-p |
--spread |
Controls how wide the rainbow bands are (Lower = wider). | 3.0 |
-F |
--freq |
Controls the rainbow frequency (cycle rate). | 0.1 |
-S |
--seed |
Manually set the color start point. 0 means random. |
0 |
-a |
--animate |
Enables the typing animation effect. | False |
-s |
--speed |
Sets the animation speed (higher is faster). | 20.0 |
-v |
--version |
Shows the current version info. | 2.0 |
Example with Custom Settings:
# Wide spread, fast animation
colourfulprint myfile.txt -p 1.0 -a -s 50
📂 Project Structure
.
├── colourfulprint.py # Main script
├── setup.py # Setup script
└── README.md # Documentation
💡 Troubleshooting
-
Colors look dull on Windows? Ensure you are running the script in a modern terminal like Windows Terminal, PowerShell, or CMD on Windows 10/11. The script automatically handles ANSI codes via
colorama. -
"ModuleNotFoundError: No module named 'colorama'": You might have uninstalled the dependency. Run
pip install coloramato reinstall it.
🤝 Contributing
Pull requests are welcome! If you have ideas for new animation styles or color maps, feel free to open an issue or submit a PR.
📜 License
This project is open-source. Feel free to modify and distribute it.
👨💻 Author
Coded by Nishant !!!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colourfulprint-2.0.0.tar.gz.
File metadata
- Download URL: colourfulprint-2.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e41e9b54e49d07aa88c1fb311025e6204265a0ff0deb9cf60e6ab950747af42
|
|
| MD5 |
afa8d8ffd55c6c573672bbff73d6c586
|
|
| BLAKE2b-256 |
a55ae9866f605eecc5cee91ddf63ec7369595bbd16422eab7b7691a64184aa3f
|
File details
Details for the file colourfulprint-2.0.0-py3-none-any.whl.
File metadata
- Download URL: colourfulprint-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79dc0a342252c18eacbdd4e8289c63ec43212c40753423624e9e7f52cd2d93ae
|
|
| MD5 |
aec3070f8559c583eedf4f47327a1c9a
|
|
| BLAKE2b-256 |
65cbdea9090d86a00c54e148b94f8cb0efb055fe949b6d555f36cd01a6483cd2
|