colorcodes-elunico


Namecolorcodes-elunico JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/elunico/colorcodes
SummaryA flexible utiltity for printing out text in various colors and styles
upload_time2024-03-01 21:28:45
maintainer
docs_urlNone
authorThomas Povinelli
requires_python>=3.11
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Color Codes

`colorcodes.py` is a module that helps you print color formatted text.

You can do this in many ways

## Inserting colors into strings

You can use string formatting and the `ColorCode` objects to print colored text

```python
from colorcodes import blue
print("Hello, {}world".format(blue))
```

This is good for simple, permanent color changes.

You can also combine these with the `+` operator

```python
from colorcodes import blue, bold, uline
print("Hello, {}world".format(blue + bold + uline))
```


If you do not need to intermingle color and style then you can use individual `ColorCode`s `print()` method

```python
import colorcodes

colorcodes.magenta.print("This text is all magenta")
```

These can also be combined using the `+` operator

```python
import colorcodes

(colorcodes.magenta + colorcodes.bold).print("This text is all magenta")
```

Finally, you can use the `cfs` (short for Color Format String) wrapper class to print colored values with format specifiers

```python
      #normal  #red  #mag #black
print("Welcome {:+r} {:m}{:k}".format(cfs('to the'), cfs('Jungle'), cfs('!')))
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/elunico/colorcodes",
    "name": "colorcodes-elunico",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thomas Povinelli",
    "author_email": "tompov227@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7c/e6/f0a77d6b4ce3f4ec18be4b4428b6e60d9ba843e5602cd13031a9026d7145/colorcodes-elunico-1.0.0.tar.gz",
    "platform": null,
    "description": "# Color Codes\n\n`colorcodes.py` is a module that helps you print color formatted text.\n\nYou can do this in many ways\n\n## Inserting colors into strings\n\nYou can use string formatting and the `ColorCode` objects to print colored text\n\n```python\nfrom colorcodes import blue\nprint(\"Hello, {}world\".format(blue))\n```\n\nThis is good for simple, permanent color changes.\n\nYou can also combine these with the `+` operator\n\n```python\nfrom colorcodes import blue, bold, uline\nprint(\"Hello, {}world\".format(blue + bold + uline))\n```\n\n\nIf you do not need to intermingle color and style then you can use individual `ColorCode`s `print()` method\n\n```python\nimport colorcodes\n\ncolorcodes.magenta.print(\"This text is all magenta\")\n```\n\nThese can also be combined using the `+` operator\n\n```python\nimport colorcodes\n\n(colorcodes.magenta + colorcodes.bold).print(\"This text is all magenta\")\n```\n\nFinally, you can use the `cfs` (short for Color Format String) wrapper class to print colored values with format specifiers\n\n```python\n      #normal  #red  #mag #black\nprint(\"Welcome {:+r} {:m}{:k}\".format(cfs('to the'), cfs('Jungle'), cfs('!')))\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A flexible utiltity for printing out text in various colors and styles",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/elunico/colorcodes"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5560466fb8198be679cf6e578ff94d4d333d4cc979dad98bd81489fd64fcf01",
                "md5": "c0f4c2178cf993d0aa6b72795c3be283",
                "sha256": "1674e78c1a89cbc9427b80ea9a7610395bc765b7707a20d82bb5c819f5844ba4"
            },
            "downloads": -1,
            "filename": "colorcodes_elunico-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0f4c2178cf993d0aa6b72795c3be283",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 2866,
            "upload_time": "2024-03-01T21:28:42",
            "upload_time_iso_8601": "2024-03-01T21:28:42.533132Z",
            "url": "https://files.pythonhosted.org/packages/a5/56/0466fb8198be679cf6e578ff94d4d333d4cc979dad98bd81489fd64fcf01/colorcodes_elunico-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ce6f0a77d6b4ce3f4ec18be4b4428b6e60d9ba843e5602cd13031a9026d7145",
                "md5": "e5e0e52c5dcfa00edb3787707cf12a45",
                "sha256": "87693e41b07eef01f70a44a1a0f8f89a022f57ad83981104a8e24a50524b0cfe"
            },
            "downloads": -1,
            "filename": "colorcodes-elunico-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e5e0e52c5dcfa00edb3787707cf12a45",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 2827,
            "upload_time": "2024-03-01T21:28:45",
            "upload_time_iso_8601": "2024-03-01T21:28:45.194765Z",
            "url": "https://files.pythonhosted.org/packages/7c/e6/f0a77d6b4ce3f4ec18be4b4428b6e60d9ba843e5602cd13031a9026d7145/colorcodes-elunico-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 21:28:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "elunico",
    "github_project": "colorcodes",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "colorcodes-elunico"
}
        
Elapsed time: 0.26353s