public static Color blackOrWhiteBgColor(Color color) {
        return brightness(color) > .5f ? new Color(Color.BLACK) : new Color(Color.WHITE);
    }
Does not dispose pixmap.
@param pixmap
@param ninePatch
@return
core/src/com/ray3k/skincomposer/utils/Utils.java