def find_intermediate_color(lowcolor, highcolor, intermed):
 diff_0 = float((highcolor[0] - lowcolor[0]))
 diff_1 = float((highcolor[1] - lowcolor[1]))
 diff_2 = float((highcolor[2] - lowcolor[2]))
 return ((lowcolor[0] + (intermed * diff_0)), (lowcolor[1] + (intermed * diff_1)), (lowcolor[2] + (intermed * diff_2)))

def find_intermediate_color ( lowcolor , highcolor , intermed ) : diff_0 = float ( ( highcolor [ 0 ] - lowcolor [ 0 ] ) ) diff_1 = float ( ( highcolor [ 1 ] - lowcolor [ 1 ] ) ) diff_2 = float ( ( highcolor [ 2 ] - lowcolor [ 2 ] ) ) return ( ( lowcolor [ 0 ] + ( intermed * diff_0 ) ) , ( lowcolor [ 1 ] + ( intermed * diff_1 ) ) , ( lowcolor [ 2 ] + ( intermed * diff_2 ) ) )
returns the color at a given distance between two colors this function takes two color tuples .