{ "info": { "author": "sherwinski", "author_email": "sherwinhb@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.7", "Topic :: Utilities" ], "description": "\n========\nOverview\n========\n\n\nA Python library for extracting and analyzing color palettes from images.\nAll images must be served through Imgix, more information can be found at http://www.imgix.com.\n\n* Free software: BSD 2-Clause License\n\nInstallation\n============\n\n::\n\n pip install palettetools\n\nExtracting Color Palettes\n=============\n\n\nPaletteTools allows for two different ways to extract a color palette from an image.\nThe first of these two functions will return a string in the format of a text/css MIME type:\n\n.. code-block:: python\n\n import palettetools as pt\n url = \"https://assets.imgix.net/examples/bluehat.jpg\"\n\n css_palette = pt.extract_colors_css(url)\n\n # Will return the following:\n #\n #.image-fg-1 { color:#0d0c10 !important; }\n #.image-bg-1 { background-color:#0d0c10 !important; }\n #.image-fg-2 { color:#015091 !important; }\n #.image-bg-2 { background-color:#015091 !important; }\n #.image-fg-3 { color:#0870d3 !important; }\n #.image-bg-3 { background-color:#0870d3 !important; }\n #.image-fg-4 { color:#239be0 !important; }\n #.image-bg-4 { background-color:#239be0 !important; }\n #.image-fg-5 { color:#b1dfeb !important; }\n #.image-bg-5 { background-color:#b1dfeb !important; }\n #.image-fg-6 { color:#f0c9b4 !important; }\n #.image-bg-6 { background-color:#f0c9b4 !important; }\n #.image-fg-ex-1 { color:#000000 !important; }\n #.image-bg-ex-1 { background-color:#000000 !important; }\n #.image-fg-ex-2 { color:#ffffff !important; }\n #.image-bg-ex-2 { background-color:#ffffff !important; }\n #.image-fg-vibrant { color:#0d95e4 !important; }\n #.image-bg-vibrant { background-color:#0d95e4 !important; }\n #.image-fg-muted-dark { color:#38445c !important; }\n #.image-bg-muted-dark { background-color:#38445c !important; }\n #.image-fg-muted { color:#966760 !important; }\n #.image-bg-muted { background-color:#966760 !important; }\n #.image-fg-vibrant-light { color:#72c5f4 !important; }\n #.image-bg-vibrant-light { background-color:#72c5f4 !important; }\n #.image-fg-muted-light { color:#d8b6aa !important; }\n #.image-bg-muted-light { background-color:#d8b6aa !important; }\n #.image-fg-vibrant-dark { color:#015091 !important; }\n #.image-bg-vibrant-dark { background-color:#015091 !important; }\n\nThis can be appended to a pre-existing CSS file through the following script:\n\n.. code-block:: python\n\n >>> import palettetools as pt\n >>> url = \"https://assets.imgix.net/examples/bluehat.jpg\"\n >>> css = pt.extract_colors_css(url)\n >>> file = open(\"colors.css\", 'w')\n >>> file.write(css)\n >>> file.close()\n\nColor palettes can also be extracted as a JSON object through the following function. \nAlso note that the object has 3 keys: **colors** , **average_luminance** , and **dominant_colors**\n\n.. code-block:: python\n\n import palettetools as pt\n url = \"https://assets.imgix.net/examples/bluehat.jpg\"\n\n json_palette = pt.extract_colors_json(url)\n\n print json_palette\n\n # Will return the following:\n # {\n # \"colors\": [\n # {\n # \"red\": 0.0509804,\n # \"hex\": \"#0d0c10\",\n # \"blue\": 0.0627451,\n # \"green\": 0.0470588\n # },\n # {\n # \"red\": 0.00392157,\n # \"hex\": \"#015091\",\n # \"blue\": 0.568627,\n # \"green\": 0.313725\n # },\n # {\n # \"red\": 0.0313725,\n # \"hex\": \"#0870d3\",\n # \"blue\": 0.827451,\n # \"green\": 0.439216\n # },\n # {\n # \"red\": 0.137255,\n # \"hex\": \"#239be0\",\n # \"blue\": 0.878431,\n # \"green\": 0.607843\n # },\n # {\n # \"red\": 0.694118,\n # \"hex\": \"#b1dfeb\",\n # \"blue\": 0.921569,\n # \"green\": 0.87451\n # },\n # {\n # \"red\": 0.941176,\n # \"hex\": \"#f0c9b4\",\n # \"blue\": 0.705882,\n # \"green\": 0.788235\n # }\n # ],\n # \"average_luminance\": 0.708396,\n # \"dominant_colors\": {\n # \"vibrant\": {\n # \"red\": 0.0509804,\n # \"hex\": \"#0d95e4\",\n # \"blue\": 0.894118,\n # \"green\": 0.584314\n # },\n # \"muted_light\": {\n # \"red\": 0.847059,\n # \"hex\": \"#d8b6aa\",\n # \"blue\": 0.666667,\n # \"green\": 0.713725\n # },\n # \"muted\": {\n # \"red\": 0.588235,\n # \"hex\": \"#966760\",\n # \"blue\": 0.376471,\n # \"green\": 0.403922\n # },\n # \"vibrant_dark\": {\n # \"red\": 0.00392157,\n # \"hex\": \"#015091\",\n # \"blue\": 0.568627,\n # \"green\": 0.313725\n # },\n # \"vibrant_light\": {\n # \"red\": 0.447059,\n # \"hex\": \"#72c5f4\",\n # \"blue\": 0.956863,\n # \"green\": 0.772549\n # },\n # \"muted_dark\": {\n # \"red\": 0.219608,\n # \"hex\": \"#38445c\",\n # \"blue\": 0.360784,\n # \"green\": 0.266667\n # }\n # }\n # }\n\n\nOverlaid Text Color\n=============\n\nPaletteTools can also give a suggested color for overlaid text on a specific image. \nThe function will either return the hexadecimal value for **white** or **black** depending on which is more visible for the passed in image:\n\n.. code-block:: python\n\n import palettetools as pt\n url = \"https://assets.imgix.net/examples/bluehat.jpg\"\n\n color_suggested = pt.overlay_text_color(url)\n\n print color_suggested\n\n # Will return:\n #\n # 000\n\nTesting\n===========\n\nTo run the all tests run::\n\n tox\n\n\nChangelog\n=========\n\n0.2.0 - 0.8.0 (2018-11-08)\n------------------\n\n* Debugging needed to fix broken build\n\n0.1.0 (2018-11-08)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sherwinski/palette-tools", "keywords": "image,processing,color,palette,tools,imgix", "license": "BSD 2-Clause License", "maintainer": "", "maintainer_email": "", "name": "palettetools", "package_url": "https://pypi.org/project/palettetools/", "platform": "", "project_url": "https://pypi.org/project/palettetools/", "project_urls": { "Homepage": "https://github.com/sherwinski/palette-tools" }, "release_url": "https://pypi.org/project/palettetools/0.8.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Color palette tools for processing imgix-served images.", "version": "0.8.0" }, "last_serial": 4475364, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c71e155ae97eb54e7d4995b44d96afa4", "sha256": "bff20a049e077cd3e63ecf3405c1421e04151ac2d541f455cf6488a58eb19b26" }, "downloads": -1, "filename": "palettetools-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c71e155ae97eb54e7d4995b44d96afa4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5140, "upload_time": "2018-11-09T19:20:19", "url": "https://files.pythonhosted.org/packages/99/b8/e6086edbee1b301da3d3b6b78e8edd98f58725761c12b7f23940ac9f1bf6/palettetools-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d0811be59bf79e0a3387b1a7a15624f5", "sha256": "eedfb9d70007c76f7b38ba056cf0450c2f9a109e85798649bfeb7e14ba6a2ce3" }, "downloads": -1, "filename": "palettetools-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d0811be59bf79e0a3387b1a7a15624f5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7119, "upload_time": "2018-11-11T21:46:47", "url": "https://files.pythonhosted.org/packages/50/73/51a87f58888de6a178c4422866308ca28213446e31b78d658a7a39648128/palettetools-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1331b310a6fa1ec9ca621c38942c85e", "sha256": "e5c9c6b9e2253c7bd89e882b9753d137a1aab2ffbbd760cd3c1862dbaf028a0b" }, "downloads": -1, "filename": "palettetools-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f1331b310a6fa1ec9ca621c38942c85e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7838, "upload_time": "2018-11-09T19:20:21", "url": "https://files.pythonhosted.org/packages/af/fc/b182d2f275be65d7528261a8cfdbcac4095dab343659e8ee985ac78227f8/palettetools-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "bf340a4ad6f11d94888ac53479fc5efe", "sha256": "fa9c0a7d0b505ec5e6abc0fbe17581bbb4bbf27072db4159adc01a1a03f99f87" }, "downloads": -1, "filename": "palettetools-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bf340a4ad6f11d94888ac53479fc5efe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7120, "upload_time": "2018-11-11T21:48:12", "url": "https://files.pythonhosted.org/packages/91/90/f93aab727aada6c358a867d769de2357dff1ae99faa5606e688955331c07/palettetools-0.2.0-py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "dc041a6607d0a36b8db25a6b244bb845", "sha256": "4afa5a2301e20c3e851b3fca0d1a5885d7b6ae70d1d9a2e4f4d67b76c2a69b22" }, "downloads": -1, "filename": "palettetools-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "dc041a6607d0a36b8db25a6b244bb845", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5020, "upload_time": "2018-11-11T22:01:52", "url": "https://files.pythonhosted.org/packages/08/c8/dcaf2d440348f2eb5f5b81704a1c7dbab8cdec1ca1df66fab32a3bd74a91/palettetools-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d018ba07b6555fe5ef8c83288a9da745", "sha256": "d0d7a9f9fc94bdd06ca67a10085b7878fe208f9a96ac3d83dda4ba1ce6abe18a" }, "downloads": -1, "filename": "palettetools-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d018ba07b6555fe5ef8c83288a9da745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10597, "upload_time": "2018-11-11T22:01:54", "url": "https://files.pythonhosted.org/packages/6a/24/154b383db5aade9798c0d8f6d298ef3b4c92fe958d0ce09764c6af492a09/palettetools-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8ae3246c58f9da3f2bbec7e3be3b000a", "sha256": "8b878f24b6ed2e9eca539f51bed73854ddaa1cbf95161db0102592c50bbe8b2d" }, "downloads": -1, "filename": "palettetools-0.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "8ae3246c58f9da3f2bbec7e3be3b000a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4949, "upload_time": "2018-11-11T22:27:37", "url": "https://files.pythonhosted.org/packages/51/02/92623c688284eb1b08918a8e009930e3cdf838ee65198bef09b4dab94597/palettetools-0.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebf40770c8c894a1f275bd2bab191e93", "sha256": "0740556354dc9c9b7775d23ce1174ce19f6791e2d437f081a060f16578aa5c9d" }, "downloads": -1, "filename": "palettetools-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ebf40770c8c894a1f275bd2bab191e93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10352, "upload_time": "2018-11-11T22:27:38", "url": "https://files.pythonhosted.org/packages/72/5f/5bd5bc6dbc7334ee6a72c862217d3fb8a230187a20277814d17f80160886/palettetools-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "998338b7091bdf2f61495f286074860d", "sha256": "104cd28fbf7a413cdbcb8621e0346efe4a7ea6d111ff727f71e9225382a183cc" }, "downloads": -1, "filename": "palettetools-0.5.0-py2-none-any.whl", "has_sig": false, "md5_digest": "998338b7091bdf2f61495f286074860d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4950, "upload_time": "2018-11-11T22:30:46", "url": "https://files.pythonhosted.org/packages/c8/4e/456fdad9ea5f201be36533f8c06ba459b73309d86eb7e0be3b8a059dc57a/palettetools-0.5.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "723841a3eb64751eef1423af198c589b", "sha256": "a25e06750d2ac725ab7f9c47eb1c5adbca317cf87cb9efe99e7ce9cc1f9684da" }, "downloads": -1, "filename": "palettetools-0.5.0.tar.gz", "has_sig": false, "md5_digest": "723841a3eb64751eef1423af198c589b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10216, "upload_time": "2018-11-11T22:30:47", "url": "https://files.pythonhosted.org/packages/ea/3f/1eefcbbcdfae18f849da727630545e71cc389d6481cd2487fc6465fd7cec/palettetools-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "0e89c8a6bfa7ea4959c10a0b245a6004", "sha256": "b354a0790458cc1715df5416ba00f4d7fdf42ce8f964008a1bad44606e510ef1" }, "downloads": -1, "filename": "palettetools-0.6.0-py2-none-any.whl", "has_sig": false, "md5_digest": "0e89c8a6bfa7ea4959c10a0b245a6004", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4899, "upload_time": "2018-11-11T22:40:53", "url": "https://files.pythonhosted.org/packages/2d/28/adce83faca639653216676e3d261ddaa3411a26b115720ae0824916ad4f3/palettetools-0.6.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8164cc216c725b9e08c9907c8df2f568", "sha256": "4893afbd1284ad7e28660c7667e9cb10564cad82a4f9c59a85a4b63764fd3157" }, "downloads": -1, "filename": "palettetools-0.6.0.tar.gz", "has_sig": false, "md5_digest": "8164cc216c725b9e08c9907c8df2f568", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10056, "upload_time": "2018-11-11T22:40:54", "url": "https://files.pythonhosted.org/packages/4d/41/12298f8092253972ee8cf2b11b695e159e1abe26f61d49d33a7a2223946f/palettetools-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "974b602c7daebb574ba18c4c811ebd94", "sha256": "adbe9a8d7956b04753f7614822637935c87fe4cf2c5857b4a450892335b27fa6" }, "downloads": -1, "filename": "palettetools-0.7.0-py2-none-any.whl", "has_sig": false, "md5_digest": "974b602c7daebb574ba18c4c811ebd94", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4902, "upload_time": "2018-11-11T22:42:35", "url": "https://files.pythonhosted.org/packages/bb/5b/82f82237bcafeaf63d6929da25825b688272ace0d29414499ab92b71d2c4/palettetools-0.7.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "33af0063c644da9f82ea30dd07dab74e", "sha256": "50132e5d938ae8a088c139b1ef66ec588a2f9e03a04272394700c3cabf1c0bc4" }, "downloads": -1, "filename": "palettetools-0.7.0.tar.gz", "has_sig": false, "md5_digest": "33af0063c644da9f82ea30dd07dab74e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10063, "upload_time": "2018-11-11T22:42:36", "url": "https://files.pythonhosted.org/packages/01/86/ba8199424d70dcaa2fb114f6f16db4c2bdf1f171c63cc2974ba67e14b8ec/palettetools-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "46f35663e86001dd3172a8dc58cb2a9d", "sha256": "09cb94c9a98abd5671d77368f902afed1547bb3d656a7215258d8d0c14a1ff9b" }, "downloads": -1, "filename": "palettetools-0.8.0-py2-none-any.whl", "has_sig": false, "md5_digest": "46f35663e86001dd3172a8dc58cb2a9d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4981, "upload_time": "2018-11-11T22:49:05", "url": "https://files.pythonhosted.org/packages/4a/cd/0c4ff580ecb3bc3ec7a614b27e71346d35c80b7ea6119283ffb0c9f9b2c2/palettetools-0.8.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f0e07b10931e8fc94b326d78d50786b", "sha256": "feb25dd2eb5469a93f123de82cee3c0a1cee636e84a0827d5d550c71e12eb28e" }, "downloads": -1, "filename": "palettetools-0.8.0.tar.gz", "has_sig": false, "md5_digest": "6f0e07b10931e8fc94b326d78d50786b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10440, "upload_time": "2018-11-11T22:49:08", "url": "https://files.pythonhosted.org/packages/2c/66/15f857b2a722650eb7a4353f08f1a36da4f4c20c042a85905bc642bd9c68/palettetools-0.8.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46f35663e86001dd3172a8dc58cb2a9d", "sha256": "09cb94c9a98abd5671d77368f902afed1547bb3d656a7215258d8d0c14a1ff9b" }, "downloads": -1, "filename": "palettetools-0.8.0-py2-none-any.whl", "has_sig": false, "md5_digest": "46f35663e86001dd3172a8dc58cb2a9d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4981, "upload_time": "2018-11-11T22:49:05", "url": "https://files.pythonhosted.org/packages/4a/cd/0c4ff580ecb3bc3ec7a614b27e71346d35c80b7ea6119283ffb0c9f9b2c2/palettetools-0.8.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f0e07b10931e8fc94b326d78d50786b", "sha256": "feb25dd2eb5469a93f123de82cee3c0a1cee636e84a0827d5d550c71e12eb28e" }, "downloads": -1, "filename": "palettetools-0.8.0.tar.gz", "has_sig": false, "md5_digest": "6f0e07b10931e8fc94b326d78d50786b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10440, "upload_time": "2018-11-11T22:49:08", "url": "https://files.pythonhosted.org/packages/2c/66/15f857b2a722650eb7a4353f08f1a36da4f4c20c042a85905bc642bd9c68/palettetools-0.8.0.tar.gz" } ] }