docs: def _cal_color(self, value, color_index):
          """Blend between two colors based on input value."""
          range_min_p = self._domain[color_index]
          range_p = self._domain[color_index + 1] - range_min_p
          try:
              factor = (value - range_min_p) / range_p
          except ZeroDivisionError:
              factor = 0
  
          min_color = self.colors[color_index]
          max_color = self.colors[color_index + 1]
          red = round(factor * (max_color.r - min_color.r) + min_color.r)
          green = round(factor * (max_color.g - min_color.g) + min_color.g)
          blue = round(factor * (max_color.b - min_color.b) + min_color.b)
  
          return Color(red, green, blue)