#NEWLINE# def _random_color( h_range = ( 0.0 , 1.0 ) , s_range = ( 0.5 , 1.0 ) , v_range = ( 0.5 , 1.0 ) ) : #NEWLINE# #INDENT# 'Generate a random RGB color.' #NEWLINE# ( h , s , v ) = ( uniform ( * h_range ) , uniform ( * s_range ) , uniform ( * v_range ) ) #NEWLINE# ( r , g , b ) = hsv_to_rgb ( np . array ( [ h , s , v ] ) ) . flat #NEWLINE# return ( r , g , b )