Skip to main content

No project description provided

Project description

classifycolors

Convert any RGB value to the nearest CSS3 color name using simple Euclidean distance.

Installation

pip install classifycolors

How it works

The package calculates the Euclidean distance between the input RGB value and all CSS3 color values, returning the name of the closest match.

Usage

from classifycolors import rgb_to_name

print(rgb_to_name((120, 200, 30)))  # → 'yellowgreen'
print(rgb_to_name((0.4, 0.2, 0.7), normalized=True))  # → 'slateblue'

License

MIT © Elie Fares

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

classifycolors-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

classifycolors-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file classifycolors-0.1.1.tar.gz.

File metadata

  • Download URL: classifycolors-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for classifycolors-0.1.1.tar.gz
Algorithm Hash digest
SHA256 49ce137baa22cbdea2f67fa0c50a49923315b1a6af6f2d6decf583acf2217a42
MD5 db004b1a066aa04d81c35cb2f3a9d76f
BLAKE2b-256 5ea9060eb15a93a12247a6d73e32d628b0086e19c2dbb670c72c81b830d90ac6

See more details on using hashes here.

File details

Details for the file classifycolors-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: classifycolors-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for classifycolors-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22f280e7ac5ffe59f72029d8e5e4cd88ab580a6950491579e8d00f853729c6f3
MD5 d1f1467118d7cd436546c58e9add091c
BLAKE2b-256 6a20200ed6758522a4d3d3a6288742db478690d0b6a4c715b441412199166ed5

See more details on using hashes here.

Supported by

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