Skip to main content

colorconverter

Converter to convert between various color systems such as RGB, CIELAB, CMYK, HEX, RGB, and XYZ

Build Status

Contents

Source Code and Documentation

About

Defining a color is difficult. The first challenge is finding a way to describe a color. One way is to describe color based on constituent colors. We can describe constituent colors by adding them, like in RGB, or subtracting them, like in CMYK. Gamut is the range of all colors that are representable in a color system. RGB trades a limited gamut for performance. LAB trades performance for the full gamut of visible colors. CMYK represents the gamut used in color printing.

The second challenge to defining a color is that it depends on the observer. Viewing the same color will look different when:

  • printed on paper or displayed on a screen
  • seen in daylight or under fluorescent lighting
  • positioned at a close or far distance Standard references such as the Pantone Matching System refer to specific colors. We lose information when converting from a reference color to a color system. Printing or rendering an RGB or CMYK color equivalent to a reference color may not match. We can avoid information loss during conversion by using an unlimited gamut such as LAB. We must also take into account the effect of the observer and illumination.

This package aims to provide tools to perform:

  • Color conversion between color systems
  • A way of searching for similar standardized reference colors

Requirements

  • Requires Python 3.x. Due to security fixes and new features Python 3.7 or later is recommended.
  • pip

Third-party dependencies may have additional requirements.

Installation

You can retrieve the colorconverter package from the Python Package Index https://pypi.org/ using pip. First make sure you have python3 and python3-pip installed. Then you can start by making a requirements.txt file in your working directory with the colorconverter requirement in it. You can add any other packages to your requirements here, each as a separate line.

requirements.txt:

mindpowered-colorconverter>0

Now you can use pip to install the colorconverter package: python3 -m pip install -r requirements.txt If you would like to update the package, simply run the above command again.

Usage

from mindpowered_colorconverter import *

cc = ColorConverter()
colors = cc.FromHEX("#336699")

Support

We are here to support using this package. If it doesn't do what you're looking for, isn't working, or you just need help, please Contact us.

There is also a public Issue Tracker available for this package.

Licensing

This package is released under the MIT License.

Metadata

Release files for mindpowered-colorconverter 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mindpowered-colorconverter 0.0.6
File Interpreter ABI Platform
mindpowered_colorconverter-0.0.6-py3-none-any.whl Python 3 none any Details

Release files / mindpowered_colorconverter-0.0.6-py3-none-any.whl

Download URL mindpowered_colorconverter-0.0.6-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02c7dc7fce280798910cf2ace7f6ba2aab0cd4b760d05dcceff0086404ea4337
BLAKE2b-256 checksum
How to use checksums
3e3e18abc3b6303caaf682556b8e968e6d147a7921fc94102d368541e76bb410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.6.9

Security for mindpowered-colorconverter 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page