Class ColorContrastUtil
- java.lang.Object
-
- org.uitnet.testing.smartfwk.ui.core.utils.ColorContrastUtil
-
public class ColorContrastUtil extends Object
- Author:
- Madhav Krishna
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecalcContrastRatio(Color foregroundColor, Color backgroundColor)static doublecalcContrastRatio(String foregroundColor, String backgroundColor)static doublecalcDistanceColor(Color foregroundColor, Color backgroundColor)static doublecalcLuminosity(Color color)static booleanisContrastValid(String foregroundColor, String backgroundColor, double coefficientLevel)static ColorparseColor(String colorAsStr)
-
-
-
Method Detail
-
isContrastValid
public static boolean isContrastValid(String foregroundColor, String backgroundColor, double coefficientLevel)
-
calcContrastRatio
public static double calcContrastRatio(String foregroundColor, String backgroundColor)
-
calcContrastRatio
public static double calcContrastRatio(Color foregroundColor, Color backgroundColor)
-
calcDistanceColor
public static double calcDistanceColor(Color foregroundColor, Color backgroundColor)
-
calcLuminosity
public static double calcLuminosity(Color color)
-
-