def intColor(index, hues=9, values=1, maxValue=255, minValue=150, maxHue=360, minHue=0, sat=255, alpha=255, **kargs):
 hues = int(hues)
 values = int(values)
 ind = (int(index) % (hues * values))
 indh = (ind % hues)
 indv = (ind / hues)
 if (values > 1):
  v = (minValue + (indv * ((maxValue - minValue) / (values - 1))))
 else:
  v = maxValue
 h = (minHue + ((indh * (maxHue - minHue)) / hues))
 c = QtGui.QColor()
 c.setHsv(h, sat, v)
 c.setAlpha(alpha)
 return c

def intColor ( index , hues = 9 , values = 1 , maxValue = 255 , minValue = 150 , maxHue = 360 , minHue = 0 , sat = 255 , alpha = 255 , ** kargs ) : hues = int ( hues ) values = int ( values ) ind = ( int ( index ) % ( hues * values ) ) indh = ( ind % hues ) indv = ( ind / hues ) if ( values > 1 ) : v = ( minValue + ( indv * ( ( maxValue - minValue ) / ( values - 1 ) ) ) ) else : v = maxValue h = ( minHue + ( ( indh * ( maxHue - minHue ) ) / hues ) ) c = QtGui . QColor ( ) c . setHsv ( h , sat , v ) c . setAlpha ( alpha ) return c
creates a qcolor from a single index .