Class IPT
- java.lang.Object
-
- micycle.peasygradients.colorspace.IPT
-
- All Implemented Interfaces:
ColorSpaceTransform
public final class IPT extends Object implements ColorSpaceTransform
The IPT color space is similar in model to CIELAB color space but is more uniform in perceived hue. Published by Ebner and Fairchild in 1998.IPT opponents: I light–dark; P red–green, T yellow–blue.
- Author:
- Michael Carleton
-
-
Constructor Summary
Constructors Constructor Description IPT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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[]
LMStoXYZInverse(double[] IPT)
Reverses#LMStoXYZ(double[])
double[]
toRGB(double[] IPT)
Converts a color from the implementing color space to RGB.-
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
-
toRGB
public double[] toRGB(double[] IPT)
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:
IPT
- an array representing the color in the implementing color space. The specific meaning and length of this array depend on the color space.- Returns:
- an array of three doubles representing the color in RGB, with each component normalized to the range [0, 1]. The output may exceed this range before display calibration or clipping is applied.
-
LMStoXYZInverse
public static double[] LMStoXYZInverse(double[] IPT)
Reverses#LMStoXYZ(double[])
- Parameters:
IPT
-- Returns:
-
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
- an array of three doubles representing the red, green, and blue components of the color, each normalized to the range [0, 1]- Returns:
- an array of doubles representing the color in the target color space. The length and interpretation of this array depend on the specific color space.
-
-