1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-09-01 03:15:53 +00:00
Funkin/source/funkin/util/FlxColorUtil.hx
Hyper_ 88ed66affa chore: Add null safety to various utility and plugin classes
And add a bit of error handling to CharSelectGF & CharSelectSubState

Co-Authored-By: Linus Torvalds <torvalds@linux-foundation.org>
2025-06-23 14:13:35 -04:00

24 lines
597 B
Haxe

package funkin.util;
import flixel.util.FlxColor;
/**
* Non inline FlxColor functions for use in hscript files
*/
@:nullSafety
class FlxColorUtil
{
/**
* Get an interpolated color based on two different colors.
*
* @param Color1 The first color
* @param Color2 The second color
* @param Factor Value from 0 to 1 representing how much to shift Color1 toward Color2
* @return The interpolated color
*/
public static function interpolate(Color1:FlxColor, Color2:FlxColor, Factor:Float = 0.5):FlxColor
{
return FlxColor.interpolate(Color1, Color2, Factor);
}
}