def getColorHSV(name):
try:<EOL><INDENT>x = getColorInfoList()[getColorList().index(name.upper())]<EOL><DEDENT>except:<EOL><INDENT>return (-<NUM_LIT:1>, -<NUM_LIT:1>, -<NUM_LIT:1>)<EOL><DEDENT>r = x[<NUM_LIT:1>] / <NUM_LIT><EOL>g = x[<NUM_LIT:2>] / <NUM_LIT><EOL>b = x[<NUM_LIT:3>] / <NUM_LIT><EOL>cmax = max(r, g, b)<EOL>V = round(cmax * <NUM_LIT:100>, <NUM_LIT:1>)<EOL>cmin = min(r, g, b)<EOL>delta = cmax - cmin<EOL>if delta == <NUM_LIT:0>:<EOL><INDENT>hue = <NUM_LIT:0><EOL><DEDENT>elif cmax == r:<EOL><INDENT>hue = <NUM_LIT> * (((g - b)/delta) % <NUM_LIT:6>)<EOL><DEDENT>elif cmax == g:<EOL><INDENT>hue = <NUM_LIT> * (((b - r)/delta) + <NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>hue = <NUM_LIT> * (((r - g)/delta) + <NUM_LIT:4>)<EOL><DEDENT>H = int(round(hue))<EOL>if cmax == <NUM_LIT:0>:<EOL><INDENT>sat = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>sat = delta / cmax<EOL><DEDENT>S = int(round(sat  * <NUM_LIT:100>))<EOL>return (H, S, V)<EOL>
Retrieve the hue, saturation, value triple of a color name.

    Returns:
        a triple (degree, percent, percent). If not found (-1, -1, -1) is returned.