#NEWLINE# def hex_to_rgb( value ) : #NEWLINE# #INDENT# '\n    Hex to RGB\n    ' #NEWLINE# value = value . lstrip ( '#' ) #NEWLINE# lv = len ( value ) #NEWLINE# return tuple ( ( int ( value [ i : ( i + ( lv / 3 ) ) ] , 16 ) for i in xrange ( 0 , lv , ( lv / 3 ) ) ) )