You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improve docstring and add test fot to_rgb(<float>)
Even if the docstring was saing it, emphasis that to_rgb/to_rgba do not
accept float as input, but string representation of a float.
As one might be tempted to had float->gray conversion add failing test
in case the functionality is added.
Side fixes :
change tuple([value]*3) to (value,)*3 for speed
In [18]: %timeit tuple([0.4]*3)
1000000 loops, best of 3: 505 ns per loop
In [19]: %timeit (0.4,)*3
10000000 loops, best of 3: 23.5 ns per loop
In [20]: (0.4,)*3 == tuple([0.4]*3)
Out[20]: True
Closesgh-2609
0 commit comments