title: Color rotation in HSV using scikit-image
body: <p>The aim is to convert a pure red image into any hue of the color wheel.</p>
  
  <ul>
  <li>A monochrome image is first converted into a RGB red image, ex:
  <img src="https://i.stack.imgur.com/oMUmy.png" alt="original monochrome image"></li>
  <li>then converted into HSV</li>
  <li>The hue component is modified by adding an angle value supposed to
  match the wheel color</li>
  <li>then the hsv image is back converted into the rgb color space.</li>
  </ul>
  
  <p>The problem is that only green or blue image can be obtained (n<a href="http://commons.wikimedia.org/wiki/File:Triangulo_HSV.png" rel="nofollow noreferrer">o yellow for an angle~30° for example</a>):
  <img src="https://i.stack.imgur.com/SkQIZ.png" alt="Hue rotation"></p>
  
  <p>The code performed in some ipython cells relies on scikit-image 0.10dev:</p>
  
  <pre><code>from skimage import io
  from skimage import color
  from scipy import ndimage as nd
  import numpy as np
  from matplotlib import pyplot as plt
  import os
  cy55 = io.imread('/home/jeanpat/MFISH/PSI/P07/01/Cy5/P070109C.tif')
  
  zero = np.zeros(cy55.shape,dtype=np.uint8)
  rgb0 = np.dstack([cy55, zero,zero])
  
  hue_rotations = [18, 36,72,90,108]
  images = {}
  images[0] = rgb0
  hsv0 = color.rgb2hsv(rgb0)
  print hsv0[:,:,0].dtype
  for hue in hue_rotations:
      hsv = np.copy(hsv0)
      hsv[:,:,0] = hsv[:,:,0]+ hue
      rgb = color.hsv2rgb(hsv)
      images[hue] = rgb
  i = 1
  plt.figure(num=None, figsize=(15, 5),  facecolor='w', edgecolor='k')
  for hue in np.sort(images.keys()):
      plt.subplot(1,6,i,xticks=[],yticks=[])
      plt.title('hue='+str(hue))
      plt.imshow(images[hue])
      i = i +1
  plt.show()
  </code></pre>