Class ColorUtil
- java.lang.Object
-
- org.pepstock.charba.client.colors.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkAlphaWithinBounds(double alpha)
Any double between 0.0d and 1.0d (inclusive) is valid.static boolean
isAlphaWithinBounds(double alpha)
Returnstrue
if any double is between 0.0d and 1.0d (inclusive).
-
-
-
Method Detail
-
isAlphaWithinBounds
public static boolean isAlphaWithinBounds(double alpha)
Returnstrue
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
-
-