✨ Tinterm: Tinted Terminal with Shimmer Effects ✨
A powerful and ergonomic Rust library for creating beautiful, colorful terminal output with stunning shimmer animations inspired by modern CLI tools.
🌟 Features
- 🎨 Rich Colors: Full RGB support with 140+ predefined colors
- 🌈 Smooth Gradients: Create beautiful color transitions across text
- ✨ Shimmer Animations: Eye-catching animated effects (NEW in v0.2.0!)
- 🎭 Text Styling: Bold, italic, underline, and more
- 🔗 Method Chaining: Fluent, ergonomic API
- 🚀 High Performance: Optimized for speed and low memory usage
- 📚 Comprehensive: Extensive documentation and examples
🚀 Quick Start
Add tinterm to your Cargo.toml:
[]
= "0.2.0"
Basic usage:
use *;
✨ Shimmer Animations (NEW!)
The crown jewel of tinterm v0.2.0 - beautiful animated text effects:
Basic Shimmer
use *;
// Create a shimmering effect
let shimmer = "✨ Amazing Text ✨".shimmer;
// Static render for single display
println!;
// Live animation for 3 seconds
shimmer.animate;
Shine Effects
// Wave-like shine animation
let shine = "🌟 Sparkling Text 🌟".shine;
shine.animate;
Glow Effects
// Pulsing glow animation
let glow = "💫 Glowing Text 💫".glow;
glow.animate;
Gradient Shimmer
// Animated gradient effects
let gradient_shimmer = "🌈 Rainbow Magic 🌈"
.shimmer_gradient
.speed;
gradient_shimmer.animate;
Customization
// Customize speed, background, and intensity
let custom = "Custom Effect"
.shimmer
.speed // Animation speed in milliseconds
.intensity; // Effect intensity (0-255)
custom.animate;
🎨 Colors and Gradients
Predefined Colors
use *;
// Use any of 140+ predefined colors (see COLORS.md for full visual reference)
println!;
println!;
println!;
println!;
Custom Colors
// RGB values
let custom = new;
println!;
// Hex colors
let hex_color = from_hex.unwrap;
println!;
// Short hex
let short_hex = from_hex.unwrap;
println!;
Smooth Gradients
// Foreground gradients
println!;
// Background gradients
println!;
// Multi-line gradients
let multiline = "Line 1\nLine 2\nLine 3";
println!;
🎭 Text Styling
use *;
// Basic styling
println!;
println!;
println!;
println!;
// Advanced styling
println!;
println!;
println!;
println!;
// Method chaining
println!;
🛠️ Real-World Examples
CLI Status Indicators
use *;
// Success, warning, error indicators
println!;
println!;
println!;
// With shimmer for important notifications
println!;
Progress Bars
use *;
show_progress;
Syntax Highlighting
use *;
println!;
📊 Performance
Tinterm is optimized for performance:
use *;
use Instant;
let start = now;
for i in 0..10000
let duration = start.elapsed;
println!;
// Typical result: ~2-5ms
🎯 Use Cases
- CLI Tools: Status indicators, progress bars, help text
- Development Tools: Syntax highlighting, log levels, git output
- Games: Colorful UI, animations, effects
- Monitoring: Dashboard displays, alerts, metrics
- Art: ASCII art, logos, creative displays
📚 Examples
Run the included examples to see tinterm in action:
# Comprehensive feature demo
# Shimmer animation showcase
# CLI tools simulation
# ASCII art and creativity
🔧 API Reference
Core Traits
TextModifier: Colors and text stylingGradient: Gradient effectsShimmer: Animation effects (NEW!)
Key Methods
.color(color)/.fg(color): Set foreground color.bg(color): Set background color.gradient(start, end, block): Apply gradient.shimmer(color, bg): Create shimmer effect ✨.shine(color): Create shine effect ✨.glow(color, intensity): Create glow effect ✨
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Inspired by modern CLI tools with beautiful animations
- Built with ❤️ for the Rust community
- Special thanks to all contributors and users
Made with ✨ by Bratish Goswami
Transform your terminal output from boring to brilliant with tinterm!