{ "info": { "author": "Jack Roberts", "author_email": "jroberts@turing.ac.uk", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering :: Visualization", "Topic :: Utilities" ], "description": "![distinctipy logo](https://raw.githubusercontent.com/alan-turing-institute/distinctipy/master/distinctipy_logo.png)\n\n*distinctipy* is a lightweight python package providing functions to generate\ncolours that are visually distinct from one another.\n\nCommonly available qualitative colormaps provided by the likes of matplotlib\ngenerally have no more than 20 colours, but for some applications it is useful\nto have many more colours that are clearly different from one another.\n*distinctipy* can generate lists of colours of any length, with each new colour\nadded to the list being as visually distinct from the pre-existing colours in\n the list as possible.\n\n## Installation\n\n*distinctipy* is designed for Python 3 and can be installed with pip by running:\n\n```python\npip3 install distinctipy\n```\n\nAlternatively clone the repo and then in its parent directory run:\n```bash\npip3 install -r requirements.txt\npip3 install .\n```\n\n## Usage and Examples\n\n*distinctipy* can:\n* Generate N visually distinct colours: `distinctipy.get_colors(N)`\n* Generate colours that are distinct from an existing list of colours: `distinctipy.get_colors(N, existing_colors)`\n* Generate pastel colours: `distinctipy.get_colors(N, pastel_factor=0.7)`\n* Select black or white as the best font colour for any background colour: `distinctipy.get_text_color(background_color)`\n* Convert lists of colours into matplotlib colormaps: `distinctipy.get_colormap(colors)`\n* Invert colours: `distinctipy.invert_colors(colors)`\n* Nicely display generated colours: `distinctipy.color_swatch(colors)`\n* Compare distinctipy colours to other common colormaps: `examples.compare_clusters()` and `examples.compare_colors()`\n* Simulate how colours look for someone with colourblindness: `colorblind.simulate_colors(colors, colorblind_type='Deuteranomaly')`\n* Attempt to generate colours as distinct as possible for someone with colourblindness `distinctipy.get_colors(N, existing_colors)`\n\nFor example, to create and then display N = 36 visually distinct colours:\n\n```python\nfrom distinctipy import distinctipy\n\n# number of colours to generate\nN = 36\n\n# generate N visually distinct colours\ncolors = distinctipy.get_colors(N)\n\n# display the colours\ndistinctipy.color_swatch(colors)\n```\n\nMore detailed usage and example output can be found in the notebook **[examples.ipynb](https://github.com/alan-turing-institute/distinctipy/blob/master/examples.ipynb)** and **[examples gallery](https://github.com/alan-turing-institute/distinctipy/tree/master/examples)**.\n\n## References\n\n*distinctipy* was heavily influenced and inspired by several web sources and\nstack overflow answers. In particular:\n* **Random generation of distinct colours:** [Andrew Dewes on GitHub](https://gist.github.com/adewes/5884820)\n* **Colour distance metric:** [Thiadmer Riemersma at CompuPhase](https://www.compuphase.com/cmetric.htm)\n* **Best text colour for background:** [Mark Ransom on Stack Overflow](https://stackoverflow.com/a/3943023)\n* **Colourblindness Filters:** [Matthew Wickline and the Human-Computer Interaction Resource Network](http://web.archive.org/web/20090318054431/http://www.nofunc.com/Color_Blindness_Library) (web archive)\n\nThanks!\n\n\n", "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/alan-turing-institute/distinctipy", "keywords": "color colour palette colormap colorblind colourblind", "license": "", "maintainer": "", "maintainer_email": "", "name": "distinctipy", "package_url": "https://pypi.org/project/distinctipy/", "platform": "", "project_url": "https://pypi.org/project/distinctipy/", "project_urls": { "Homepage": "https://github.com/alan-turing-institute/distinctipy" }, "release_url": "https://pypi.org/project/distinctipy/1.1.1/", "requires_dist": [ "matplotlib", "numpy", "pandas" ], "requires_python": "", "summary": "A lightweight package for generating visually distinct colours.", "version": "1.1.1" }, "last_serial": 5534389, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "d89e1ff439c7aa2b0bd7bf84d8ccab46", "sha256": "9d4b8eb502d13979fff1faeb349a3df7f12fe6a80cedd962837d0ae962254a61" }, "downloads": -1, "filename": "distinctipy-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d89e1ff439c7aa2b0bd7bf84d8ccab46", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6656, "upload_time": "2019-05-24T17:38:31", "url": "https://files.pythonhosted.org/packages/69/90/840ca8d632f1d1670a3d7f159cca1e5317c62d1b1df38500f61f57c5498a/distinctipy-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f212c0576385ebc717477d65ceacc971", "sha256": "2e72464b65e96d8b8c49519fa7f367ebaddb4e9596b402613a36ae27114207f8" }, "downloads": -1, "filename": "distinctipy-1.0.tar.gz", "has_sig": false, "md5_digest": "f212c0576385ebc717477d65ceacc971", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5130, "upload_time": "2019-05-24T17:38:33", "url": "https://files.pythonhosted.org/packages/df/fd/26031457ca82365e83fedc759330a9d4c428fcc8f8a161dc56cc09f81ed6/distinctipy-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "1ab97192042d63625f71f33c5ab8052c", "sha256": "fb0fd957ad75aa096a5955bf803e217376376afcb1103bf293bac514fc228ffc" }, "downloads": -1, "filename": "distinctipy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1ab97192042d63625f71f33c5ab8052c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7284, "upload_time": "2019-05-28T10:07:22", "url": "https://files.pythonhosted.org/packages/5c/73/1f457ed5d177678f0302b204e8e1461974ee4b023bba037ced31230a4ea9/distinctipy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f7b9c7bf5b44cf49d805ea4a3ea0174", "sha256": "4b660137396dd12364632380ebdda349134987eea79ab6aa4a6aaa85eec6a126" }, "downloads": -1, "filename": "distinctipy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "0f7b9c7bf5b44cf49d805ea4a3ea0174", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5732, "upload_time": "2019-05-28T10:07:24", "url": "https://files.pythonhosted.org/packages/ba/83/92fb3b7b738528fa69dab23bc0994ca09892268936f31f5d172328a98fe8/distinctipy-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7d8e2c0dd9bb7a82e7eb1bf6183f3df2", "sha256": "af706db4872687ddcbdeca98efc9f65f3c953209e89fd70f4ea74890349ba13e" }, "downloads": -1, "filename": "distinctipy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7d8e2c0dd9bb7a82e7eb1bf6183f3df2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7299, "upload_time": "2019-05-28T10:12:45", "url": "https://files.pythonhosted.org/packages/42/70/f736656760a2a4518073ff4953840fa20be23ca593b2c7cf1cea67fee701/distinctipy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fbd8cd791db1287db07b731272618ef4", "sha256": "9195c1a61cb08c42f82f8bc875fa9435b8c2d4fc771b7ab83d0b3d77cfadcfd4" }, "downloads": -1, "filename": "distinctipy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "fbd8cd791db1287db07b731272618ef4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5732, "upload_time": "2019-05-28T10:12:47", "url": "https://files.pythonhosted.org/packages/2b/68/7f06461194b57af1474e602b02da754643aad3e175decdf33b7c0d4fc681/distinctipy-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "de46bc0728d32e2697c5ed46ef47a543", "sha256": "372e0952ad83b219d5342a81b2493310801b676a466e9921a920575b09cd43e1" }, "downloads": -1, "filename": "distinctipy-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "de46bc0728d32e2697c5ed46ef47a543", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7298, "upload_time": "2019-05-28T10:15:30", "url": "https://files.pythonhosted.org/packages/30/9e/ca8f425227d67d6cf14fa0d9c1e2b756db0f372a7bf44983a76a77393fea/distinctipy-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e44eabd1d227574c7c84f5e3b2010a0a", "sha256": "02531ca3a444c31f24aeb13467b8336173e3d507a4ab18ae20c141cfb8929e45" }, "downloads": -1, "filename": "distinctipy-1.0.3.tar.gz", "has_sig": false, "md5_digest": "e44eabd1d227574c7c84f5e3b2010a0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5728, "upload_time": "2019-05-28T10:15:32", "url": "https://files.pythonhosted.org/packages/c1/e1/1b5995fa32da8149d668cf6998b1416532d5a69d4914d405e87ac1b92cd4/distinctipy-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "68b5b8bee93c38ddcca1d87069e39246", "sha256": "afcd09be94ab19af798e0e8efb56a0e01fb20bc63dd7d06ce84b826bd52f3f7c" }, "downloads": -1, "filename": "distinctipy-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "68b5b8bee93c38ddcca1d87069e39246", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10863, "upload_time": "2019-05-29T15:08:02", "url": "https://files.pythonhosted.org/packages/10/01/272392e8e91e70e5364d46e5e564756ec70f6cedf0e3b6c6b209456525e2/distinctipy-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cd862bfe24ea31fa68477182b902d6d", "sha256": "45255994f733a11a38f71e4ef8f9e1a281c56b34fa8185ac2ee21b87636137c9" }, "downloads": -1, "filename": "distinctipy-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2cd862bfe24ea31fa68477182b902d6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9445, "upload_time": "2019-05-29T15:08:06", "url": "https://files.pythonhosted.org/packages/f6/54/899cfdf5246f2317041b428e720084d1c5ca57f9829e44d054bc1205b538/distinctipy-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "eee6557e7ab95e37520186e9a128a172", "sha256": "0228fd198ac13f91106ee78c32acec4713f54a11cb9daf44da79b4b00467a161" }, "downloads": -1, "filename": "distinctipy-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "eee6557e7ab95e37520186e9a128a172", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23898, "upload_time": "2019-07-15T10:51:42", "url": "https://files.pythonhosted.org/packages/40/2e/5e7ce67bffb4b6ab3cb9b4896512e4b05ffe547c883821fa712ed243bd6b/distinctipy-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "559535f826e3012dade9a3034a11d49f", "sha256": "588fe0c248ef9b58385c2f89fbeba39a39bcf0d618a5b3139bd729c90a652319" }, "downloads": -1, "filename": "distinctipy-1.1.1.tar.gz", "has_sig": false, "md5_digest": "559535f826e3012dade9a3034a11d49f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23744, "upload_time": "2019-07-15T10:51:44", "url": "https://files.pythonhosted.org/packages/1a/bd/9f001fea876664f6cb15fac7d681fb93a332136b249483c4e1f6fa5a7f9c/distinctipy-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eee6557e7ab95e37520186e9a128a172", "sha256": "0228fd198ac13f91106ee78c32acec4713f54a11cb9daf44da79b4b00467a161" }, "downloads": -1, "filename": "distinctipy-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "eee6557e7ab95e37520186e9a128a172", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23898, "upload_time": "2019-07-15T10:51:42", "url": "https://files.pythonhosted.org/packages/40/2e/5e7ce67bffb4b6ab3cb9b4896512e4b05ffe547c883821fa712ed243bd6b/distinctipy-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "559535f826e3012dade9a3034a11d49f", "sha256": "588fe0c248ef9b58385c2f89fbeba39a39bcf0d618a5b3139bd729c90a652319" }, "downloads": -1, "filename": "distinctipy-1.1.1.tar.gz", "has_sig": false, "md5_digest": "559535f826e3012dade9a3034a11d49f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23744, "upload_time": "2019-07-15T10:51:44", "url": "https://files.pythonhosted.org/packages/1a/bd/9f001fea876664f6cb15fac7d681fb93a332136b249483c4e1f6fa5a7f9c/distinctipy-1.1.1.tar.gz" } ] }