Skip to main content

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.

logo


Table of Contents

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:

demo

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


  1. blue

    Applies a blue color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with blue color.

  1. green

    Applies a green color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with green color.

  1. yellow

    Applies a yellow color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with yellow color.

  1. white

    Applies a white color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with white color.

  1. purple

    Applies a purple color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with purple color.

  1. red

    Applies a red color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with red color.

  1. cyan

    Applies a cyan color to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with cyan color.

  1. 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

  1. bold

    Applies bold style to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with bold style.

  1. underline

    Applies underline style to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with underline style.

  1. italic

    Applies italic style to the text.

    Parameters:

    • value (str): The input text.

    Returns:

    • str: The input text with italic style.

  1. 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

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

5. Bright background styles

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

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

inksplash-1.0.4.tar.gz (64.4 kB view hashes)

Uploaded Source

Built Distribution

inksplash-1.0.4-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

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