int MultiplyNonZeroTargetColorLerp(int color1, int color2, int inputColor) { if (inputColor == 0) { return(inputColor); } float red = (inputColor & 0xFF) / 255.0f; float green = ((inputColor & 0xFF00) >> 8) / 255.0f; float blue = ((inputColor & 0xFF0000) >> 16) / 255.0f; float t = (red + green + blue) / 3.0f; return(ChromaAnimationAPI.LerpColor(color1, color2, t)); }
int AverageColor(int color1, int color2) { return(ChromaAnimationAPI.LerpColor(color1, color2, 0.5f)); }