Closed mobcdi closed 7 years ago
Consider normalizing the values before feeding it inside sRGBColor
or pass an additional argument
is_upscaled=True
and it is internally scaled down between 0-1.
rgb = sRGBColor(color[0], color[1], color[2])
or simply,
rgb = sRGBColor(rgb_r = color[0], rgb_g =color[1], rgb_b = color[2], is_upscaled=True)
Good suggestion, @hemavakade. Going to take the lack of response from @mobcdi as "This worked for me, woohoo!" and close this.
So this means one can't make (s)rgb colors with integer values?!?
Considere la posibilidad de normalizar los valores antes de introducirlos dentro
sRGBColor
o pase un argumento adicionalis_upscaled=True
y se reduce internamente entre 0-1.rgb = sRGBColor(color[0], color[1], color[2])
o simplemente,
rgb = sRGBColor(rgb_r = color[0], rgb_g =color[1], rgb_b = color[2], is_upscaled=True)
Muchas gracias
Hi,
I'm having trouble converting rgb to lab and getting the same output as online color converters when I validate it
These are the outputs I get when I run the code
But when i use color converter I get a Lab value of CIE-L*ab L
40.48337507852484 A
-20.25190041462896 B
40.96416270077111
Where am I going wrong?