{ "info": { "author": "Dilan Ozkaynak", "author_email": "DilanJames10@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# PyColorPalette\n\nPyColorPalette is a Python 3 tool capable of pulling a list of the top colors, or the color at a specific index, from a given image through the process of K-means clustering. Images can be provided either through a direct path or from a URL. Along with the RGB/Hex color value, you have the option to also retreive the percentage of the image that specific color takes up. \n\n_**See examples below!**_\n\n## Usage\n\nPyColorPalette derives a color palette using K-means clustering to create a cluster map. To see the cluster map use ```show_clustering=True```. (Thank you, ZeevG)\n\n```python\nfrom PyColorPalette import ColorPalette\n\npal = ColorPalette(r\"/Users/user/Pictures/my_image.png\", show_clustering=False)\n#Use a raw string for Windows paths.\n\nprint(pal.get_top_colors(n=5, ratio=False, rounded=True))\n# [(251, 243, 230), (101, 50, 81), (59, 18, 48), (58, 17, 47), (60, 19, 49)]\n\nprint(pal.get_color(index=3, ratio=True, rounded=True))\n# ((58, 17, 47), 14)\n\n'''\nRetrieve values in hex.\n'''\nprint(pal.get_color(index=3, ratio=True, to_hex=True, rounded=False))\n# ('#3a112f', 14.1953125)\n```\n\n## Examples\n\n![Alt text](/examples/example1.jpg)\n![Alt text](/examples/ex_1_1.png?raw=true \"\")\n![Alt text](/examples/ex_1_2.png?raw=true \"\")\n![Alt text](/examples/ex_1_3.png?raw=true \"\")\n![Alt text](/examples/ex_1_4.png?raw=true \"\")\n![Alt text](/examples/ex_1_5.png?raw=true \"\")\n\n![Alt text](/examples/example3.jpg)\n![Alt text](/examples/ex_3_1.png?raw=true \"\")\n![Alt text](/examples/ex_3_2.png?raw=true \"\")\n![Alt text](/examples/ex_3_3.png?raw=true \"\")\n![Alt text](/examples/ex_3_4.png?raw=true \"\")\n![Alt text](/examples/ex_3_5.png?raw=true \"\")\n\n![Alt text](/examples/example2.png)\n![Alt text](/examples/ex_2_1.png?raw=true \"\")\n![Alt text](/examples/ex_2_2.png?raw=true \"\")\n![Alt text](/examples/ex_2_3.png?raw=true \"\")\n\n## Dependencies\n\nPyColorPalette uses the Python Imaging Library (PIL) and numpy.\nTo Install:\n```\npip install Pillow \npip install numpy\n```\n(Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL if previosuly installed.)\n\n## Installation\n\n```pip install PyColorPalette```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Dilan1020/PyColorPalette", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "PyColorPalette", "package_url": "https://pypi.org/project/PyColorPalette/", "platform": "", "project_url": "https://pypi.org/project/PyColorPalette/", "project_urls": { "Homepage": "https://github.com/Dilan1020/PyColorPalette" }, "release_url": "https://pypi.org/project/PyColorPalette/1.2.3/", "requires_dist": null, "requires_python": "", "summary": "", "version": "1.2.3" }, "last_serial": 4293866, "releases": { "1.2.2": [ { "comment_text": "", "digests": { "md5": "9522735cc767032073f6107e37ec915d", "sha256": "89462eb54ecc356fc64af44cf53d5d4644da921c5c0d8f28028d2e5c6392f2f3" }, "downloads": -1, "filename": "PyColorPalette-1.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9522735cc767032073f6107e37ec915d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5701, "upload_time": "2018-06-29T15:07:20", "url": "https://files.pythonhosted.org/packages/16/5d/8986172b29a319de1e123d2b29a5f31e7aa5328d89851cc85625fc6bba06/PyColorPalette-1.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "744a2b2d88cb60a0fc498baac23176cd", "sha256": "5ec6a475009b7c6e937923b785f7a21863d3b2757fb77965b83df54a1e8c8f20" }, "downloads": -1, "filename": "PyColorPalette-1.2.2.tar.gz", "has_sig": false, "md5_digest": "744a2b2d88cb60a0fc498baac23176cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4894, "upload_time": "2018-06-29T15:07:21", "url": "https://files.pythonhosted.org/packages/ef/5a/fddea484d774e01f21902bc311798bfa5cd4fbcbed2d433adbc7efb08f3f/PyColorPalette-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "915aa48b3e65a998737ad667eb749941", "sha256": "4a3f35dfdf94e99afd046efdc04b399338ef2132165c386a2a6191780999690a" }, "downloads": -1, "filename": "PyColorPalette-1.2.3.tar.gz", "has_sig": false, "md5_digest": "915aa48b3e65a998737ad667eb749941", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4848, "upload_time": "2018-09-20T19:04:01", "url": "https://files.pythonhosted.org/packages/26/f8/59d9fb4e9a0102c8dd602589fdb9e930c2381eced8fe904d44221f134d61/PyColorPalette-1.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "915aa48b3e65a998737ad667eb749941", "sha256": "4a3f35dfdf94e99afd046efdc04b399338ef2132165c386a2a6191780999690a" }, "downloads": -1, "filename": "PyColorPalette-1.2.3.tar.gz", "has_sig": false, "md5_digest": "915aa48b3e65a998737ad667eb749941", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4848, "upload_time": "2018-09-20T19:04:01", "url": "https://files.pythonhosted.org/packages/26/f8/59d9fb4e9a0102c8dd602589fdb9e930c2381eced8fe904d44221f134d61/PyColorPalette-1.2.3.tar.gz" } ] }