B10 Color Encoding (Base-4096)
clr_b10 is a high-density color encoding system designed to minimize data weight in text-based protocols. It allows for the packing of a standard 24-bit HEX color into exactly 2 characters using the custom B10 alphabet.
Key Features
- Ultra-Compression: Reduces string length for colors by 70% compared to HEX strings.
- 24-bit Support: Perfectly maps standard RGB/HEX colors without loss of precision.
- Cross-Platform: Fully compatible with the B10 JavaScript ecosystem.
Installation
pip install clr_b10
Usage
from clr_b10 import clr_b10
# Encoding HEX (#RRGGBB) to B10 (2 characters)
b10_color = clr_b10.from_hex("#FF5733")
print(b10_color) # Output: 2-character string
# Decoding B10 back to HEX
hex_color = clr_b10.to_hex(b10_color)
print(hex_color) # Output: #FF5733
# Converting B10 directly to RGB tuple
r, g, b = clr_b10.to_rgb(b10_color)
print(f"RGB: ({r}, {g}, {b})")
Technical Specification
The library uses a base-4096 (12-bit) numerical system. Since a standard color is 24 bits (8 bits each for Red, Green, and Blue), it is split into two 12-bit chunks, each represented by one character from the B10 alphabet.
Support
Contact: support.base.4096@gmail.com
Metadata
Release files for clr-b10 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clr_b10-1.0.1.tar.gz | 3.0 kB | Without provenance | Details for clr_b10-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clr_b10-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for clr_b10-1.0.1-py3-none-any.whl |
Total release size: 6.3 kB
Release files / clr_b10-1.0.1.tar.gz
| Download URL | clr_b10-1.0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fec2c4470935d9267f829b8fc2e75ae0d804c467a6d4b86e39f209355f9a6589
|
|
BLAKE2b-256 checksum How to use checksums |
e189b857b6505546f6b4a45838893ee33f9070786c6b7612803e2113853590ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / clr_b10-1.0.1-py3-none-any.whl
| Download URL | clr_b10-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ca23078b1453b8ff113337c7903feb423514d47c612a20b53b8b982b4bfc44e
|
|
BLAKE2b-256 checksum How to use checksums |
97aefc414b31fd10e1d755af8cafcefa242e040ba11cc2516029c3230c96e710
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for clr-b10 1.0.1
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.