You are not logged in.
Pages: 1
This is an extension of the built-in merge_color()
for more than two colors.
/// merge_colors(col1,col2,...,amount)
//
// Returns a color merged from a series of two or more colors
// controlled by the given amount. A value of 0 returns the
// first color, a value of 1 returns the last color, and values
// in-between return a blend of two adjacent colors in the series.
//
// col1 first color
// col2 next color
// amount blend factor, 0 to 1
//
/// GMLscripts.com/license
{
var colors = argument_count-1;
var amount = clamp(argument[colors], 0, 1);
var n = amount * (colors-1);
var col1 = floor(n);
var col2 = col1 + 1;
return merge_color(argument[col1], argument[col2], frac(n));
}
Abusing forum power since 1986.
Offline
it can be nice for day-night cycle, thanks!
Offline
Pages: 1