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.
    • Cyclic color maps for periodic ranges.
  • Currently supports the following libraries:

Sample Figures

Sample figure

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:

  • Color maps for dark mode.
  • Support for more graphing libraries in Python.
  • Support for ParaView.

Repositories

License

This project is licensed under the MIT License. See LICENSE.txt 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.3.0.tar.gz (21.5 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.3.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ok_palette_lab-0.3.0.tar.gz
  • Upload date:
  • Size: 21.5 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.3.0.tar.gz
Algorithm Hash digest
SHA256 2611398d41b3653eb99bac849cc1c1c12fa7a68bd9b5ab84dc7dd8fd41b40427
MD5 700ddaaffb7157c93298a8c77c0e4f85
BLAKE2b-256 dbc7d6a06af254a93c35e0950f6d6c3a6cbf9fe332795f09c4bf0dd6cd9d8586

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ok_palette_lab-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab404a6fba52547b94fcf69b0c6eb49481c735ba22486df86dd4c6f35b9d2d8
MD5 0cbf28529520d4f760492aba3a063a86
BLAKE2b-256 7e5a6641744758a3e8f62da219deb4f7c5c38f563acbd31f5fe437ac00437c7c

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