code: def blend(self, other, ratio=0.5):
          
          keep = 1.0 - ratio
          if not self.space == other.space:
              raise Exception("Colors must belong to the same color space.")
          values = tuple(((u * keep) + (v * ratio)
              for u, v in zip(self.values, other.values)))
          return self.__class__(self.space, *values)
docs: Blend this color with another color in the same color space.
  
          By default, blends the colors half-and-half (ratio: 0.5).
  
          :param Color other: The color to blend.
          :param float ratio: How much to blend (0 -> 1).
  
          :rtype: Color
          :returns: A new spectra.Color