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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

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

Hashes for inksplash-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b256adf568da83c481829f70033c0f6eb4e87a18988d56238b5fbba33c0066e8
MD5 61fb8bd7201d49c5d8f0224a111c728d
BLAKE2b-256 3f9f665d325af9c15bc66214229e95e334c52416ff1e970b9cd7274f8fa27c64

See more details on using hashes here.

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

Hashes for inksplash-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 96a20b686d50acaf7e6b9886bb9e6e3346e681382c3db77410b8b5001bf84221
MD5 06669a896dbdbca516f9b852b25359f6
BLAKE2b-256 935e8ee3773e12b331e0d14af7a9cd0d69abbc6f48fecd3e9593e4556ed7268c

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