def generateColorMap():
 Map = cm.jet(np.arange(256))
 stringColors = []
 for i in range(Map.shape[0]):
  rgb = (int((255 * Map[i][0])), int((255 * Map[i][1])), int((255 * Map[i][2])))
  stringColors.append(struct.pack('BBB', *rgb).encode('hex'))
 return stringColors

def generateColorMap ( ) : Map = cm . jet ( np . arange ( 256 ) ) stringColors = [ ] for i in range ( Map . shape [ 0 ] ) : rgb = ( int ( ( 255 * Map [ i ] [ 0 ] ) ) , int ( ( 255 * Map [ i ] [ 1 ] ) ) , int ( ( 255 * Map [ i ] [ 2 ] ) ) ) stringColors . append ( struct . pack ( 'BBB' , * rgb ) . encode ( 'hex' ) ) return stringColors
this function generates a 256 jet colormap of html-like hex string colors .