Package org.jline.utils
Class Colors
- java.lang.Object
-
- org.jline.utils.Colors
-
public class Colors extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
Colors.Distance
-
Field Summary
Fields Modifier and Type Field Description private static int
A
static double[]
AdobeRGB_environment
Adobe RGB environmentstatic double[]
averageSurrounding
Average surrounding for CAM color spacesprivate static int
B
static int
C
Chromaprivate static java.util.Map<java.lang.String,java.lang.Integer>
COLOR_NAMES
private static int[]
COLORS_256
static double[]
D50
D50 illuminant for CAM color spacesstatic double[]
D65
D65 illuminant for CAM color spacesstatic double[]
darkSurrounding
Dark surrounding for CAM color spacesstatic int[]
DEFAULT_COLORS_256
Default 256 colors palettestatic int[]
DEFAULT_COLORS_88
Default 88 colors palettestatic double[]
dimSurrounding
Dim surrounding for CAM color spacesprivate static double
epsilon
static int
h
Huestatic int
H
Hue Composition / Hue Quadraturestatic int
J
Lightnessprivate static double
k1
private static double
k2
private static double
kappa
private static double
kc
private static double
kh
private static double
kl
private static int
L
static int
M
Colorfulnessstatic int
Q
Brightnessstatic int
s
Saturationstatic double[]
sRGB_encoding_environment
sRGB encoding environmentstatic double[]
sRGB_typical_environment
sRGB typical environment(package private) static int
SUR_C
(package private) static int
SUR_F
(package private) static int
SUR_N_C
(package private) static int
VC_A_W
(package private) static int
VC_C
(package private) static int
VC_D_RGB_B
(package private) static int
VC_D_RGB_G
(package private) static int
VC_D_RGB_R
(package private) static int
VC_F
(package private) static int
VC_F_L
(package private) static int
VC_L_A
(package private) static int
VC_N
(package private) static int
VC_N_BB
(package private) static int
VC_N_C
(package private) static int
VC_N_CB
(package private) static int
VC_X_W
(package private) static int
VC_Y_B
(package private) static int
VC_Y_W
(package private) static int
VC_Z
(package private) static int
VC_Z_W
private static int
X
private static int
Y
private static int
Z
-
Constructor Summary
Constructors Constructor Description Colors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static double
calculateH(double h)
private static double
cam02(int p1, int p2, double[] vc)
(package private) static double[]
camlab(int color)
(package private) static double[]
camlab(int color, double[] vc)
(package private) static double
camlch(double[] c1, double[] c2)
(package private) static double
camlch(double[] c1, double[] c2, double[] w)
(package private) static double[]
camlch(int color)
(package private) static double[]
camlch(int color, double[] vc)
static double[]
CAT02toHPE(double[] RGB)
private static double
cie00(double[] lab1, double[] lab2)
private static double
cie94(double[] lab1, double[] lab2)
private static Colors.Distance
doGetDistance(java.lang.String dist)
private static double[]
forwardPostAdaptationConeResponse(double[] RGB, double[] vc)
private static double[]
forwardPreAdaptationConeResponse(double[] XYZ)
private static double[]
forwardResponseCompression(double[] RGB, double[] vc)
private static double[]
forwardTransform(double[] XYZ, double[] vc)
CIECAM02 appearance correlates(package private) static Colors.Distance
getDistance(java.lang.String dist)
private static double[]
getWeights(java.lang.String dist)
private static double
hueDifference(double hue1, double hue2, double c)
private static double[]
jmh2ucs(double[] lch)
(package private) static double[]
lch2lab(double[] lch)
private static double
pivotRgb(double n)
private static double
pivotXyz(double n)
private static double[]
rgb(int color)
static double[]
rgb2cielab(double[] rgb)
(package private) static double[]
rgb2cielab(int color)
private static double[]
rgb2xyz(double[] rgb)
(package private) static double[]
rgb2xyz(int color)
static int
rgbColor(int col)
static java.lang.Integer
rgbColor(java.lang.String name)
static int
roundColor(int col, int max)
(package private) static int
roundColor(int color, int[] colors, int max, java.lang.String dist)
(package private) static int
roundColor(int color, int[] colors, int max, Colors.Distance distance)
static int
roundColor(int col, int max, java.lang.String dist)
static int
roundRgbColor(int r, int g, int b, int max)
private static double
scalar(double[] c1, double[] c2)
private static double
scalar(double[] c1, double[] c2, double[] w)
static void
setRgbColors(int[] colors)
private static double
sqr(double n)
(package private) static double[]
vc(double[] xyz_w, double L_A, double Y_b, double[] surrounding)
private static double[]
xyz2camlch(double[] xyz, double[] vc)
private static double[]
xyz2lab(double[] xyz)
-
-
-
Field Detail
-
DEFAULT_COLORS_256
public static final int[] DEFAULT_COLORS_256
Default 256 colors palette
-
DEFAULT_COLORS_88
public static final int[] DEFAULT_COLORS_88
Default 88 colors palette
-
D50
public static final double[] D50
D50 illuminant for CAM color spaces
-
D65
public static final double[] D65
D65 illuminant for CAM color spaces
-
averageSurrounding
public static final double[] averageSurrounding
Average surrounding for CAM color spaces
-
dimSurrounding
public static final double[] dimSurrounding
Dim surrounding for CAM color spaces
-
darkSurrounding
public static final double[] darkSurrounding
Dark surrounding for CAM color spaces
-
sRGB_encoding_environment
public static final double[] sRGB_encoding_environment
sRGB encoding environment
-
sRGB_typical_environment
public static final double[] sRGB_typical_environment
sRGB typical environment
-
AdobeRGB_environment
public static final double[] AdobeRGB_environment
Adobe RGB environment
-
COLORS_256
private static int[] COLORS_256
-
COLOR_NAMES
private static java.util.Map<java.lang.String,java.lang.Integer> COLOR_NAMES
-
L
private static final int L
- See Also:
- Constant Field Values
-
A
private static final int A
- See Also:
- Constant Field Values
-
B
private static final int B
- See Also:
- Constant Field Values
-
X
private static final int X
- See Also:
- Constant Field Values
-
Y
private static final int Y
- See Also:
- Constant Field Values
-
Z
private static final int Z
- See Also:
- Constant Field Values
-
kl
private static final double kl
- See Also:
- Constant Field Values
-
kc
private static final double kc
- See Also:
- Constant Field Values
-
kh
private static final double kh
- See Also:
- Constant Field Values
-
k1
private static final double k1
- See Also:
- Constant Field Values
-
k2
private static final double k2
- See Also:
- Constant Field Values
-
J
public static final int J
Lightness- See Also:
- Constant Field Values
-
Q
public static final int Q
Brightness- See Also:
- Constant Field Values
-
C
public static final int C
Chroma- See Also:
- Constant Field Values
-
M
public static final int M
Colorfulness- See Also:
- Constant Field Values
-
s
public static final int s
Saturation- See Also:
- Constant Field Values
-
H
public static final int H
Hue Composition / Hue Quadrature- See Also:
- Constant Field Values
-
h
public static final int h
Hue- See Also:
- Constant Field Values
-
SUR_F
static final int SUR_F
- See Also:
- Constant Field Values
-
SUR_C
static final int SUR_C
- See Also:
- Constant Field Values
-
SUR_N_C
static final int SUR_N_C
- See Also:
- Constant Field Values
-
VC_X_W
static final int VC_X_W
- See Also:
- Constant Field Values
-
VC_Y_W
static final int VC_Y_W
- See Also:
- Constant Field Values
-
VC_Z_W
static final int VC_Z_W
- See Also:
- Constant Field Values
-
VC_L_A
static final int VC_L_A
- See Also:
- Constant Field Values
-
VC_Y_B
static final int VC_Y_B
- See Also:
- Constant Field Values
-
VC_F
static final int VC_F
- See Also:
- Constant Field Values
-
VC_C
static final int VC_C
- See Also:
- Constant Field Values
-
VC_N_C
static final int VC_N_C
- See Also:
- Constant Field Values
-
VC_Z
static final int VC_Z
- See Also:
- Constant Field Values
-
VC_N
static final int VC_N
- See Also:
- Constant Field Values
-
VC_N_BB
static final int VC_N_BB
- See Also:
- Constant Field Values
-
VC_N_CB
static final int VC_N_CB
- See Also:
- Constant Field Values
-
VC_A_W
static final int VC_A_W
- See Also:
- Constant Field Values
-
VC_F_L
static final int VC_F_L
- See Also:
- Constant Field Values
-
VC_D_RGB_R
static final int VC_D_RGB_R
- See Also:
- Constant Field Values
-
VC_D_RGB_G
static final int VC_D_RGB_G
- See Also:
- Constant Field Values
-
VC_D_RGB_B
static final int VC_D_RGB_B
- See Also:
- Constant Field Values
-
epsilon
private static final double epsilon
- See Also:
- Constant Field Values
-
kappa
private static final double kappa
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRgbColors
public static void setRgbColors(int[] colors)
-
rgbColor
public static int rgbColor(int col)
-
rgbColor
public static java.lang.Integer rgbColor(java.lang.String name)
-
roundColor
public static int roundColor(int col, int max)
-
roundColor
public static int roundColor(int col, int max, java.lang.String dist)
-
roundRgbColor
public static int roundRgbColor(int r, int g, int b, int max)
-
roundColor
static int roundColor(int color, int[] colors, int max, java.lang.String dist)
-
roundColor
static int roundColor(int color, int[] colors, int max, Colors.Distance distance)
-
getDistance
static Colors.Distance getDistance(java.lang.String dist)
-
doGetDistance
private static Colors.Distance doGetDistance(java.lang.String dist)
-
getWeights
private static double[] getWeights(java.lang.String dist)
-
scalar
private static double scalar(double[] c1, double[] c2, double[] w)
-
scalar
private static double scalar(double[] c1, double[] c2)
-
cie94
private static double cie94(double[] lab1, double[] lab2)
-
cie00
private static double cie00(double[] lab1, double[] lab2)
-
cam02
private static double cam02(int p1, int p2, double[] vc)
-
jmh2ucs
private static double[] jmh2ucs(double[] lch)
-
camlch
static double camlch(double[] c1, double[] c2)
-
camlch
static double camlch(double[] c1, double[] c2, double[] w)
-
hueDifference
private static double hueDifference(double hue1, double hue2, double c)
-
rgb
private static double[] rgb(int color)
-
rgb2xyz
static double[] rgb2xyz(int color)
-
rgb2cielab
static double[] rgb2cielab(int color)
-
camlch
static double[] camlch(int color)
-
camlch
static double[] camlch(int color, double[] vc)
-
camlab
static double[] camlab(int color)
-
camlab
static double[] camlab(int color, double[] vc)
-
lch2lab
static double[] lch2lab(double[] lch)
-
xyz2camlch
private static double[] xyz2camlch(double[] xyz, double[] vc)
-
forwardTransform
private static double[] forwardTransform(double[] XYZ, double[] vc)
CIECAM02 appearance correlates
-
calculateH
private static double calculateH(double h)
-
forwardResponseCompression
private static double[] forwardResponseCompression(double[] RGB, double[] vc)
-
forwardPostAdaptationConeResponse
private static double[] forwardPostAdaptationConeResponse(double[] RGB, double[] vc)
-
CAT02toHPE
public static double[] CAT02toHPE(double[] RGB)
-
forwardPreAdaptationConeResponse
private static double[] forwardPreAdaptationConeResponse(double[] XYZ)
-
vc
static double[] vc(double[] xyz_w, double L_A, double Y_b, double[] surrounding)
-
rgb2cielab
public static double[] rgb2cielab(double[] rgb)
-
rgb2xyz
private static double[] rgb2xyz(double[] rgb)
-
pivotRgb
private static double pivotRgb(double n)
-
xyz2lab
private static double[] xyz2lab(double[] xyz)
-
pivotXyz
private static double pivotXyz(double n)
-
sqr
private static double sqr(double n)
-
-