#NEWLINE# def sepia( self ) : #NEWLINE# #INDENT# 'Apply a sepia filter to the color.' #NEWLINE# r = ( clamp ( round_int ( ( ( ( self . r * 0.393 ) + ( self . g * 0.769 ) ) + ( self . b * 0.189 ) ) ) , 0 , 255 ) & 255 ) #NEWLINE# g = ( clamp ( round_int ( ( ( ( self . r * 0.349 ) + ( self . g * 0.686 ) ) + ( self . b * 0.168 ) ) ) , 0 , 255 ) & 255 ) #NEWLINE# b = ( clamp ( round_int ( ( ( ( self . r * 0.272 ) + ( self . g * 0.534 ) ) + ( self . b * 0.131 ) ) ) , 0 , 255 ) & 255 ) #NEWLINE# ( self . r , self . g , self . b ) = ( r , g , b )