def __add__(self,other): from .image import Image if isinstance(other, Color): return Color(math2.vecadd(self.rgb,other.rgb)) elif isinstance(other, Image): return Image(size=other.size,color=self.native,mode=self.space)+other else: #last chance return Color(math2.vecadd(self.rgb,other))
def __add__(self,other): from Goulib.math2 import vecadd return Color(vecadd(self.rgb,other.rgb))