A package for colorizing and styling text
Project description
YULM Styled
YULM Styled is a Python module that provides ANSI escape codes for text and background color styling. It allows you to add colorful and visually appealing text to your command-line applications.
Features
- Text colorization using ANSI escape codes
- Faded text colors for a subtle effect
- Rainbow text with changing colors
- Background colors for text
Usage
Text Colorization
You can colorize your text by using the colorize_text function:
import yulm_styled
# Specify the text and color
text = "Hello, World!"
color = yulm_styled.Color.RED
# Colorize the text
colored_text = yulm_styled.colorize_text(text, color)
# Print the colored text
print(colored_text)
Faded Text Color
You can apply faded color to your text using the fade_text function:
import yulm_styled
text = "Hello, World!"
color = yulm_styled.FadedColor.YELLOW
faded_text = yulm_styled.fade_text(text, color)
print(faded_text)
Rainbow Text
To apply a rainbow effect to your text, use the rainbow_text function:
import yulm_styled
text = "Hello, World!"
rainbow_text = yulm_styled.rainbow_text(text)
print(rainbow_text)
Background Color
You can add background colors to your text by using the colorize_text function with the background parameter:
import yulm_styled
text = "Hello, World!"
color = yulm_styled.Color.RED
background = yulm_styled.BackgroundColor.YELLOW
colored_text = yulm_styled.colorize_text(text, color, background)
print(colored_text)
Adding More Colors
If you want to add more colors, you can modify the module by extending the existing color classes (Color, FadedColor, RainbowColor, BackgroundColor) with additional ANSI escape codes.
License
This module is released under the MIT License. See LICENSE for more information.
Author
- Author: LopeKinz
- GitHub: https://github.com/lopekinz/yulm-styled
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
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 yulm-styled-1.2.0.tar.gz.
File metadata
- Download URL: yulm-styled-1.2.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b55937f5516875538a32c1fdc0840e5b094f95d8afa8b3451c40e58630bbff5
|
|
| MD5 |
e23962b1340e3020f31dd4354d7b9b11
|
|
| BLAKE2b-256 |
8645df5bd49ac58733eec8beea7d034a0a426e4888dc32af1318b976e08c1d8b
|
File details
Details for the file yulm_styled-1.2.0-py3-none-any.whl.
File metadata
- Download URL: yulm_styled-1.2.0-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d461e5fe46ddb11c08147cc8ea62300c7ee33b9d9744c495245a8d218ecd5bb
|
|
| MD5 |
6e95faf0dc2b41053d2ca4d7bbc2bd53
|
|
| BLAKE2b-256 |
09c63189b925c647da4555a87820914137e0bd8de7008269b0fc641f063b3463
|