Class ColorUtil


  • public final class ColorUtil
    extends Object
    Utility to check alpha value.
    Internally is checking red, green, blue and alpha values and creates string representation of a color, to HEX, RGB, RGBA, HSL or HSLA strings.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • isAlphaWithinBounds

        public static boolean isAlphaWithinBounds​(double alpha)
        Returns true if any double is between 0.0d and 1.0d (inclusive).
        Parameters:
        alpha - alpha value, exception if the channel is nor within bounds
        Returns:
        true if any double is between 0.0d and 1.0d (inclusive)
      • checkAlphaWithinBounds

        public static void checkAlphaWithinBounds​(double alpha)
        Any double between 0.0d and 1.0d (inclusive) is valid.
        Parameters:
        alpha - alpha value, exception if the channel is nor within bounds