It looks like this is not a trivial question, because the conversion between the two spaces is nonlinear. See the code here:
I originally thought that it would be possible to convert each channel separately, but the `exp` call makes this either difficult or impossible (I haven't yet decided which, but I wasn't able to get it to work in a short amount of time).
In [1]: from skimage import data
In [2]: from skimage.color import rgb2hed
In [3]: from skimage.color import hed2rgb
In [4]: import matplotlib.pyplot as plt
In [5]: ihc_rgb = data.immunohistochemistry()
In [6]: ihc_hed = rgb2hed(ihc_rgb)
In [8]: import numpy as np
In [9]: h, e, d = np.transpose(ihc_hed, (2, 0, 1))
In [10]: empty = np.zeros_like(h)
In [11]: h_rgb = hed2rgb(np.dstack((h, empty, empty)))
In [12]: e_rgb = hed2rgb(np.dstack((empty, e, empty)))
In [13]: d_rgb = hed2rgb(np.dstack((empty, empty, d)))
In [14]: fig, axes = plt.subplots(2, 2, figsize=(6, 7), sharex=True,
...: sharey=True,
...: subplot_kw={'adjustable': 'box-forced'})
In [15]: axes[0, 0].imshow(ihc_rgb); axes[0, 0].set_title('Original image')
Out[15]: <matplotlib.text.Text at 0x121357438>
In [16]: axes[0, 1].imshow(h_rgb); axes[0, 1].set_title('Hematoxylin')
Out[16]: <matplotlib.text.Text at 0x121371c18>
In [17]: axes[1, 0].imshow(e_rgb); axes[1, 0].set_title('Eosin')
Out[17]: <matplotlib.text.Text at 0x1210684e0>
In [18]: axes[1, 1].imshow(d_rgb); axes[1, 1].set_title('DAB')
Out[18]: <matplotlib.text.Text at 0x1219315f8>
In [19]: for ax in axes.ravel():
...: ax.axis('off')
Juan.