Skip to main content

This package provides an API for looking up hex, rgb, hsv, or hsl values of W3C-recognized colors. The Color class, when initialized with a valid identifier, will have as its attributes components of the various color model representations.

Example:

To retrieve the numeric representations of the color brown as defined by the W3C:

>>> from colorlookup import Color
>>>
>>> brown = Color('brown')
>>>
>>> print(brown)
Color: Brown
hex: #a52a2a
rgb: (165, 42, 42)
>>>
>>> brown.hex
'#a52a2a'
>>> brown.rgb
(165, 42, 42)
>>> brown.r
165
>>> brown.g
42
>>> brown.b
42
>>> brown.rgb_f
(0.65, 0.16, 0.16)
>>> brown.r_f
0.65
>>> brown.g_f
0.16
>>> brown.b_f
0.6
>>> brown.hsl_sat
0.59
>>> brown.hsl_light
0.41
>>> brown.hsv_sat
0.75
>>> brown.hsv_val
0.65

Metadata

Release files for colorlookup 0.2.3

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 colorlookup 0.2.3
File Interpreter ABI Platform Actions
colorlookup-0.2.3-py3-none-any.whl Python 3 none any Details for colorlookup-0.2.3-py3-none-any.whl

Release files / colorlookup-0.2.3-py3-none-any.whl

Download URL colorlookup-0.2.3-py3-none-any.whl
Size 44.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e332d0dc220892a17dbd0822ead4174bacbedcb6a074df0d0fabc0ff0ac4332
BLAKE2b-256 checksum
How to use checksums
4cc6e2964fb3c55c1cec5e9d3b2c1a2078e8d434c28d6f46e9a246094dd23d83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for colorlookup 0.2.3

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 release file No provenance

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