The Ultimate Gradient Color Package - Create stunning terminal gradients with any color format!
Project description
y4seenx ๐จ
The Ultimate Gradient Color Package for Python
Create stunning terminal gradients with ANY color format! Better, faster, and more feature-rich than alternatives.
โจ Features
- ๐จ Any Color Format: HEX, RGB, HSL, HSV, CMYK - we support them all!
- ๐ Multiple Gradient Types: Horizontal, Vertical, Diagonal, Radial
- โก Zero Dependencies: Pure Python, no external libraries needed
- ๐ญ Animations: Wave, Pulse, Rainbow effects
- ๐ฆ Beautiful Presets: 20+ pre-made stunning gradients
- ๐ป Cross-Platform: Works on Windows, macOS, Linux
- ๐ฅ Blazing Fast: Optimized for performance
- ๐ฏ Easy API: Simple and intuitive, inspired by pystyle but better!
๐ฆ Installation
pip install y4seenx
๐ Quick Start
from y4seenx import Gradient, Presets, Colorate, Colors, Write
# Simple gradient
text = Gradient('#FF0000', '#0000FF').horizontal('Hello World!')
print(text)
# Use beautiful presets
banner = """
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WELCOME TO y4seenx! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
"""
print(Colorate.Horizontal(Colors.fire, banner))
# Animated input (just like pystyle!)
choice = Write.input('[Menu] >> ', Colors.blue_to_cyan, interval=0.01)
# Multiple color gradient
rainbow = Gradient('#FF0000', '#FF7F00', '#FFFF00', '#00FF00', '#0000FF', '#4B0082', '#9400D3')
print(rainbow.horizontal('RAINBOW TEXT!'))
๐ Documentation
Creating Gradients
From HEX Colors
from y4seenx import Gradient
# Two colors
gradient = Gradient('#FF0000', '#0000FF')
# Multiple colors
gradient = Gradient('#FF0000', '#00FF00', '#0000FF')
# Short HEX
gradient = Gradient('#F00', '#00F')
# With 0x prefix
gradient = Gradient('0xFF0000', '0x0000FF')
From RGB Colors
gradient = Gradient((255, 0, 0), (0, 0, 255))
From Named Colors
gradient = Gradient('red', 'blue', 'green')
# Supports: red, green, blue, yellow, cyan, magenta, white, black,
# orange, purple, pink, lime, navy, teal, gold, silver, gray, maroon
From HSL/HSV
from y4seenx import Color
color1 = Color.from_hsl(0, 100, 50) # Red in HSL
color2 = Color.from_hsv(240, 100, 100) # Blue in HSV
gradient = Gradient(color1, color2)
Applying Gradients
from y4seenx import Gradient
gradient = Gradient('#FF0000', '#0000FF')
# Horizontal gradient (left to right)
text = gradient.horizontal('Hello World!')
# Vertical gradient (top to bottom)
text = gradient.vertical('Line 1\nLine 2\nLine 3')
# Diagonal gradient
text = gradient.diagonal('Diagonal Text!')
# Radial gradient (from center)
text = gradient.radial('Radial Text!')
Using Presets
from y4seenx import Presets, Colorate
# Pre-made beautiful gradients
print(Colorate.Horizontal(Presets.FIRE, 'Fire gradient!'))
print(Colorate.Horizontal(Presets.OCEAN, 'Ocean gradient!'))
print(Colorate.Horizontal(Presets.SUNSET, 'Sunset gradient!'))
print(Colorate.Horizontal(Presets.RAINBOW, 'Rainbow gradient!'))
print(Colorate.Horizontal(Presets.CYBERPUNK, 'Cyberpunk gradient!'))
print(Colorate.Horizontal(Presets.MATRIX, 'Matrix gradient!'))
Available Presets
FIRE- Red โ Orange โ Yellow flame effectOCEAN- Deep blue โ Light blue ocean wavesFOREST- Dark green โ Light green forestSUNSET- Red โ Orange โ Yellow โ Light yellowRAINBOW- Full rainbow spectrumNEON_PINK,NEON_BLUE,NEON_GREEN- Vibrant neon colorsPASTEL_RAINBOW,PASTEL_PINK- Soft pastel colorsDARK_PURPLE,DARK_BLUE- Dark mode friendlyCYBERPUNK- Magenta โ Cyan cyberpunk styleMATRIX- Green matrix effectGRAY_SCALE,BLACK_WHITE- Monochrome
Animations
from y4seenx import Animate, Write, Gradient, Presets
# Typing animation
Write.print('Loading...', Presets.FIRE, interval=0.05)
# Animated input
name = Write.input('Enter name: ', Presets.BLUE_CYAN, interval=0.02)
# Wave animation
Animate.wave('WAVE EFFECT!', Presets.RAINBOW, cycles=3, speed=0.05)
# Pulse animation
Animate.pulse('PULSE!', '#FF0000', pulses=5, speed=0.1)
# Rainbow cycle
Animate.rainbow_cycle('RAINBOW!', cycles=3, speed=0.05)
Text Effects
from y4seenx import Box, Presets
# Simple box
boxed = Box.simple('Hello World!', Presets.FIRE, padding=2)
print(boxed)
# Double-line box
boxed = Box.double('Important Message!', Presets.OCEAN, padding=3)
print(boxed)
Color Manipulation
from y4seenx import Color
# Create color
color = Color.from_hex('#FF5733')
# Convert formats
print(color.to_hex()) # #ff5733
print(color.to_rgb()) # (255, 87, 51)
print(color.to_hsl()) # (9.0, 100.0, 60.0)
print(color.to_hsv()) # (9.0, 80.0, 100.0)
# Lighten/Darken
lighter = color.lighten(0.2) # 20% lighter
darker = color.darken(0.2) # 20% darker
# Interpolate between colors
color1 = Color.from_hex('#FF0000')
color2 = Color.from_hex('#0000FF')
middle = color1.interpolate(color2, 0.5) # Purple
๐ฏ Comparison with pystyle
If you're familiar with pystyle, here's how to migrate:
# pystyle
from pystyle import Colorate, Colors, Write
print(Colorate.Horizontal(Colors.blue_to_cyan, 'Text'))
choice = Write.Input('>> ', Colors.blue_to_cyan, interval=0.01)
# y4seenx (same API!)
from y4seenx import Colorate, Colors, Write
print(Colorate.Horizontal(Colors.blue_to_cyan, 'Text'))
choice = Write.input('>> ', Colors.blue_to_cyan, interval=0.01)
Why choose y4seenx over pystyle?
- โ More gradient types (diagonal, radial)
- โ More color formats (HEX, RGB, HSL, HSV, CMYK)
- โ More presets (20+ vs 10)
- โ Zero dependencies
- โ Better performance
- โ More animations
- โ Active development
๐จ Real-World Example
from y4seenx import Gradient, Colorate, Colors, Write, Box, Presets
import asyncio
def clear():
import os
os.system('cls' if os.name == 'nt' else 'clear')
def show_banner():
banner = """
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MY AWESOME APP โ
โ The Best Tool Ever! โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
"""
print(Colorate.Horizontal(Colors.cyberpunk, banner))
async def main_menu():
while True:
clear()
show_banner()
menu = """
[01] Start Process
[02] View Results
[03] Settings
[04] Exit
"""
print(Colorate.Horizontal(Colors.blue_to_cyan, menu))
choice = Write.input('[Menu] >> ', Colors.neon_blue, interval=0.01)
if choice == '1':
Write.print('Starting process...', Colors.neon_green, interval=0.02)
elif choice == '4':
Write.print('Goodbye!', Colors.fire, interval=0.03)
break
if __name__ == '__main__':
asyncio.run(main_menu())
๐ Advanced Usage
Custom Gradient with Multiple Stops
# Create a complex gradient with many color stops
gradient = Gradient(
'#FF0000', # Red
'#FF7F00', # Orange
'#FFFF00', # Yellow
'#00FF00', # Green
'#0000FF', # Blue
'#4B0082', # Indigo
'#9400D3' # Violet
)
print(gradient.horizontal('Full Rainbow Spectrum!'))
Radial Gradient with Custom Center
# Center the gradient at a specific point
text = """
*
***
*****
*******
*********
"""
gradient = Gradient('#FFD700', '#FF0000')
print(gradient.radial(text, center=(0.5, 0.0))) # Center at top
๐ค Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
๐ License
MIT License - feel free to use in your projects!
๐ Star History
If you like this project, please give it a star โญ
๐จโ๐ป Author
Made with โค๏ธ by y4seenx
y4seenx - Making terminals beautiful, one gradient at a time! ๐จ
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 y4seenx-1.0.0.tar.gz.
File metadata
- Download URL: y4seenx-1.0.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702b4a85024cdc396e3e5313e4d452abac666d4cf70a0d5d20105481f35115e2
|
|
| MD5 |
5c27f15696779b66022bcc1b4d65d555
|
|
| BLAKE2b-256 |
7ea142e62fca477924100414dbcefc951d9f799189c3cc3497f62e61c94f1a6a
|
File details
Details for the file y4seenx-1.0.0-py3-none-any.whl.
File metadata
- Download URL: y4seenx-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecf68b7ac7f0d489d0ed623913ff6eb8f7600dca9737b3943945b47abea96943
|
|
| MD5 |
6dc67352093f0a1f831fec2b401211ef
|
|
| BLAKE2b-256 |
4acef67e0a63b0d587e39c57f4b8aaa94db892b49e9d778f622cf9dd249e71a8
|