Class XYZ
- java.lang.Object
-
- micycle.peasygradients.colorspace.XYZ
-
- All Implemented Interfaces:
ColorSpaceTransform
public final class XYZ extends Object implements ColorSpaceTransform
CIE XYZ (aka CIE 1931) (aka tristimulus values) is a device-invariant representation of color. It serves as a standard reference against which many other color spaces are defined.- Author:
- Michael Carleton
-
-
Constructor Summary
Constructors Constructor Description XYZ()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double[]
fromRGB(double[] rgb)
Converts an RGB color into the corresponding color in the target color space.static double[]
rgb2xyz(double[] rgb)
Static for use by other classesdouble[]
toRGB(double[] xyz)
Converts a color from the implementing color space to RGB.static double[]
xyz2rgbQuick(double[] xyz)
Deprecated.static double[]
xyz2rgbVeryQuick(double[] xyz)
Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface micycle.peasygradients.colorspace.ColorSpaceTransform
interpolateLinear
-
-
-
-
Method Detail
-
fromRGB
public double[] fromRGB(double[] rgb)
Description copied from interface:ColorSpaceTransform
Converts an RGB color into the corresponding color in the target color space.- Specified by:
fromRGB
in interfaceColorSpaceTransform
- Parameters:
rgb
- [R,G,B] where values are 0...1.0- Returns:
-
toRGB
public double[] toRGB(double[] xyz)
Description copied from interface:ColorSpaceTransform
Converts a color from the implementing color space to RGB. Implementations should focus on optimizing this conversion process for efficiency.- Specified by:
toRGB
in interfaceColorSpaceTransform
- Parameters:
xyz
- [X,Y,Z]- Returns:
- [R,G,B] where values are 0...1.0
-
xyz2rgbQuick
@Deprecated public static double[] xyz2rgbQuick(double[] xyz)
Deprecated.Fast, negligible visual effect inaccuracy.- Parameters:
xyz
- [X,Y,Z]- Returns:
- [R,G,B] where values are 0...1.0
-
xyz2rgbVeryQuick
@Deprecated public static double[] xyz2rgbVeryQuick(double[] xyz)
Deprecated.Very fast, but visible inaccuracies- Parameters:
xyz
- [X,Y,Z]- Returns:
- [R,G,B] where values are 0...1.0
-
rgb2xyz
public static double[] rgb2xyz(double[] rgb)
Static for use by other classes- Parameters:
rgb
- [R,G,B] where values are 0...1.0- Returns:
-
-