Metadata-Version: 2.4
Name: clr_b10
Version: 1.0.0
Summary: B10 (Base-4096) color encoding system for packing HEX into 2 characters
Author-email: support.base.4096@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```bash
pip install clr_b10

```

## Usage

```python
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
