python-colormath
python-colormath copied to clipboard
A python module that abstracts common color math operations. For example, converting from CIE L*a*b to XYZ, or from RGB to CMYK
Hello, Is there a plan to extend this awesome work to support matrix operations? For example, converting XYZ matrices to sRGB matrices.
Hi Greg, color_diff.py uses numpy.asscalar(), could this be changed to using numpy.ndarray.item() to be able using Numpy >= 1.16 without warnings or 1.18.1 without errors? Thanks in advance, best regards...
Inspired by scikit's implementation.
If I try to convert from HSL I get some weird outputs: For example: ``` from colormath.color_objects import LabColor, HSLColor, sRGBColor color = HSLColor(89, 19, 90) rgb = convert_color(color, sRGBColor)...
Links updated.
Hi, so i am using the following two rgb values to compare if they are similar (They are shades of light to mid dark green) ``` color1_rgb = sRGBColor(143,176,132) color2_rgb...
def delta_e_cie2000(lab_color_vector, lab_color_matrix, Kl=1, Kc=1, Kh=1): R_C = numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0))) 应该为 R_C = 2*(numpy.sqrt((numpy.power(avg_C1p_C2p, 7.0)) / (numpy.power(avg_C1p_C2p, 7.0) + numpy.power(25.0, 7.0)))) 少乘以2了
I read your document in density. ``` color = SpectralColor(spec_340nm=0.08, ...) # Or maybe we want to specify which filter to use. red_density = ansi_density(color, ANSI_STATUS_T_RED) ``` Can i say...
One PR to (re)fix em all: #49, #64, #66, #87. API around clamping and upscaling seems confusing for everyone, so here's proposal to fix this issue. Idea is to keep...
I just noticed that color spaces do not all document the ranges of expected values and are somewhat inconsistent, e.g., `XYZColor` seems to assume values scaled from 0...1 and `LChab`...