matplotlib/matplotlib — pull request #2610 by Carreau (2013-11-22 10:15:12+00:00)
Title: improve docstring and add test fot to_rgb(<float>)

Even if the docstring was saying 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
```python
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
```

Should close #2609

Will post the result of the failing test if one modify to_rgb/to_rgba to accept float for info.