colorifix


Namecolorifix JSON
Version 2.0.4 PyPI version JSON
download
home_pagehttps://github.com/mortafix/Colorifix
SummaryA python module to color your terminal output life
upload_time2022-06-14 14:56:35
maintainer
docs_urlNone
authorMoris Doratiotto
requires_python>=3.6
license
keywords color bash terminal crayons
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/colorifix)
[![PyPI](https://img.shields.io/pypi/v/colorifix?color=red)](https://pypi.org/project/colorifix/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

# Setup

```
pip3 install colorifix
```

# Requirements
* Python 3.6+

# Usage
It's very simple to use, just remember three symbols:
* `#` to set a **color**
* `@` to set a **style**
* `!` to set a **background**
```python
from colorifix.colorifix import paint

paint("[#red]String to color in red [#blue]and in blue")
paint("[#yellow !green]One color and background at a time,[#red #cyan] last set win")
paint("[@bold @underline]Many styles in one [@dim]string")
paint("[#44 !123]You can use int bash colors")
```
![Examples](images/examples.png)
### Remove styles
You can **remove** every part of a style with the symbol `/` followed by the symbol of the style you want to remove. You can use it alone to remove every styles, it will remove every styles anyway at the end of the string.
```python
paint("[#yellow @underline]This is a yellow underline string[/@], now only yellow[/].")
```
![Remove example](images/remove.png)
### Print or not print
You can choose to **print** the string or just **save** it in a variable.
```python
colored_str = paint("[!black @dim]Hello Color![/]") # save it
ppaint("[!42]Again![/]") # print it directly
paint("[!42]Again![/]", False) # print it from main function, same as above
```

# Colors
To disaply all different colors, you can use the function `sample`
```python
from colorifix.colorifix import sample

sample()  # base colors
sample(complete=True)  # to display all bash int colors
```
![Base colors](images/colors.png)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mortafix/Colorifix",
    "name": "colorifix",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "color,bash,terminal,crayons",
    "author": "Moris Doratiotto",
    "author_email": "moris.doratiotto@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/75/f5/0ffd76c05f8aa537045c02a58b1ef097ad5e6a029851d5e8a9357d243039/colorifix-2.0.4.tar.gz",
    "platform": null,
    "description": "![PyPI - Python Version](https://img.shields.io/pypi/pyversions/colorifix)\n[![PyPI](https://img.shields.io/pypi/v/colorifix?color=red)](https://pypi.org/project/colorifix/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# Setup\n\n```\npip3 install colorifix\n```\n\n# Requirements\n* Python 3.6+\n\n# Usage\nIt's very simple to use, just remember three symbols:\n* `#` to set a **color**\n* `@` to set a **style**\n* `!` to set a **background**\n```python\nfrom colorifix.colorifix import paint\n\npaint(\"[#red]String to color in red [#blue]and in blue\")\npaint(\"[#yellow !green]One color and background at a time,[#red #cyan] last set win\")\npaint(\"[@bold @underline]Many styles in one [@dim]string\")\npaint(\"[#44 !123]You can use int bash colors\")\n```\n![Examples](images/examples.png)\n### Remove styles\nYou can **remove** every part of a style with the symbol `/` followed by the symbol of the style you want to remove. You can use it alone to remove every styles, it will remove every styles anyway at the end of the string.\n```python\npaint(\"[#yellow @underline]This is a yellow underline string[/@], now only yellow[/].\")\n```\n![Remove example](images/remove.png)\n### Print or not print\nYou can choose to **print** the string or just **save** it in a variable.\n```python\ncolored_str = paint(\"[!black @dim]Hello Color![/]\") # save it\nppaint(\"[!42]Again![/]\") # print it directly\npaint(\"[!42]Again![/]\", False) # print it from main function, same as above\n```\n\n# Colors\nTo disaply all different colors, you can use the function `sample`\n```python\nfrom colorifix.colorifix import sample\n\nsample()  # base colors\nsample(complete=True)  # to display all bash int colors\n```\n![Base colors](images/colors.png)\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python module to color your terminal output life",
    "version": "2.0.4",
    "project_urls": {
        "Homepage": "https://github.com/mortafix/Colorifix"
    },
    "split_keywords": [
        "color",
        "bash",
        "terminal",
        "crayons"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75f50ffd76c05f8aa537045c02a58b1ef097ad5e6a029851d5e8a9357d243039",
                "md5": "cc1b0de717ec11bfa99fa607740e2747",
                "sha256": "38fe5ed76dbdfa06efeffb392e0532e76abddd70c54d90646ea40b982f748f0b"
            },
            "downloads": -1,
            "filename": "colorifix-2.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "cc1b0de717ec11bfa99fa607740e2747",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4386,
            "upload_time": "2022-06-14T14:56:35",
            "upload_time_iso_8601": "2022-06-14T14:56:35.687534Z",
            "url": "https://files.pythonhosted.org/packages/75/f5/0ffd76c05f8aa537045c02a58b1ef097ad5e6a029851d5e8a9357d243039/colorifix-2.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-06-14 14:56:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mortafix",
    "github_project": "Colorifix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "colorifix"
}
        
Elapsed time: 0.19314s