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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb35e7a63b1db9cef119735c1981b22f79d878370fc702bbbebfebc2710d8615
|
|
| MD5 |
fd37d5797f242390d18879a38fb93c12
|
|
| BLAKE2b-256 |
3ea899316f71cfd26ec0d36204c7969ff7eeffb96a563899361114949f1384e6
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01b007afb68525170b951011664e4c299175898dbaf87712edbc344ab7cd2278
|
|
| MD5 |
502ecd3b3cbe3f07df897fe0392bcf70
|
|
| BLAKE2b-256 |
9ef86d92b3fea59670fd76d50a5358bf9e1956278a3301f8fa9d78f22bae4a96
|