# File lib/rubygame/color/models/base.rb, line 74 def average(other, weight=0.5) c1, c2 = self.to_rgba_ary, other.to_rgba_ary rgba = [0,1,2,3].collect do |i| clamp( c1.at(i)*weight + c2.at(i)*(1-weight) ) end wrap( rgba ) end