fabisschomagut


Namefabisschomagut JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/fabisschomagut
SummaryConverts back and forth between different color formats [(255,0,0),#ff0000, 16711680,(255,0,255) ... ]
upload_time2023-04-29 14:02:44
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords rgb bgr bgra convert
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Converts back and forth between different color formats [(255,0,0),#ff0000, 16711680,(255,0,255) ... ]

### pip install fabisschomagut

#### Tested against Windows 10 / Python 3.10 / Anaconda




### How to use it

```python

# Converting from one color format to another

from fabisschomagut import subtract_color,add_color,to_rgb_hex,to_rgba_hex,to_rgba_tuple,to_rgb_tuple

print(to_rgb_tuple(color="red"))
print(to_rgba_tuple(color=(255, 0, 0)))
print(to_rgb_hex(color="#ff0000"))
print(to_rgba_hex(color="0xFF0000"))


print(to_rgb_tuple(color=0xFF0000, invert=True))
print(to_rgba_tuple(color="red", invert=True))
print(to_rgb_hex(color="red", invert=True))
print(to_rgba_hex(color=(255, 0, 0), invert=True))


print(to_rgb_tuple(color="blue", invert=True))
print(to_rgba_tuple(color=(0, 255, 0), invert=True))
print(to_rgb_hex(color="ff0000", invert=False))
print(to_rgba_hex(color="#FFF000", invert=False))
print(to_rgb_tuple(color="BLUE", invert=False))
print(add_color(color1="BLUE", color2=(0, 255, 0), invert=False))

print(subtract_color(color1="pink", color2="#200000", invert=False))
print(to_rgb_hex(color=16746513, invert=False))

print(subtract_color(color1="pink", color2="0x200000", invert=False))
print(subtract_color(color1="ffc0cb", color2=0x200000, invert=False))
print(subtract_color(color1=0xFFC0CB, color2="#200000", invert=True))
print(to_rgb_hex(subtract_color(color1="pink", color2="200000", invert=True)))


# (255, 0, 0)
# (255, 0, 0, 255)
# 0xff0000
# (255, 0, 0, 255)
# 0xff0000ff
# #FF0000
# (0, 0, 255)
# (0, 0, 255, 255)
# 0x0000ff
# (0, 0, 255, 255)
# 0x0000ffff
# (255, 0, 0)
# (0, 255, 0, 255)
# 0xff0000
# (255, 240, 0, 255)
# 0xfff000ff
# (0, 0, 255)
# (0, 255, 255)
# (223, 192, 203)
# #FF8811
# 0xff8811
# (223, 192, 203)
# #200000
# (223, 192, 203)
# #FFC0CB
# (203, 192, 223)
# 0xcbc0df

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/fabisschomagut",
    "name": "fabisschomagut",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rgb,bgr,bgra,convert",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/61/39/da64834b75362a3257117d876ea6a9c89cf0d1527a919db7081702dc7ed6/fabisschomagut-0.11.tar.gz",
    "platform": null,
    "description": "# Converts back and forth between different color formats [(255,0,0),#ff0000, 16711680,(255,0,255) ... ]\r\n\r\n### pip install fabisschomagut\r\n\r\n#### Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n\r\n\r\n\r\n### How to use it\r\n\r\n```python\r\n\r\n# Converting from one color format to another\r\n\r\nfrom fabisschomagut import subtract_color,add_color,to_rgb_hex,to_rgba_hex,to_rgba_tuple,to_rgb_tuple\r\n\r\nprint(to_rgb_tuple(color=\"red\"))\r\nprint(to_rgba_tuple(color=(255, 0, 0)))\r\nprint(to_rgb_hex(color=\"#ff0000\"))\r\nprint(to_rgba_hex(color=\"0xFF0000\"))\r\n\r\n\r\nprint(to_rgb_tuple(color=0xFF0000, invert=True))\r\nprint(to_rgba_tuple(color=\"red\", invert=True))\r\nprint(to_rgb_hex(color=\"red\", invert=True))\r\nprint(to_rgba_hex(color=(255, 0, 0), invert=True))\r\n\r\n\r\nprint(to_rgb_tuple(color=\"blue\", invert=True))\r\nprint(to_rgba_tuple(color=(0, 255, 0), invert=True))\r\nprint(to_rgb_hex(color=\"ff0000\", invert=False))\r\nprint(to_rgba_hex(color=\"#FFF000\", invert=False))\r\nprint(to_rgb_tuple(color=\"BLUE\", invert=False))\r\nprint(add_color(color1=\"BLUE\", color2=(0, 255, 0), invert=False))\r\n\r\nprint(subtract_color(color1=\"pink\", color2=\"#200000\", invert=False))\r\nprint(to_rgb_hex(color=16746513, invert=False))\r\n\r\nprint(subtract_color(color1=\"pink\", color2=\"0x200000\", invert=False))\r\nprint(subtract_color(color1=\"ffc0cb\", color2=0x200000, invert=False))\r\nprint(subtract_color(color1=0xFFC0CB, color2=\"#200000\", invert=True))\r\nprint(to_rgb_hex(subtract_color(color1=\"pink\", color2=\"200000\", invert=True)))\r\n\r\n\r\n# (255, 0, 0)\r\n# (255, 0, 0, 255)\r\n# 0xff0000\r\n# (255, 0, 0, 255)\r\n# 0xff0000ff\r\n# #FF0000\r\n# (0, 0, 255)\r\n# (0, 0, 255, 255)\r\n# 0x0000ff\r\n# (0, 0, 255, 255)\r\n# 0x0000ffff\r\n# (255, 0, 0)\r\n# (0, 255, 0, 255)\r\n# 0xff0000\r\n# (255, 240, 0, 255)\r\n# 0xfff000ff\r\n# (0, 0, 255)\r\n# (0, 255, 255)\r\n# (223, 192, 203)\r\n# #FF8811\r\n# 0xff8811\r\n# (223, 192, 203)\r\n# #200000\r\n# (223, 192, 203)\r\n# #FFC0CB\r\n# (203, 192, 223)\r\n# 0xcbc0df\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Converts back and forth between different color formats [(255,0,0),#ff0000, 16711680,(255,0,255) ... ]",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/fabisschomagut"
    },
    "split_keywords": [
        "rgb",
        "bgr",
        "bgra",
        "convert"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "827757599a59a6649688ff88ec9f7bb19488f4a28a9cee647b581a51c1f6ce6f",
                "md5": "e1d689b5c1581d373d3c77e618e20ff7",
                "sha256": "3b0bc479c6ef8d78bcfe9fd04aa1beb6c094bc9492c9968097c4a29df5feb633"
            },
            "downloads": -1,
            "filename": "fabisschomagut-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e1d689b5c1581d373d3c77e618e20ff7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8718,
            "upload_time": "2023-04-29T14:02:42",
            "upload_time_iso_8601": "2023-04-29T14:02:42.416310Z",
            "url": "https://files.pythonhosted.org/packages/82/77/57599a59a6649688ff88ec9f7bb19488f4a28a9cee647b581a51c1f6ce6f/fabisschomagut-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6139da64834b75362a3257117d876ea6a9c89cf0d1527a919db7081702dc7ed6",
                "md5": "1842de65edcc3748be4d12a18731168d",
                "sha256": "bfbbd38d0921435aa13518dab7940185438e6f5db66326550eeb4bbe46938ade"
            },
            "downloads": -1,
            "filename": "fabisschomagut-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "1842de65edcc3748be4d12a18731168d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7452,
            "upload_time": "2023-04-29T14:02:44",
            "upload_time_iso_8601": "2023-04-29T14:02:44.651737Z",
            "url": "https://files.pythonhosted.org/packages/61/39/da64834b75362a3257117d876ea6a9c89cf0d1527a919db7081702dc7ed6/fabisschomagut-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-29 14:02:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "fabisschomagut",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "fabisschomagut"
}
        
Elapsed time: 0.36740s