Skip to main content

Smooth color maps using Oklch color space for Plotly and matplotlib.

Project description

OKPaletteLab

PyPI - Python Version PyPI - Version PyPI - License Gitlab pipeline status pre-commit

Icon

Smooth color maps for Plotly and Matplotlib.

  • Color maps are designed in the Oklch color space to create smooth gradients and improve data visualization.
  • The following types of color maps are provided:
    • Sequential color maps for general ranges.
    • Diverging color maps for ranges centered at zero. This project provides diverging color maps for both light and dark modes.
    • Cyclic color maps for periodic ranges.
  • Currently supports the following libraries:

Sample Figures

Sample Figures in Light Mode

Sample figure in light mode

Sample Figures in Dark Mode

Sample figure in dark mode

Installation

You can install the package via pip:

pip install ok_palette_lab

Basic Usage

  • With Plotly:

    • ok_palette_lab.plotly package provides color maps (called "color scales" in Plotly).

    • Select one and use it as follows:

      figure = plotly.graph_objects.Figure()
      figure.add_heatmap(
          # ... your data here ...
      
          # Specify a color map.
          colorscale=ok_palette_lab.plotly.autumn,
      )
      
  • With matplotlib:

    • ok_palette_lab.matplotlib package has color maps.

    • Select one and use it as follows:

      figure, axes = matplotlib.pyplot.subplots()
      heatmap = axes.imshow(
          # ... your data here ...
      
          # Specify a color map.
          cmap=ok_palette_lab.matplotlib.autumn,
      )
      

Simple Examples

Documentation

Documentation is available at web site. Documentation for each version can be viewed using the version switcher at the bottom left of the page.

Development

This project was created in January 2026 and is under active development. The following features are planned for future releases:

  • Support for more graphing libraries in Python.
  • Support for ParaView.

Repositories

License

This project is licensed under the MIT License. See LICENSE.txt in the repository for details.

Graphics created using the color maps in this project can be used freely without restriction.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ok_palette_lab-0.5.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ok_palette_lab-0.5.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file ok_palette_lab-0.5.0.tar.gz.

File metadata

  • Download URL: ok_palette_lab-0.5.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for ok_palette_lab-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d7eb2d662305b2d9942fefe5bbe73d772083f16bdb7822f6a1668f296523a687
MD5 dbc645b55439922b7ce324de5234e9c4
BLAKE2b-256 14d9eff33cd8d6bece854ba299f5b3ec29d8ac27d8fa8e5c0cb5080f7cc96f58

See more details on using hashes here.

File details

Details for the file ok_palette_lab-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ok_palette_lab-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/5.15.154+

File hashes

Hashes for ok_palette_lab-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2049d51d4b5ef24226f64279806d9d71b9688b29f5deb1e7d847996890769c82
MD5 b860046fe6989294f97003cb4c5df147
BLAKE2b-256 35749e90c3d4e69da2c6dba2b15569ab97eabe8e109663376914a1c941fc935e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page