Skip to main content

Paletas de cores colorblind-safe derivadas de plumagens de aves (categórica + colormaps).

Project description

plumaria

Paletas de cores colorblind-safe derivadas de plumagens de aves: uma paleta categórica de 8 cores e três colormaps contínuos (um sequencial, dois divergentes). Núcleo enxuto (só numpy para acessar cores); matplotlib é opcional, só para registrar colormaps e ajustar padrões de plotagem.

As cores foram amostradas de fotografias de plumagens (fonte: Vinícius Kohn, @viniciuskohnpassaros) e ajustadas para permanecerem distinguíveis sob os três tipos de daltonismo (deuteranopia, protanopia, tritanopia). A paleta categórica foi selecionada maximizando a distância perceptual mínima (CIE Lab), simulando o daltonismo pelas matrizes de Machado et al. (2009); o ΔE mínimo (~15) fica na mesma faixa da paleta Okabe-Ito.

Extraído de neurotools.viz para um pacote autônomo. neurotools consome o plumaria como submódulo git.

Instalação

pip install -e '.[viz]'     # com matplotlib (colormaps + set_defaults)
pip install -e .            # só o acesso às cores (numpy)

Uso

import plumaria

plumaria.categorical(3)      # ['#0A458A', '#F76F24', '#126C7D']
plumaria.register()          # registra os colormaps "aves_*" no matplotlib
plumaria.set_defaults()      # ciclo de cores categórico + cmap padrão

import matplotlib.pyplot as plt
plt.get_cmap("aves_saiazul")           # sequencial
plt.get_cmap("aves_gaturamo")          # divergente

plumaria.palettes também está disponível (from plumaria import palettes).

Colormaps

Nome Tipo
aves_saiazul sequencial (mono-matiz)
aves_gaturamo divergente
aves_beijaflor divergente

Cada colormap tem a variante invertida _r (ex.: aves_saiazul_r).

API

categorical, colormap, register, set_defaults, hex_to_rgb e os dados CATEGORICAL, CATEGORICAL_NAMES, SEQUENTIAL, DIVERGING, COLORMAPS.

Testes

pytest

Licença

MIT.

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

plumaria-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

plumaria-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file plumaria-0.1.0.tar.gz.

File metadata

  • Download URL: plumaria-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plumaria-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80ef81c21d81912395d4e36c4fb0a67f05fca240d31abe0bec238bc9b4d3faad
MD5 bbccdc7eb52ce5e4b00f0db23a1a242f
BLAKE2b-256 b2735b2ba1a3205a100627a6dac647c0ad97934a83f79609dc6a3ba22b97ec1e

See more details on using hashes here.

Provenance

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

Publisher: release.yml on napvasconcelos/plumaria

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

File details

Details for the file plumaria-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plumaria-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plumaria-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77ff75d8df945568646be592c330d8a655b0db1b00d58db41b0600630289a938
MD5 7fe8c6d6ffa472b8d1dcbb64bd4250b7
BLAKE2b-256 84cc1a9385445387e3c7eccecd65ec04cbcec75c5c3ee811a48363c446772553

See more details on using hashes here.

Provenance

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

Publisher: release.yml on napvasconcelos/plumaria

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