chroma-palette


Namechroma-palette JSON
Version 1.0.4 PyPI version JSON
download
home_page
SummaryChroma Palette - Text Styling Library
upload_time2024-03-18 18:27:48
maintainer
docs_urlNone
authorVinay Kumar (vk_billava)
requires_python
license
keywords python terminal color palette color palette termina palette terminal chroma chroma palette
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Chroma Palette - Text Styling Library

The Chroma Palette is a Python module designed to provide comprehensive text styling capabilities for terminal applications. It utilizes ANSI escape codes to apply various styles, colors, decorations, alignments, and shadow effects to text output, enhancing the visual presentation of terminal-based interfaces.

## Installation

Install the librery by using `pip install chroma-palette`

## Usage

Import the librery by using `from chromapalette import *`

## Features

### Text Styles

- **Bold:** Make text bold and prominent.
  ```python
  styled_text = styled_text("Hello, world!", style=TextStyle.BOLD)
  print(styled_text)
  ```

- **Italic:** Slant text slightly for emphasis.
  ```python
  styled_text = styled_text("Hello, world!", style=TextStyle.ITALIC)
  print(styled_text)
  ```

- **Underline:** Add a line beneath the text.
  ```python
  styled_text = styled_text("Hello, world!", style=TextStyle.UNDERLINE)
  print(styled_text)
  ```

- **Strikethrough:** Draw a line through the text.
  ```python
  styled_text = styled_text("Hello, world!", style=TextStyle.STRIKETHROUGH)
  print(styled_text)
  ```

### Text Colors

Choose from a range of foreground text colors including black, red, green, yellow, blue, magenta, cyan, light gray, dark gray, and more.

- **Example:**
  ```python
  styled_text = styled_text("Hello, world!", color=TextColor.RED)
  print(styled_text)
  ```

### Background Colors

Set background colors for text to improve readability and aesthetics.

- **Example:**
  ```python
  styled_text = styled_text("Hello, world!", background=BackgroundColor.GREEN)
  print(styled_text)
  ```

### Text Decorations

- **Bold:** Make text bold and prominent.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.BOLD)
  print(styled_text)
  ```

- **Dim:** Apply a dim effect to the text.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.DIM)
  print(styled_text)
  ```

- **Italic:** Slant text slightly for emphasis.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.ITALIC)
  print(styled_text)
  ```

- **Underline:** Add a line beneath the text.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.UNDERLINE)
  print(styled_text)
  ```

- **Blink:** Cause the text to blink.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.BLINK)
  print(styled_text)
  ```

- **Reverse:** Reverse the foreground and background colors.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.REVERSE)
  print(styled_text)
  ```

