#NEWLINE# def saturate( self ) : #NEWLINE# #INDENT# 'Saturates the color, so that all components are in the range 0->1' #NEWLINE# c = self . _c #NEWLINE# ( r , g , b , a ) = c #NEWLINE# c [ 0 ] = min ( max ( r , 0.0 ) , 1.0 ) #NEWLINE# c [ 1 ] = min ( max ( c , 0.0 ) , 1.0 ) #NEWLINE# c [ 2 ] = min ( max ( b , 0.0 ) , 1.0 ) #NEWLINE# c [ 3 ] = min ( max ( a , 0.0 ) , 1.0 )