Skip to main content

CF Colour Protocol -- deterministic colour identity

Project description

cfcolor

Python reference implementation of the CF Colour Protocol.

Every 8-bit sRGB colour has exactly one CF-ID — a stable, deterministic, verifiable identity computed from first principles.

Install

pip install cfcolor

Usage

from cfcolor import from_hex, from_rgb

from_hex("#7B3F00")     # "CF-7B3F00-EA262463"
from_hex("#000000")     # "CF-000000-86165F20"
from_rgb(255, 0, 0)     # "CF-FF0000-37AB74A7"

Command line:

cfid "#7B3F00"
cfid "#7B3F00" --json
echo "#cc0000" | cfid

Specification

CF Protocol Specification v1.0.0: https://github.com/mauludsadiq/Colour-in-Fard/blob/main/SPEC.md

Registry

1,030,301 colours publicly resolved at: https://mauludsadiq.github.io/Colour-in-Fard/registry/index.json

Conformance

This implementation passes all test vectors in SPEC.md Section 5. Run tests with: python -m pytest cfid_py/tests/

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

cfcolor-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

cfcolor-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file cfcolor-1.0.0.tar.gz.

File metadata

  • Download URL: cfcolor-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cfcolor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bb35e7a63b1db9cef119735c1981b22f79d878370fc702bbbebfebc2710d8615
MD5 fd37d5797f242390d18879a38fb93c12
BLAKE2b-256 3ea899316f71cfd26ec0d36204c7969ff7eeffb96a563899361114949f1384e6

See more details on using hashes here.

File details

Details for the file cfcolor-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cfcolor-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for cfcolor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01b007afb68525170b951011664e4c299175898dbaf87712edbc344ab7cd2278
MD5 502ecd3b3cbe3f07df897fe0392bcf70
BLAKE2b-256 9ef86d92b3fea59670fd76d50a5358bf9e1956278a3301f8fa9d78f22bae4a96

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