-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05bd2a4
commit 1437d5c
Showing
8 changed files
with
119 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,38 @@ | ||
########### | ||
############## | ||
About | ||
########### | ||
distinctipy is a lightweight python package providing functions to generate | ||
colours that are visually distinct from one another. | ||
|
||
Commonly available qualitative colormaps provided by the likes of matplotlib | ||
generally have no more than 20 colours, but for some applications it is useful | ||
to have many more colours that are clearly different from one another. | ||
distinctipy can generate lists of colours of any length, with each new colour | ||
added to the list being as visually distinct from the pre-existing colours in | ||
the list as possible. | ||
############## | ||
|
||
Commonly available qualitative colormaps have no more than 20 colours, | ||
but for some applications it is useful to have many more colours that | ||
are clearly different from one another. distinctipy can generate lists | ||
of colours of any length, with each new colour added to the list being | ||
as visually distinct from the pre-existing colours in the list as | ||
possible. It can also be customised to take into account different | ||
types of colourblindness, as well as providing utility functions such | ||
as to select an appropriate font colour for any background colour. | ||
|
||
================== | ||
GitHub | ||
================== | ||
|
||
Check out our repo on `GitHub | ||
<https://github.com/alan-turing-institute/distinctipy>`_. We welcome | ||
questions and contributions of any kind. | ||
|
||
================== | ||
References | ||
================== | ||
|
||
*distinctipy* was heavily influenced and inspired by several web sources and | ||
stack overflow answers. In particular: | ||
|
||
* **Random generation of distinct colours:** `Andrew Dewes on GitHub <https://gist.github.com/adewes/5884820>`_ | ||
* **Colour distance metric:** `Thiadmer Riemersma at CompuPhase <https://www.compuphase.com/cmetric.htm>`_ | ||
* **Best text colour for background:** `Mark Ransom on Stack Overflow <https://stackoverflow.com/a/3943023>`_ | ||
* **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) | ||
|
||
======================= | ||
Citing distinctipy | ||
======================= | ||
|
||
If you would like to cite distinctipy, please refer to the upload of the package on `Zenodo <https://doi.org/10.5281/zenodo.3985191>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
############## | ||
Documentation | ||
API Reference | ||
############## | ||
|
||
distinctipy core | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
################# | ||
Installation | ||
################# | ||
|
||
*distinctipy* is tetsted on Python 3.7 - 3.10 (on Linux, Windows and Mac) and can be installed from PyPI using pip:: | ||
|
||
pip install distinctipy | ||
|
||
Alternatively, to install it from source:: | ||
|
||
git clone https://github.com/alan-turing-institute/distinctipy.git | ||
cd distinctipy | ||
pip install . | ||
|
||
======================= | ||
Optional Dependencies | ||
======================= | ||
|
||
Starting in version 1.2.1 `distinctipy` no longer bundles `matplotlib` or `pandas` in the default installation, | ||
to keep its footprint as small as possible. If you wish to view colours (e.g. with`distinctipy.color_swatch`) | ||
or examples you will need `matplotlib` and `pandas` installed. To do this, either install `distinctipy` with the | ||
optional flag:: | ||
pip install 'distinctipy[optional]' | ||
|
||
Or install them separately:: | ||
|
||
pip install matplotlib pandas |
Large diffs are not rendered by default.
Oops, something went wrong.