#NEWLINE# @ filter_method ( BaseFilter . PositiveNumber , BaseFilter . PositiveNumber , BaseFilter . PositiveNumber , BaseFilter . String ) #NEWLINE# def colorize( self , red_pct , green_pct , blue_pct , fill ) : #NEWLINE# #INDENT# ( fill_r , fill_g , fill_b ) = tuple ( map ( ord , fill . decode ( 'hex' ) ) ) #NEWLINE# ( mode , data ) = self . engine . image_data_as_rgb ( ) #NEWLINE# imgdata = _colorize . apply ( mode , red_pct , green_pct , imgdata , fill_r , fill_g , fill_b , data ) #NEWLINE# self . engine . set_image_data ( imgdata )