This is a Python package that provides a versatile set of utilities for colorizing and styling text output in terminal environments.
Project description
inksplash
inksplash is a Python package that provides a versatile set of utilities for colorizing and styling text output in terminal environments.
Table of Contents
- inksplash
- Table of Contents
- Installation
- Usage
- Features
- Available styles and functions
- Contributing
- License
Installation
You can install inksplash via pip:
pip install inksplash
Usage
First, you need to import the chameleon module from the inksplash package:
from inksplash import chameleon
print(chameleon.bg_bright_green(chameleon.italic(chameleon.black("Hello world"))))
Output:
This example demonstrates how to use chameleon functions from inksplash to colorize and style text output. In this case, it applies a bright green background, italic style, and black text color to the string "Hello world".
Features
- Easy-to-use API for applying various text styles and colors.
- Supports a wide range of styling options, including bold, italic, underline, foreground and background colors, etc.
- Compatible with ANSI terminal escape sequences, ensuring compatibility across different terminal emulators and platforms.
Available styles and functions
The following are the functions that are available for text styles and colors.
1. Basics
-
blueApplies a blue color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with blue color.
-
greenApplies a green color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with green color.
-
yellowApplies a yellow color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with yellow color.
-
whiteApplies a white color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with white color.
-
purpleApplies a purple color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with purple color.
-
redApplies a red color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with red color.
-
cyanApplies a cyan color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with cyan color.
-
blackApplies a black color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with black color.
2. Text Styles
-
boldApplies bold style to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bold style.
-
underlineApplies underline style to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with underline style.
-
italicApplies italic style to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with italic style.
strikethrough
Applies strikethrough style to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with strikethrough style.
3. Bright Text Colors
-
bright_blackApplies a bright black color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright black color.
-
bright_redApplies a bright red color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright red color.
-
bright_greenApplies a bright green color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright green color.
-
bright_yellowApplies a bright yellow color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright yellow color.
-
bright_blueApplies a bright blue color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright blue color.
-
bright_purpleApplies a bright purple color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright purple color.
-
bright_cyanApplies a bright cyan color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright cyan color.
-
bright_whiteApplies a bright white color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with bright white color.
4. Background Color
-
bg_blackApplies a black background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with black background color.
-
bg_redApplies a red background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with red background color.
-
bg_greenApplies a green background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with green background color.
-
bg_yellowApplies a yellow background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with yellow background color.
-
bg_blueApplies a blue background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a blue background color.
-
bg_purpleApplies a purple background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a purple background color.
-
bg_cyanApplies a cyan background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a cyan background color.
-
bg_whiteApplies a white background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a white background color.
5. Bright background styles
-
bg_bright_blackApplies a bright black background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright black background color.
-
bg_bright_redApplies a bright red background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright red background color.
-
bg_bright_greenApplies a bright green background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright green background color.
-
bg_bright_yellowApplies a bright yellow background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright yellow background color.
-
bg_bright_blueApplies a bright blue background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright blue background color.
-
bg_bright_purpleApplies a bright purple background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright purple background color.
-
bg_bright_cyanApplies a bright cyan background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright cyan background color.
-
bg_bright_whiteApplies a bright white background color to the text.
Parameters:
value(str): The input text.
Returns:
- str: The input text with a bright white background color.
Docs
You can read more in the documentation.
Contributing
Contributions to inksplash are welcome! Feel free to submit bug reports, feature requests, or pull requests on GitHub.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 inksplash-1.0.4.tar.gz.
File metadata
- Download URL: inksplash-1.0.4.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b256adf568da83c481829f70033c0f6eb4e87a18988d56238b5fbba33c0066e8
|
|
| MD5 |
61fb8bd7201d49c5d8f0224a111c728d
|
|
| BLAKE2b-256 |
3f9f665d325af9c15bc66214229e95e334c52416ff1e970b9cd7274f8fa27c64
|
File details
Details for the file inksplash-1.0.4-py3-none-any.whl.
File metadata
- Download URL: inksplash-1.0.4-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96a20b686d50acaf7e6b9886bb9e6e3346e681382c3db77410b8b5001bf84221
|
|
| MD5 |
06669a896dbdbca516f9b852b25359f6
|
|
| BLAKE2b-256 |
935e8ee3773e12b331e0d14af7a9cd0d69abbc6f48fecd3e9593e4556ed7268c
|