#NEWLINE# def _color_name_to_rgb( self , color ) : #NEWLINE# #INDENT# " Turn 'ffffff', into (0xff, 0xff, 0xff). " #NEWLINE# try : #NEWLINE# #INDENT# rgb = int ( color , 16 ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# r = ( ( rgb >> 16 ) & 255 ) #NEWLINE# g = ( ( rgb >> 8 ) & 255 ) #NEWLINE# b = ( rgb & 255 ) #NEWLINE# return ( r , g , b )