Skip to main content

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


Download files

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

Source Distribution

glasbeyish-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

glasbeyish-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for glasbeyish-0.1.0.tar.gz
Algorithm Hash digest
SHA256 59fbd8a9805fd8ced2897929c69efbbad4253959179f1d5f9a307109646cdecb
MD5 863f1aafec72d08890a8a2c70caeb077
BLAKE2b-256 4978520fa7143b8b2a499caf4a39ff1bf598d89b112327549b07e16e9202f26b

See more details on using hashes here.

Provenance

The following attestation bundles were made for glasbeyish-0.1.0.tar.gz:

Publisher: package.yml on actapia/glasbeyish

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for glasbeyish-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44b39ef9eead0d81969bf9547b7ffcdabebaa74770529b9a2d6961ebdbd6fdc0
MD5 baa373094e7c23ccfdd516cb2869cb22
BLAKE2b-256 491b58204da850e6dfa493db0592916ea840b1a0124fe130c02d5fcfbe29d6ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for glasbeyish-0.1.0-py3-none-any.whl:

Publisher: package.yml on actapia/glasbeyish

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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