Class 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 Detail

      • XYZ

        public XYZ()
    • 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 interface ColorSpaceTransform
        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 interface ColorSpaceTransform
        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: