Metadata-Version: 2.4
Name: SciColours
Version: 0.1.2
Summary: A simple package for generating spatially uniform preset colour maps and tools for calculating the CIEDE2000 to help generate custom maps
Author-email: Jake Noble <jakenoble507@gmail.com>
License: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: matplotlib>=3.9
Requires-Dist: numpy>=2.4
Requires-Dist: skimage>=0.26
Description-Content-Type: text/markdown

# 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)
