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
-
blue
Applies a blue color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with blue color.
-
green
Applies a green color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with green color.
-
yellow
Applies a yellow color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with yellow color.
-
white
Applies a white color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with white color.
-
purple
Applies a purple color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with purple color.
-
red
Applies a red color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with red color.
-
cyan
Applies a cyan color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with cyan color.
-
black
Applies a black color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with black color.
2. Text Styles
-
bold
Applies bold style to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bold style.
-
underline
Applies underline style to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with underline style.
-
italic
Applies 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_black
Applies a bright black color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright black color.
-
bright_red
Applies a bright red color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright red color.
-
bright_green
Applies a bright green color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright green color.
-
bright_yellow
Applies a bright yellow color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright yellow color.
-
bright_blue
Applies a bright blue color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright blue color.
-
bright_purple
Applies a bright purple color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright purple color.
-
bright_cyan
Applies a bright cyan color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with bright cyan color.
-
bright_white
Applies 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_black
Applies a black background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with black background color.
-
bg_red
Applies a red background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with red background color.
-
bg_green
Applies a green background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with green background color.
-
bg_yellow
Applies a yellow background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with yellow background color.
-
bg_blue
Applies a blue background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with a blue background color.
-
bg_purple
Applies a purple background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with a purple background color.
-
bg_cyan
Applies a cyan background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with a cyan background color.
-
bg_white
Applies a white background color to the text.
Parameters:
value
(str): The input text.
Returns:
- str: The input text with a white background color.
Bright background styles
-
bg_bright_black
Applies 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_red
Applies 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_green
Applies 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_yellow
Applies 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_blue
Applies 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_purple
Applies 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_cyan
Applies 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_white
Applies 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.
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
Hashes for inksplash-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae61178f138f59188051a9cd45afa9a0427308ee05584764480614b231265929 |
|
MD5 | 38f0634339503d383f493e9c15e7c402 |
|
BLAKE2b-256 | aa1550718199c9fa4fe402809c812cc5455814ddfe2ba333e95590a9126aa0bb |