Method: RGSS::Color.mix

Defined in:
lib/rgss/stubs/color.rb

.mix(color1, color2, weight) ⇒ Color

Linearly interpolates two colors using the given the weight to produce a mixture of each.

Parameters:

  • color1 (Color)

    the base color to mix from.

  • color2 (Color)

    the target color to mix to.

  • weight (Float)

    the scaling factor of the second color to apply, where 0.0 means none, and color1 will be returned, 1.0 means fully color2, and values in between are a weighted mixture.

Returns:



142
143
# File 'lib/rgss/stubs/color.rb', line 142

def self.mix(color1, color2, weight)
end