Smooth color maps using Oklch color space for Plotly and matplotlib.
Project description
OKPaletteLab
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 Figures in Dark Mode
Installation
You can install the package via pip:
pip install ok_palette_lab
Basic Usage
-
With Plotly:
-
ok_palette_lab.plotlypackage 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.matplotlibpackage 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ok_palette_lab-0.4.0.tar.gz.
File metadata
- Download URL: ok_palette_lab-0.4.0.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf9f057cc9412b2ec85f687bf1193f8c37b795a9a5f6f9a9411d3e7b55ac936
|
|
| MD5 |
e7bc42058dd209a95203b30c50617a7d
|
|
| BLAKE2b-256 |
c7da600ad42d58ef474519bef604fcf684623e5c8a13c61941058d18bc9f5023
|
File details
Details for the file ok_palette_lab-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ok_palette_lab-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a0621814ecd3fd7c480da00ff61edbce55cb534098d9135efc32c1cd5eb6ee9
|
|
| MD5 |
97c2929ee85db21ac1e4784c978bc023
|
|
| BLAKE2b-256 |
a36f0744f8ba29ad04fe1fc1f6e45b506540310bde8ae11ea06ce974368df4d9
|