Skip to main content

A simple package for generating spatially uniform preset colour maps and tools for calculating the CIEDE2000 to help generate custom maps

Reason this release was yanked:

Changed Dependencies for Compatibility

Project description

SicColours

This package was inspired by “The misuse of colour in science communication” (F. Crameri et al.) and was originally used as a tool to help me generate a scientifically appropriate colour map for representing data. The package consists of two separate scripts, “deltaE” which contains functions to calculate the CIEDE2000 colour difference between two rgb colours and “colour” which has some of my personal colour maps.

Currently, this package is a passion project and is still under development. I will be improving the existing colour gradients and adding new gradients overtime.

deltaE

“deltaE” contains a custom script that calculates the CIEDE2000 colour difference between two rgb colours. This package also includes a few functions to plot a discrete colour gradient (as a list of rgb tuples), alongside the CIEDE2000 error, cumulative error and brigtness.

Functions:

  • deltaE2000(LAB1,LAB2) // Calculates the deltaCIEDE2000 Error between two lab space colours in the form (L,a,b).
  • LMap(colourmapRGB,colour) // Plots the brightness of each colour in "colourmapRGB" (a discrete colour gradient as a list of rgb tuples), with a line colour of "colour" (integer in range of colourmapRGB)
  • ErrMap(colourmapRGB,colour) // Plots the CIEDE2000 Error between each pair of adjacent colour in "colourmapRGB" (a discrete colour gradient as a list of rgb tuples), with a line colour of "colour" (integer in range of colourmapRGB)
  • CumErrMap(colourmapRGB,colour) // Plots the cumulative CIEDE2000 Error between each pair of adjacent colour in "colourmapRGB" (a discrete colour gradient as a list of rgb tuples), with a line colour of "colour" (integer in range of colourmapRGB)
  • VisMap(colourmapRGB) // Plots a bar of each colour in "colourmapRGB" (a discrete colour gradient as a list of rgb tuples)
  • CMap(colourmap,c1 = 0, c2 = 1, c3 = 2) // Plots all of the plots listed above together using c1, c2 and c3 as line colours (integer in range of colourmapRGB)

Colour

This package will continue to be expanded, but contains a set of custom colour maps, each of which can be generated as a categorical map, continuous map or discrete map of specified steps. The colour maps were made to be:

  • aesthetically pleasing.
  • To have an approximately consistent colour difference between adjacent colours at all points in the colour map, so the map is uniform.
  • To be monotonically increasing in brightness, so that the map is still clear for colourblind viewers While they current maps may not be perfect I aim to improve these overtime

Functions:

Each colour map is defined as follows

  • example_map(categorical = False, continuous = False, steps = 60) // categorical (generates the colourmap such that each sucessive colour is distinct), continuous (generates a matplotlib LinearSegmentedColormap), steps (integer stating how many colours should be included in a discrete colour map)

Colour Maps:

  • greyscale (greyscale colour map from black to white)
  • rianbow (Non-scientific colour map from red to green to blue back to red (used for comparison))
  • blossom (colour map from dark purple through magenta to pale pink)
  • sunrise (colour map from dark blue through red to pale yellow)
  • mangrove (colour map from dark blue through cyan to pale lime)
  • fall (colour map from dark brown through red to pale yellow)
  • frostburn (colour map from dark purple through blue to pale blue)
  • verdantia (colour map from dark green through lime to pale yellow)

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

scicolours-0.1.3.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

scicolours-0.1.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file scicolours-0.1.3.tar.gz.

File metadata

  • Download URL: scicolours-0.1.3.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for scicolours-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ab4e7c01be8ab13178a8f3de38b35f5579f637ae56c6ffd3a2ef7e8566572876
MD5 3093dc78f0a51cc2aea44bbda66c65ab
BLAKE2b-256 ce2a334de6689c656f968e650ca1d3eb0081062ef7137358514be44a799a23b5

See more details on using hashes here.

File details

Details for the file scicolours-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: scicolours-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for scicolours-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9978600db4c14afcef0d6d12be30f10f469918bcb8e25f4f861208da68f6525f
MD5 360e9b681de892b643ce8ba4eeff813f
BLAKE2b-256 42c649025c82152bc95774eac85a2936790d8e2ca359cb86c7163314dc149796

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