Skip to main content

Provides common color systems.

Project description

Introduction

pycolorname is a python package that aims to provide common color systems scraped from various sites.

Supported systems

  • Pantone

  • RAL-Classic

Installation

The easiest way to install the library is using pip. To install the latest stable version run:

$ pip install pycolorname

To get bightly builds from the master branch of the github repo, use:

$ pip install --pre pycolorname

Usage

To use a colorsystem, import a source from the module corresponsing to the system and create an instance of it.

To use the pantone color system, find the sources available in the pycolorname.pantone module and use one of them. For example, the PantonePaint source can be used in the following manner:

>>> from pycolorname.pantone.pantonepaint import PantonePaint
>>> pantone_colors = PantonePaint()
>>> pantone_colors["PMS 19-4914 TPX (Deep Teal)"]
(23, 73, 80)

Another example using the RAL-Classic color system from the Wikipedia source:

>>> from pycolorname.ral.classic.wikipedia import Wikipedia
>>> ral_colors = Wikipedia()
>>> ral_colors["RAL 1000 (Green beige)"]
(204, 197, 143)

Development

Testing

To test the code, install dependencies using:

$ pip install -r test-requirements.txt

and then execute:

$ python -m pytest

Running tests will automatically update the database of files used by the color systems by fetching it from the respective sources.

Build status

CircleCI Status

Credits

This package has been derived from pywikibot/pycolorname. Which in turn was extracted out of pywikibot/compat. These packages were created by DrTrigon who is the original author of this package.

LICENSE

MIT

This code falls under the MIT License. Please note that some files or content may be copied from other places and have their own licenses. Dependencies that are being used to generate the databases also have their own licenses.

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

pycolorname-0.0.1.dev20160306055400.tar.gz (60.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pycolorname-0.0.1.dev20160306055400.tar.gz.

File metadata

File hashes

Hashes for pycolorname-0.0.1.dev20160306055400.tar.gz
Algorithm Hash digest
SHA256 deccd0ed01c04891d794121b1c245411fc85af87d1fd3de7402ed2af5dba862a
MD5 04752ac4665ec53e7b69430cc4362ac8
BLAKE2b-256 bf9644598f602ce687a09eb1e72b741cf7323aa4bd007142c28ab9369dc09b4c

See more details on using hashes here.

File details

Details for the file pycolorname-0.0.1.dev20160306055400-py3-none-any.whl.

File metadata

File hashes

Hashes for pycolorname-0.0.1.dev20160306055400-py3-none-any.whl
Algorithm Hash digest
SHA256 98cf439efd75d42203989608999e65adc2d459259b64318aa673350317e35373
MD5 ef9049cf01f59651e9ebe1b869034a6a
BLAKE2b-256 6587e5ab24cffd9bab402ce07199262eea0eec64f4dd0c6f617761fdd4a1193b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page