jccc
(JIT Compilable Color Conversion) is a Python package that provides fast color conversion and quantization functions compatible with Numba.
- Numba-Compatible: All functions are optimized for performance using Numba JIT compilation.
- Wide Range of Color Conversions: Support for common color spaces including RGB, HSV, LAB, and more.
- Ease of Use: Simple and intuitive API for quick integration into your projects.
You can install jccc
via pip:
pip install jccc
- Python 3.6+
- Numba 0.53.1+
To start using jccc
, you first need to import the package and its functions:
import jccc
from jccc import rgb_to_hsv, hsv_to_rgb
Here are some examples demonstrating how to use the color conversion functions provided by jccc
.
import numpy as np
from jccc import rgb_to_hsv
# Define an RGB color
rgb_color = np.array([255, 0, 0])
# Convert RGB to HSV
hsv_color = rgb_to_hsv(rgb_color)
print("HSV Color:", hsv_color)
import numpy as np
from jccc import hsv_to_rgb
# Define an HSV color
hsv_color = np.array([0, 1, 1])
# Convert HSV to RGB
rgb_color = hsv_to_rgb(hsv_color)
print("RGB Color:", rgb_color)
Conversions are supported between the following:
- RGB
- HSL
- HSV
- XYZ
- CIELAB
Contributions to the jccc
package are welcome. If you have any suggestions or bug reports or want to contribute code, please open an issue or submit a pull request on our GitHub repository.
jccc
is released under the MIT License. See the LICENSE file for more details.