{ "info": { "author": "Eray Erdin", "author_email": "eraygezer.94@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Multimedia :: Graphics" ], "description": "# colormask\n\n[![PyPI](https://img.shields.io/pypi/v/colormask.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/colormask/)\n[![PyPI](https://img.shields.io/pypi/pyversions/colormask.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/colormask/)\n[![PyPI](https://img.shields.io/pypi/status/colormask.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/colormask/)\n[![PyPI](https://img.shields.io/pypi/l/colormask.svg?style=flat-square)](https://pypi.org/project/colormask/)\n[![Telegram](https://img.shields.io/badge/telegram-%40erayerdin-%2332afed.svg?style=flat-square&logo=telegram&logoColor=white)](https://t.me/erayerdin)\n\n`colormask` is a Python app to mask image based on based on colors in\nPython.\n\n| | Build | Coverage |\n|--------------|-------|----------|\n| **Master** | [![Travis (.com) master](https://img.shields.io/travis/com/erayerdin/colormask/master.svg?style=flat-square&logo=travis&logoColor=white)](https://travis-ci.org/erayerdin/colormask) | [![Codecov master](https://img.shields.io/codecov/c/github/erayerdin/colormask/master.svg?style=flat-square&logo=codecov&logoColor=white)](https://codecov.io/gh/erayerdin/colormask) |\n| **Development** | [![Travis (.com) development](https://img.shields.io/travis/com/erayerdin/colormask/development.svg?style=flat-square&logo=travis&logoColor=white)](https://travis-ci.org/erayerdin/colormask) | [![Codecov development](https://img.shields.io/codecov/c/github/erayerdin/colormask/development.svg?style=flat-square&logo=codecov&logoColor=white)](https://codecov.io/gh/erayerdin/colormask) |\n\nInput with green square `RGBA` mode PNG:\n\n![](assets/input.png)\n\nOutput, masked green to red:\n\n![](assets/output.png)\n\n# Requirements\n\n - Python 3.5 and onwards\n - Pillow\n\n# How to Use It\n\nAt first, you need to define a source and target color:\n\n```python\nfrom colormask.color import RGBColor\n\nsource = RGBColor(0, 255, 0) # green\ntarget = RGBColor(255, 0, 0) # red\n```\n\nThen, you need to create a mask based on these source and target colors:\n\n```python\nfrom colormask.color import Mask\n\nmask = Mask(source, target)\n\n# pack all masks into a set\nmasks = {mask}\n```\n\n\nNow, you can mask the green to red, by using `mask_image` function:\n\n```python\nfrom colormask import mask_image\n\n# get an instance of an Image\n# assuming you have one called \"image\"\nmask_image(image, masks)\nimage.show() # see image\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/erayerdin/colormask/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/erayerdin/colormask", "keywords": "python image processing mask masking logo icon", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "colormask", "package_url": "https://pypi.org/project/colormask/", "platform": "", "project_url": "https://pypi.org/project/colormask/", "project_urls": { "Download": "https://github.com/erayerdin/colormask/archive/master.zip", "Homepage": "https://github.com/erayerdin/colormask" }, "release_url": "https://pypi.org/project/colormask/0.1.0a1/", "requires_dist": null, "requires_python": "", "summary": "colormask is a library to mask image based on colors.", "version": "0.1.0a1" }, "last_serial": 4575612, "releases": { "0.1.0a1": [ { "comment_text": "", "digests": { "md5": "53e7ccfb4e806723be1965a1ee91cf90", "sha256": "cf7cc68e5ece08769e399a0f2b6328880355e99f65baa7e4d324bf5825cee5e4" }, "downloads": -1, "filename": "colormask-0.1.0a1.tar.gz", "has_sig": false, "md5_digest": "53e7ccfb4e806723be1965a1ee91cf90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3418, "upload_time": "2018-12-08T16:47:43", "url": "https://files.pythonhosted.org/packages/34/a7/1d12b627932c22f313d6491b6a22dbe010e5b081ac65e0aee1631a5419e5/colormask-0.1.0a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "53e7ccfb4e806723be1965a1ee91cf90", "sha256": "cf7cc68e5ece08769e399a0f2b6328880355e99f65baa7e4d324bf5825cee5e4" }, "downloads": -1, "filename": "colormask-0.1.0a1.tar.gz", "has_sig": false, "md5_digest": "53e7ccfb4e806723be1965a1ee91cf90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3418, "upload_time": "2018-12-08T16:47:43", "url": "https://files.pythonhosted.org/packages/34/a7/1d12b627932c22f313d6491b6a22dbe010e5b081ac65e0aee1631a5419e5/colormask-0.1.0a1.tar.gz" } ] }