public static float normalize(float val, float from, float to) {
        if (val < from)
            return 0;
        if (val > to)
            return 1;
        return val / (to - from);
    }
Convert color into OpenGL color format.
@param color some color
@return array of floats: [red, green, blue, alpha]
library/src/main/java/com/cleveroad/audiovisualization/Utils.java