A library for generating color palettes with distinct colors
Project description
glasbeyish
This is a library that implements a method described in the paper "Colour Displays for Categorical Images" by Glasbey et al. for finding optimal distinct color palettes of a specified size.
Unlike the glasbey library, this library implements the simulated annealing method described in the paper rather, than the iterative method. The simulated annealing method can often give better color palettes at the expense of longer run times.
Examples
Generate a color palette with two colors.
from glasbey import glasbey
from matplotlib.colors import ListedColorMap
cm = ListedColorMap([c.to_rgb() for c in glasbey(2)])
Generate a color palette with twelve colors.
cm = ListedColorMap([c.to_rgb() for c in glasbey(12)])
Provide a random seed for reproducibility.
cm = ListedColorMap([c.to_rgb() for c in glasbey(12, seed=485)])
cm2 = cm = ListedColorMap([c.to_rgb() for c in glasbey(12, seed=485)])
assert cm1 == cm2
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 glasbeyish-0.1.0.tar.gz.
File metadata
- Download URL: glasbeyish-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59fbd8a9805fd8ced2897929c69efbbad4253959179f1d5f9a307109646cdecb
|
|
| MD5 |
863f1aafec72d08890a8a2c70caeb077
|
|
| BLAKE2b-256 |
4978520fa7143b8b2a499caf4a39ff1bf598d89b112327549b07e16e9202f26b
|
Provenance
The following attestation bundles were made for glasbeyish-0.1.0.tar.gz:
Publisher:
package.yml on actapia/glasbeyish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glasbeyish-0.1.0.tar.gz -
Subject digest:
59fbd8a9805fd8ced2897929c69efbbad4253959179f1d5f9a307109646cdecb - Sigstore transparency entry: 195892178
- Sigstore integration time:
-
Permalink:
actapia/glasbeyish@91aee103bf072ac5ba09715bf6bc2c3f54306c4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/actapia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@91aee103bf072ac5ba09715bf6bc2c3f54306c4a -
Trigger Event:
release
-
Statement type:
File details
Details for the file glasbeyish-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glasbeyish-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44b39ef9eead0d81969bf9547b7ffcdabebaa74770529b9a2d6961ebdbd6fdc0
|
|
| MD5 |
baa373094e7c23ccfdd516cb2869cb22
|
|
| BLAKE2b-256 |
491b58204da850e6dfa493db0592916ea840b1a0124fe130c02d5fcfbe29d6ec
|
Provenance
The following attestation bundles were made for glasbeyish-0.1.0-py3-none-any.whl:
Publisher:
package.yml on actapia/glasbeyish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glasbeyish-0.1.0-py3-none-any.whl -
Subject digest:
44b39ef9eead0d81969bf9547b7ffcdabebaa74770529b9a2d6961ebdbd6fdc0 - Sigstore transparency entry: 195892179
- Sigstore integration time:
-
Permalink:
actapia/glasbeyish@91aee103bf072ac5ba09715bf6bc2c3f54306c4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/actapia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@91aee103bf072ac5ba09715bf6bc2c3f54306c4a -
Trigger Event:
release
-
Statement type: