def _get_color_percentage(a_c1, a_c2, a_c3, b_c1, b_c2, b_c3, percent):
 if (not (0 <= percent <= 100)):
  raise ValueError('percent needs to be between 0 and 100!')
 out_c1 = round((a_c1 + (((b_c1 - a_c1) * percent) / 100)))
 out_c2 = round((a_c2 + (((b_c2 - a_c2) * percent) / 100)))
 out_c3 = round((a_c3 + (((b_c3 - a_c3) * percent) / 100)))
 return (out_c1, out_c2, out_c3)

def _get_color_percentage ( a_c1 , a_c2 , a_c3 , b_c1 , b_c2 , b_c3 , percent ) : if ( not ( 0 <= percent <= 100 ) ) : raise ValueError ( 'percent needs to be between 0 and 100!' ) out_c1 = round ( ( a_c1 + ( ( ( b_c1 - a_c1 ) * percent ) / 100 ) ) ) out_c2 = round ( ( a_c2 + ( ( ( b_c2 - a_c2 ) * percent ) / 100 ) ) ) out_c3 = round ( ( a_c3 + ( ( ( b_c3 - a_c3 ) * percent ) / 100 ) ) ) return ( out_c1 , out_c2 , out_c3 )
get a color which is percent% interpolated between start and end .