{"id":15361294,"url":"https://github.com/cokelaer/colormap","last_synced_at":"2025-04-14T03:13:07.391Z","repository":{"id":20904510,"uuid":"24192193","full_name":"cokelaer/colormap","owner":"cokelaer","description":"Utilities to visualise and create matplotlib colormaps and various color codecs","archived":false,"fork":false,"pushed_at":"2025-01-31T17:03:28.000Z","size":736,"stargazers_count":35,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T03:12:49.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cokelaer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-18T14:52:04.000Z","updated_at":"2025-01-31T17:03:32.000Z","dependencies_parsed_at":"2024-04-28T16:30:38.678Z","dependency_job_id":"aafd6da5-e358-43f2-a072-5f48ad70d582","html_url":"https://github.com/cokelaer/colormap","commit_stats":{"total_commits":94,"total_committers":6,"mean_commits":"15.666666666666666","dds":0.05319148936170215,"last_synced_commit":"5eb343a1fcf4498368489990a83e2584b1ee7c9c"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cokelaer%2Fcolormap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cokelaer%2Fcolormap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cokelaer%2Fcolormap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cokelaer%2Fcolormap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cokelaer","download_url":"https://codeload.github.com/cokelaer/colormap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813801,"owners_count":21165634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:54:26.104Z","updated_at":"2025-04-14T03:13:07.386Z","avatar_url":"https://github.com/cokelaer.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"#############################\nCOLORMAP documentation\n#############################\n\n\n.. image:: https://raw.githubusercontent.com/cokelaer/colormap/main/doc/source/_static/colormap_logo_256.png\n    :target: https://raw.githubusercontent.com/cokelaer/colormap/main/doc/source/_static/colormap_logo_256.png\n\n.. image:: https://badge.fury.io/py/colormap.svg\n    :target: https://pypi.python.org/pypi/colormap\n\n.. image:: https://github.com/cokelaer/colormap/actions/workflows/ci.yml/badge.svg?branch=main\n    :target: https://github.com/cokelaer/colormap/actions/workflows/ci.yml\n\n.. image:: https://coveralls.io/repos/cokelaer/colormap/badge.png?branch=main\n    :target: https://coveralls.io/r/cokelaer/colormap?branch=main\n\n.. image:: https://static.pepy.tech/personalized-badge/colormap?period=month\u0026units=international_system\u0026left_color=black\u0026right_color=orange\u0026left_text=Downloads\n    :target: https://pepy.tech/project/colormap\n\n.. image:: http://readthedocs.org/projects/colormap/badge/?version=main\n    :target: http://colormap.readthedocs.org/en/latest/?badge=main\n    :alt: Documentation Status\n\n\n\n\n:version: Python 3.9, 3.10, 3.11, 3.12\n:contributions: Please join https://github.com/cokelaer/colormap\n:issues: Please use https://github.com/cokelaer/colormap/issues\n:notebook: Please see https://github.com/cokelaer/colormap/tree/main/notebooks\n\n\nWhat is it ?\n################\n\n**colormap** package provides utilities to convert colors between\nRGB, HEX, HLS, HUV and a framework to easily create and build colormaps for matplotlib. All\nmatplotlib colormaps and some R colormaps are also available altogether. The\nplot_colormap method (see below) is handy to quickly pick up a colormaps and\nthe test_colormap is useful to see a live version of the new colormap.\n\n\nInstallation\n###################\n\n::\n\n    pip install colormap\n\nUsage examples\n###############\n\n1. convert RGB to HEX:\n\n::\n\n    from colormap import rgb2hex, hex2rgb\n\n    hex_color = rgb2hex(255, 0, 0)  # Red color in HEX\n    print(hex_color)  # Output: \"#ff0000\"\n\n    rgb_color = hex2rgb(\"#ff0000\")  # Convert back to RGB\n    print(rgb_color)  # Output: (255, 0, 0)\n\n2. Generate a Custom colormap:\n\nCreate your own colormap. For instance, from red to green colors with intermediate color as\nwhitish (diverging map from red to green)::\n\n      from colormap import Colormap\n      c = Colormap()\n      mycmap = c.cmap( {'red':[1,1,0], 'green':[0,1,.39], 'blue':[0,1,0]})\n      cmap = c.test_colormap(mycmap)\n\nEven simpler if the colormap is linear using color's name::\n\n      from colormap import Colormap\n      c = Colormap()\n      mycmap = c.cmap_linear('red', 'white', 'green(w3c)')\n      cmap = c.test_colormap(mycmap)\n\n.. image:: https://colormap.readthedocs.io/en/latest/_images/quickstart-6.png\n    :width: 50%\n    :align: center\n\n3. Visualise existing matplotlib colormap:\n\n::\n\n      from colormap import plot_colormap, plot_category\n      plot_colormap(\"viridis\")\n\n\nUsing the Colormap instance, you can see all valid names using::\n\n      c.colormaps\n\nMatplotlib is very well known in the PYthon ecosystem and has categorised colormaps into categories such as a\n\"diverging\". To visualise all of them::\n\n      plot_category('diverging')\n\n.. image:: https://colormap.readthedocs.io/en/latest/_images/quickstart-4.png\n    :width: 50%\n    :align: center\n\nOther sets of colormaps are : sequentials, sequentials2, misc, diverging, qualitative\n\n\n\nSee online documentation for details: http://colormap.readthedocs.io/\n\nchangelog\n#########\n\n========= ================================================================================\nVersion   Description\n========= ================================================================================\n1.3.0     * support for poetry 2.0 thanks to @cjwatson PR#26\n          * Slightly better doc\n1.2.0\n1.1.0     * switch to pyproject. remove easydev dependency. compat for python 3.11 and\n            3.12\n1.0.6     * Fix a matplotlib deprecation\n          * Fix RTD documentation\n1.0.5     * remove Python3.6 and added Python3.10 to CI action\n          * Fix issue in setup reported in https://github.com/cokelaer/colormap/pull/14\n          * add requirements in MANIFEST\n          * applied black on all files\n========= ================================================================================\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcokelaer%2Fcolormap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcokelaer%2Fcolormap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcokelaer%2Fcolormap/lists"}