Skip to main content

Colour science datasets for use with Colour

Project description

Develop Build Status Coverage Status Code Grade Package Version

Colour science datasets for use with Colour or any Python package manipulating colours. The datasets are hosted in Zenodo under the Colour Science - Datasets community.

It is open source and freely available under the New BSD License terms.

1   Features

Colour - Datasets was created to overcome issues encountered frequently when trying to access or use colour science datasets:

  • No straightforward ingestion path for dataset content.
  • No simple loading mechanism for dataset content.
  • Unavailability of the dataset, e.g. download url is down, dataset content is passed directly from hand to hand.
  • No information regarding the definitive origination of the dataset.

Colour - Datasets offers all the above: it allows users to ingest and load colour science datasets with a single function call. The datasets information is hosted on Zenodo where the record for a dataset typically contain:

  • An urls.txt file describing the urls to source the dataset files from.
  • A copy of those files in the eventuality where the source files are not available or the content has changed without notice.
  • Information about the authors, content and licensing.

When no explicit licensing information is available, the dataset adopts the Other (Not Open) licensing scheme, implying that assessing usage conditions is at the sole discretion of the users.

2   Online

Colour - Datasets can be used online with Google Colab.

3   Installation

3.1   Primary Dependencies

Colour - Datasets requires various dependencies in order to run:

3.2   Pypi

Once the dependencies satisfied, Colour - Datasets can be installed from the Python Package Index by issuing this command in a shell:

pip install colour-datasets

The overall development dependencies are installed as follows:

pip install 'colour-datasets[development]'

4   Usage

4.1   API

The main reference for Colour - Datasets is the Colour - Datasets Manual.

4.2   Examples

Most of the objects are available from the colour_datasets namespace:

>>> import colour_datasets

The available datasets are listed with the colour_datasets.datasets() definition:

>>> print(colour_datasets.datasets())

Datasets : 16
Synced   : 1
URL      :


[ ] 3269926 : Agfa IT8.7/2 Set
[ ] 3245883 : Camera Spectral Sensitivity Database
[ ] 3367463 : Constant Hue Loci Data
[ ] 3362536 : Constant Perceived-Hue Data
[ ] 3270903 : Corresponding-Colour Datasets
[ ] 3269920 : Forest Colors
[x] 3245875 : Labsphere SRS-99-020
[ ] 3269924 : Lumber Spectra
[ ] 3269918 : Munsell Colors Glossy (All) (Spectrofotometer Measured)
[ ] 3269916 : Munsell Colors Glossy (Spectrofotometer Measured)
[ ] 3269914 : Munsell Colors Matt (AOTF Measured)
[ ] 3269912 : Munsell Colors Matt (Spectrofotometer Measured)
[ ] 3245895 : New Color Specifications for ColorChecker SG and Classic Charts
[ ] 3252742 : Observer Function Database
[ ] 3269922 : Paper Spectra
[ ] 3372171 : RAW to ACES Utility Data

A ticked checkbox means that the particular dataset has been synced locally. A dataset is loaded by using its unique number: 3245895:

>>> print(colour_datasets.load('3245895').keys())
Pulling "New Color Specifications for ColorChecker SG and Classic Charts" record content...
Downloading "urls.txt" file: 8.19kB [00:01, 5.05kB/s]
Downloading "" file: 8.19kB [00:01, 6.52kB/s]
Downloading "" file: 8.19kB [00:01, 7.66kB/s]
Downloading "" file: 8.19kB [00:01, 7.62kB/s]
Downloading "" file: 8.19kB [00:00, 9.39kB/s]
Unpacking "/Users/kelsolaar/.colour-science/colour-datasets/3245895/dataset/" archive...
Unpacking "/Users/kelsolaar/.colour-science/colour-datasets/3245895/dataset/" archive...
Unpacking "/Users/kelsolaar/.colour-science/colour-datasets/3245895/dataset/" archive...
Unpacking "/Users/kelsolaar/.colour-science/colour-datasets/3245895/dataset/" archive...
odict_keys(['ColorChecker24 - After November 2014', 'ColorChecker24 - Before November 2014', 'ColorCheckerSG - After November 2014', 'ColorCheckerSG - Before November 2014'])

Alternatively, a dataset can be loaded by using its full title: New Color Specifications for ColorChecker SG and Classic Charts

>>> print(colour_datasets.load('3245895').keys())
odict_keys(['ColorChecker24 - After November 2014', 'ColorChecker24 - Before November 2014', 'ColorCheckerSG - After November 2014', 'ColorCheckerSG - Before November 2014'])

5   Contributing

If you would like to contribute to Colour - Datasets, please refer to the following Contributing guide for Colour.

6   Bibliography

The bibliography is available in the repository in BibTeX format.

7   Code of Conduct

The Code of Conduct, adapted from the Contributor Covenant 1.4, is available on the Code of Conduct page.

8   About

Colour - Datasets by Colour Developers
Copyright © 2019 – Colour Developers –
This software is released under terms of New BSD License:

Project details

Download files

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

Files for colour-datasets, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size colour_datasets-0.1.0-py2.py3-none-any.whl (92.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size colour-datasets-0.1.0.tar.gz (75.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page