hed is not guaranteed to be in [0, 1]: if I do the maths, I get

-1.30171844 < hed[:, :, 0] < 0.46289438
-0.78653516 < hed[:, :, 1] < 1.03146738
-1.09072814 < hed[:, :, 2] < 0.47940666

I could use these values to rescale each channel separately, so the image would be in [0, 1]. That could be more convenient in certain cases but this operation drastically reduces the contrast. Any other type of rescaling would lead to the impossibility to perform the reverse conversion (hed2rgb) without a hint about the type of rescaling.

As shown in the example, contrast enhancement per channel **and** rescaling is rather easy with the current implementation...

However, @RONNCC is right concerning the use of signed rgb. Rather than a check, I could modify the function as below to be able to deal with both signed and unsigned inputs the same way:

```python
rgb = dtype.img_as_float(rgb) + 2
hed = np.dot(np.reshape(-np.log(rgb), (-1, 3)), hed_from_rgb)
return np.reshape(hed, rgb.shape)
```

This modification would change the boundaries as follows:

-2.06317491 < hed[:, :, 0] < 0.73367023
-1.24662873 < hed[:, :, 1] < 1.63483711
-1.72876319 < hed[:, :, 2] < 0.75984158

The reverse transform would therefore be:

```python
from ..exposure import rescale_intensity

hed = dtype.img_as_float(hed)
logrgb2 = np.dot(-np.reshape(hed, (-1, 3)), rgb_from_hed)
rgb2 = np.exp(logrgb2)
return rescale_intensity(np.reshape(rgb2 - 2, hed.shape), in_range=(-1, 1))
```

This would lead to a float image in [-1, 1] if the corresponding rgb image given as input in signed. Would that be ok for you? (My tests and example are working with this implementation)