code: def find_intermediate_color(
      lowcolor, highcolor, intermed, colortype="tuple"
  ):
      """
      Returns the color at a given distance between two colors
  
      This function takes two color tuples, where each element is between 0
      and 1, along with a value 0 < intermed < 1 and returns a color that is
      intermed-percent from lowcolor to highcolor. If colortype is set to 'rgb',
      the function will automatically convert the rgb type to a tuple, find the
      intermediate color and return it as an rgb color.
      """
      if colortype == "rgb":
          # convert to tuple color, eg. (1, 0.45, 0.7)
          lowcolor = unlabel_rgb(lowcolor)
          highcolor = unlabel_rgb(highcolor)
  
      diff_0 = float(highcolor[0] - lowcolor[0])
      diff_1 = float(highcolor[1] - lowcolor[1])
      diff_2 = float(highcolor[2] - lowcolor[2])
  
      inter_med_tuple = (
          lowcolor[0] + intermed * diff_0,
          lowcolor[1] + intermed * diff_1,
          lowcolor[2] + intermed * diff_2,
      )
  
      if colortype == "rgb":
          # back to an rgb string, e.g. rgb(30, 20, 10)
          inter_med_rgb = label_rgb(inter_med_tuple)
          return inter_med_rgb
  
      return inter_med_tuple
  
imports: import decimal
  from numbers import Number
  from _plotly_utils import exceptions
  from .None import qualitative, sequential, diverging, cyclical, cmocean, colorbrewer, carto, plotlyjs
label_desc: Use image node_id 9 for calling a global function with example usage: find_intermediate_color(lowcolor, highcolor, intermed, colortype) and returns: inter_med_tuple, inter_med_rgb