Closed
Description
>>> matplotlib.__version__
'3.3.2'
>>> from matplotlib.colors import rgb2hex, hex2color
>>> rgb_color = (0.5, 0.5, 0.9)
>>> hex2color(rgb2hex(rgb_color))
(0.5019607843137255, 0.5019607843137255, 0.9019607843137255)
It should return (0.5, 0.5, 0.9)
.
As it seems the additive factor it is always the same, it should be a matter of subtracting 0.0019607843137255 from the three channels.
Thanks!
P.S. the inverse composition works as expected:
>>> rgb2hex(hex2color( '#808080'))
'#808080'
Metadata
Metadata
Assignees
Labels
No labels