rich-style


Namerich-style JSON
Version 1.1.2 PyPI version JSON
download
home_pageNone
SummaryA Python library for creating and applying full-color, linear, and circular gradients to text with easy color management.
upload_time2025-08-31 20:17:55
maintainerNone
docs_urlNone
authorPcoiDev
requires_python>=3.6
licenseMIT
keywords python color colors easy cmd app manage text colour ansi terminal gradient gradients bold italic underscore command commands
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rich-style

A Python library for creating and applying full-color, linear, and circular gradients to text with easy color management. Includes utilities for ANSI styling, colored prints, and more.

## Features

- **Text Styling:** Bold, italic, underline, strikethrough, bullet lists, and more.
- **Color Management:** Use named presets, custom RGB, gradients, and HSL/HTML color parsing.
- **Gradients:** Linear and circular gradients for text.
- **ANSI Support:** Automatically detects terminal support for ANSI escape codes.
- **Utility Prints:** Info, warning, error, success, timed, and mutable prints with color.
- **Composable:** Combine styles and colors easily.

## Installation

```sh
pip install rich-style
```

## Usage

Basic Styling

```py
from rich_style import bold, italic, underline, strikethrough

print(bold("Bold text"))
print(italic("Italic text"))
print(underline("Underlined text"))
print(strikethrough("Strikethrough text"))
```

Bullet Lists

```py
from rich_style import bullet_list, bold

tasks = [
    "Complete report",
    "Send email to client",
    "Buy groceries"
]

print(bold("Task List:"))
print(bullet_list(*tasks))
```

Colors and Gradients

```py
from rich_style import presets, foreground, background

print(foreground(presets.red, "Red text"))
print(background(presets.blue, "Text with blue background"))
```

Colors and Gradients

```py
from rich_style import presets, foreground, background

print(foreground(presets.red, "Red text"))
print(background(presets.blue, "Text with blue background"))
```

Rainbow Text

```py
from rich_style import rainbow_text
print(rainbow_text("This is a rainbow text message."))
```

Utility Prints

```py
from rich_style import info, success, warn, error, timed_print

info("This is an informational message.")
success("This is a success message.")
warn("This is a warning message.")
error("This is an error message.")
timed_print("This is a timed print message.")
```

Mutable Print
```py
from rich_style import mutable_print
from time import sleep

mutable = mutable_print("Loading")
sleep(1)
mutable("Still loading...")
sleep(1)
mutable("Done!\n")
```

> [!WARNING]  
> You can only use a mutable print when it's the last print.

## Examples

See the `examples/` directory for more usage examples.

## Credits

- **Author:** [PcoiDev](https://github.com/PcoiDev)
- **Inspiration:** [colorama](https://github.com/tartley/colorama), [rich](https://github.com/Textualize/rich) and [stylepy](https://github.com/web-slate/stylepy).

## License

This project is licensed under the `MIT License`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rich-style",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "python, color, colors, easy, cmd, app, manage, text, colour, ansi, terminal, gradient, gradients, bold, italic, underscore, command, commands",
    "author": "PcoiDev",
    "author_email": null,
    "download_url": null,
    "platform": null,
    "description": "# rich-style\n\nA Python library for creating and applying full-color, linear, and circular gradients to text with easy color management. Includes utilities for ANSI styling, colored prints, and more.\n\n## Features\n\n- **Text Styling:** Bold, italic, underline, strikethrough, bullet lists, and more.\n- **Color Management:** Use named presets, custom RGB, gradients, and HSL/HTML color parsing.\n- **Gradients:** Linear and circular gradients for text.\n- **ANSI Support:** Automatically detects terminal support for ANSI escape codes.\n- **Utility Prints:** Info, warning, error, success, timed, and mutable prints with color.\n- **Composable:** Combine styles and colors easily.\n\n## Installation\n\n```sh\npip install rich-style\n```\n\n## Usage\n\nBasic Styling\n\n```py\nfrom rich_style import bold, italic, underline, strikethrough\n\nprint(bold(\"Bold text\"))\nprint(italic(\"Italic text\"))\nprint(underline(\"Underlined text\"))\nprint(strikethrough(\"Strikethrough text\"))\n```\n\nBullet Lists\n\n```py\nfrom rich_style import bullet_list, bold\n\ntasks = [\n    \"Complete report\",\n    \"Send email to client\",\n    \"Buy groceries\"\n]\n\nprint(bold(\"Task List:\"))\nprint(bullet_list(*tasks))\n```\n\nColors and Gradients\n\n```py\nfrom rich_style import presets, foreground, background\n\nprint(foreground(presets.red, \"Red text\"))\nprint(background(presets.blue, \"Text with blue background\"))\n```\n\nColors and Gradients\n\n```py\nfrom rich_style import presets, foreground, background\n\nprint(foreground(presets.red, \"Red text\"))\nprint(background(presets.blue, \"Text with blue background\"))\n```\n\nRainbow Text\n\n```py\nfrom rich_style import rainbow_text\nprint(rainbow_text(\"This is a rainbow text message.\"))\n```\n\nUtility Prints\n\n```py\nfrom rich_style import info, success, warn, error, timed_print\n\ninfo(\"This is an informational message.\")\nsuccess(\"This is a success message.\")\nwarn(\"This is a warning message.\")\nerror(\"This is an error message.\")\ntimed_print(\"This is a timed print message.\")\n```\n\nMutable Print\n```py\nfrom rich_style import mutable_print\nfrom time import sleep\n\nmutable = mutable_print(\"Loading\")\nsleep(1)\nmutable(\"Still loading...\")\nsleep(1)\nmutable(\"Done!\\n\")\n```\n\n> [!WARNING]  \n> You can only use a mutable print when it's the last print.\n\n## Examples\n\nSee the `examples/` directory for more usage examples.\n\n## Credits\n\n- **Author:** [PcoiDev](https://github.com/PcoiDev)\n- **Inspiration:** [colorama](https://github.com/tartley/colorama), [rich](https://github.com/Textualize/rich) and [stylepy](https://github.com/web-slate/stylepy).\n\n## License\n\nThis project is licensed under the `MIT License`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python library for creating and applying full-color, linear, and circular gradients to text with easy color management.",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/PcoiDev/rich-style",
        "Repository": "https://github.com/PcoiDev/rich-style"
    },
    "split_keywords": [
        "python",
        " color",
        " colors",
        " easy",
        " cmd",
        " app",
        " manage",
        " text",
        " colour",
        " ansi",
        " terminal",
        " gradient",
        " gradients",
        " bold",
        " italic",
        " underscore",
        " command",
        " commands"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "645cddb556e3124f7f082db6159a922c95d68239da79797632864332a89aaae5",
                "md5": "9b0f4080974e59e4f8e075a51000906f",
                "sha256": "fb87968a8d52586fe798eefdb90d704e8b7854395fb085db44064b931e191951"
            },
            "downloads": -1,
            "filename": "rich_style-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b0f4080974e59e4f8e075a51000906f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 17848,
            "upload_time": "2025-08-31T20:17:55",
            "upload_time_iso_8601": "2025-08-31T20:17:55.238058Z",
            "url": "https://files.pythonhosted.org/packages/64/5c/ddb556e3124f7f082db6159a922c95d68239da79797632864332a89aaae5/rich_style-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-31 20:17:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PcoiDev",
    "github_project": "rich-style",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rich-style"
}
        
Elapsed time: 1.99283s