Documentation of 'org.jhotdraw.color.CIELABColorSpace' Java class
CIELABColorSpace
org.jhotdraw.color

Class CIELABColorSpace

  • All Implemented Interfaces:
    java.io.Serializable, NamedColorSpace


    public class CIELABColorSpace
    extends java.awt.color.ColorSpace
    implements NamedColorSpace
    The 1976 CIE L*a*b* color space (CIELAB).

    The L* coordinate of an object is the lightness intensity as measured on a scale from 0 to 100, where 0 represents black and 100 represents white.

    The a* coordinate of an object represents the position of the object’s color on a pure green and pure red scale, where -127 represents pure green and +127 represents pure red.

    The b* coordinate represents the position of the object’s color on a pure blue and pure yellow scale, where -127 represents pure blue and +127 represents pure yellow.

    The distance that can be calculated between two colors, is directly proportional to the difference between the two colors as perceived by the human eye.

    The above description has been derived from http://www.optelvision.com/documents/optel-vision-s-explanation-on-cielab-color-space.pdf

    See Also:
    Serialized Form
    • Constructor Detail

      • CIELABColorSpace

        public CIELABColorSpace()
    • Method Detail

      • toRGB

        public float[] toRGB(float[] colorvalue)
        Specified by:
        toRGB in class java.awt.color.ColorSpace
      • fromRGB

        public float[] fromRGB(float[] rgbvalue)
        Specified by:
        fromRGB in class java.awt.color.ColorSpace
      • toCIEXYZ

        public float[] toCIEXYZ(float[] colorvalue)
        Lab to XYZ.
         X = xr*Xw;
         Y = yr*Yw;
         Z = zr*Zw;
         
        where
         xr = fx^3, if fx^3 > eps
            = (116*fx - 16)/k, if fx^3 <= eps
        
         yr = ((L+16)/116)^3, if L > k*eps
            = L/k, if L <= k*eps
        
         zr = fz^3, if fz^3 > eps
            = (116*fz - 16)/k, if fz^3 <= eps
        
         fx = a/500+fy
        
         fz = fy - b / 200
        
         fy = (L+16)/116
        
         eps = 216/24389
         k = 24389/27
         
        Source: http://www.brucelindbloom.com/index.html?Equations.html
        Specified by:
        toCIEXYZ in class java.awt.color.ColorSpace
        Parameters:
        colorvalue - Lab color value.
        Returns:
        CIEXYZ color value.
      • fromCIEXYZ

        public float[] fromCIEXYZ(float[] colorvalue)
        XYT to Lab.
         L = 116*fy - 16
         a = 500 * (fx - fy)
         b = 200 * (fy - fz)
         
        where
         fx = xr^(1/3), if xr > eps
            = (k*xr + 16) / 116 if xr <= eps
        
         fy = yr^(1/3), if yr > eps
            = (k*yr + 16) / 116 if yr <= eps
        
         fz = zr^(1/3), if zr > eps
            = (k*zr + 16) / 116 if zr <= eps
        
         xr = X / Xw
         yr = Y / Yw
         zr = Z / Zw
        
         eps = 216/24389
         k = 24389/27
         
        Source: http://www.brucelindbloom.com/index.html?Equations.html
        Specified by:
        fromCIEXYZ in class java.awt.color.ColorSpace
        Parameters:
        colorvalue - CIEXYZ color value.
        Returns:
        Lab color value.
      • getMinValue

        public float getMinValue(int component)
        Overrides:
        getMinValue in class java.awt.color.ColorSpace
      • getMaxValue

        public float getMaxValue(int component)
        Overrides:
        getMaxValue in class java.awt.color.ColorSpace
      • getName

        public java.lang.String getName(int component)
        Overrides:
        getName in class java.awt.color.ColorSpace
      • main

        public static void main(java.lang.String[] arg)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.