- **Hidden:** Hide the text.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.HIDDEN)
  print(styled_text)
  ```

- **Strikethrough:** Draw a line through the text.
  ```python
  styled_text = styled_text("Hello, world!", decoration=TextDecoration.STRIKETHROUGH)
  print(styled_text)
  ```

### Text Alignments

Align text to the left, center, or right within the terminal window.

- **Example:**
  ```python
  styled_text = styled_text("Hello, world!", alignment=TextAlignment.CENTER)
  print(styled_text)
  ```

### Dynamic Color Selection

Convert RGB color values to ANSI escape codes for dynamic color selection.

- **Example:**
  ```python
  dynamic_color = dynamic_color_selection(255, 0, 0)  # Red
  styled_text = styled_text("Hello, world!", color=dynamic_color)
  print(styled_text)
  ```

### Interactive Help Menu

Display an interactive help menu with detailed information on available features and usage instructions.

- **Example:**
  ```python
  help()
  ```

## License

This project is licensed under the [MIT License](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "chroma-palette",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,terminal,color,palette,color palette,termina palette,terminal,chroma,chroma palette",
    "author": "Vinay Kumar (vk_billava)",
    "author_email": "<vinaykumarbillava@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0e/dc/d187e886c9090cad52e9f08d577d98e26a30d68d636b442256fbeb8e55f9/chroma_palette-1.0.4.tar.gz",
    "platform": null,
    "description": "# Chroma Palette - Text Styling Library\r\n\r\nThe Chroma Palette is a Python module designed to provide comprehensive text styling capabilities for terminal applications. It utilizes ANSI escape codes to apply various styles, colors, decorations, alignments, and shadow effects to text output, enhancing the visual presentation of terminal-based interfaces.\r\n\r\n## Installation\r\n\r\nInstall the librery by using `pip install chroma-palette`\r\n\r\n## Usage\r\n\r\nImport the librery by using `from chromapalette import *`\r\n\r\n## Features\r\n\r\n### Text Styles\r\n\r\n- **Bold:** Make text bold and prominent.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", style=TextStyle.BOLD)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Italic:** Slant text slightly for emphasis.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", style=TextStyle.ITALIC)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Underline:** Add a line beneath the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", style=TextStyle.UNDERLINE)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Strikethrough:** Draw a line through the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", style=TextStyle.STRIKETHROUGH)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Text Colors\r\n\r\nChoose from a range of foreground text colors including black, red, green, yellow, blue, magenta, cyan, light gray, dark gray, and more.\r\n\r\n- **Example:**\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", color=TextColor.RED)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Background Colors\r\n\r\nSet background colors for text to improve readability and aesthetics.\r\n\r\n- **Example:**\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", background=BackgroundColor.GREEN)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Text Decorations\r\n\r\n- **Bold:** Make text bold and prominent.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.BOLD)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Dim:** Apply a dim effect to the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.DIM)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Italic:** Slant text slightly for emphasis.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.ITALIC)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Underline:** Add a line beneath the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.UNDERLINE)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Blink:** Cause the text to blink.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.BLINK)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Reverse:** Reverse the foreground and background colors.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.REVERSE)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Hidden:** Hide the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.HIDDEN)\r\n  print(styled_text)\r\n  ```\r\n\r\n- **Strikethrough:** Draw a line through the text.\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", decoration=TextDecoration.STRIKETHROUGH)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Text Alignments\r\n\r\nAlign text to the left, center, or right within the terminal window.\r\n\r\n- **Example:**\r\n  ```python\r\n  styled_text = styled_text(\"Hello, world!\", alignment=TextAlignment.CENTER)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Dynamic Color Selection\r\n\r\nConvert RGB color values to ANSI escape codes for dynamic color selection.\r\n\r\n- **Example:**\r\n  ```python\r\n  dynamic_color = dynamic_color_selection(255, 0, 0)  # Red\r\n  styled_text = styled_text(\"Hello, world!\", color=dynamic_color)\r\n  print(styled_text)\r\n  ```\r\n\r\n### Interactive Help Menu\r\n\r\nDisplay an interactive help menu with detailed information on available features and usage instructions.\r\n\r\n- **Example:**\r\n  ```python\r\n  help()\r\n  ```\r\n\r\n## License\r\n\r\nThis project is licensed under the [MIT License](LICENSE).\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Chroma Palette - Text Styling Library",
    "version": "1.0.4",
    "project_urls": null,
    "split_keywords": [
        "python",
        "terminal",
        "color",
        "palette",
        "color palette",
        "termina palette",
        "terminal",
        "chroma",
        "chroma palette"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8028749b711112a7fdaf2636c542987aea95d68a5051836b84611dbc00363e55",
                "md5": "e474722ed21a9964f56b2757c0dd1bb3",
                "sha256": "49b226ed5c68961f3e1d1e892b86de49babcc6a62b9033ed30a5e69bfec89433"
            },
            "downloads": -1,
            "filename": "chroma_palette-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e474722ed21a9964f56b2757c0dd1bb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5099,
            "upload_time": "2024-03-18T18:27:47",
            "upload_time_iso_8601": "2024-03-18T18:27:47.071044Z",
            "url": "https://files.pythonhosted.org/packages/80/28/749b711112a7fdaf2636c542987aea95d68a5051836b84611dbc00363e55/chroma_palette-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0edcd187e886c9090cad52e9f08d577d98e26a30d68d636b442256fbeb8e55f9",
                "md5": "fe0f1f806a01c3707f83d0fcf93497c1",
                "sha256": "7cfbb7077cd1be81cb6e051d47a0cd72cad216ee85b90c5e007591554ab5b61e"
            },
            "downloads": -1,
            "filename": "chroma_palette-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "fe0f1f806a01c3707f83d0fcf93497c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4718,
            "upload_time": "2024-03-18T18:27:48",
            "upload_time_iso_8601": "2024-03-18T18:27:48.522807Z",
            "url": "https://files.pythonhosted.org/packages/0e/dc/d187e886c9090cad52e9f08d577d98e26a30d68d636b442256fbeb8e55f9/chroma_palette-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 18:27:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "chroma-palette"
}
        
Elapsed time: 0.20745s