Skip to main content

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.

PyPI version Python Support License: MIT

โœจ 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 effect
  • OCEAN - Deep blue โ†’ Light blue ocean waves
  • FOREST - Dark green โ†’ Light green forest
  • SUNSET - Red โ†’ Orange โ†’ Yellow โ†’ Light yellow
  • RAINBOW - Full rainbow spectrum
  • NEON_PINK, NEON_BLUE, NEON_GREEN - Vibrant neon colors
  • PASTEL_RAINBOW, PASTEL_PINK - Soft pastel colors
  • DARK_PURPLE, DARK_BLUE - Dark mode friendly
  • CYBERPUNK - Magenta โ†’ Cyan cyberpunk style
  • MATRIX - Green matrix effect
  • GRAY_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

y4seenx-1.0.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

y4seenx-1.0.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

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

Hashes for y4seenx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 702b4a85024cdc396e3e5313e4d452abac666d4cf70a0d5d20105481f35115e2
MD5 5c27f15696779b66022bcc1b4d65d555
BLAKE2b-256 7ea142e62fca477924100414dbcefc951d9f799189c3cc3497f62e61c94f1a6a

See more details on using hashes here.

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

Hashes for y4seenx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf68b7ac7f0d489d0ed623913ff6eb8f7600dca9737b3943945b47abea96943
MD5 6dc67352093f0a1f831fec2b401211ef
BLAKE2b-256 4acef67e0a63b0d587e39c57f4b8aaa94db892b49e9d778f622cf9dd249e71a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page