Class ColorBlindUtils
java.lang.Object
org.pushingpixels.ephemeral.chroma.colorblind.ColorBlindUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorgetColorBlindColor(Color orig, ColorBlindnessKind kind) Converts the specified color into color-blind version.private static double[]mult3(double[][] matrix, double[] vector) Multiplies the specified 3x3 matrix by the specified 3x1 vector.
-
Field Details
-
rgbToLms
private static double[][] rgbToLmsMatrix for converting RGB to LMS. -
lmsToRgb
private static double[][] lmsToRgbMatrix for converting LMS to RGB.
-
-
Constructor Details
-
ColorBlindUtils
public ColorBlindUtils()
-
-
Method Details
-
getColorBlindColor
Converts the specified color into color-blind version.- Parameters:
orig- The original color.kind- Color-blindness kind.- Returns:
- Color-blind version of the original color.
-
mult3
private static double[] mult3(double[][] matrix, double[] vector) Multiplies the specified 3x3 matrix by the specified 3x1 vector.- Parameters:
matrix- Matrix.vector- Vector.- Returns:
- Vector multiplication.
-