Abstract:
An expert color selection system that assists the user in selecting color combinations is disclosed. The expert system suggests combinations of colors that are harmonious with each other. The user may tune the level of harmony in the combination. The user may also select a color emotion for the color combination and set the emotion threshold. The suggested color combination can be used as interior or exterior paints and for color merchandise.

Description:
FIELD OF THE INVENTION 
       [0001]    This invention generally applies to a color selection system and more specifically to a color selection system with color harmony and color emotion intelligence. 
       BACKGROUND OF THE INVENTION 
       [0002]    The present description relates to a color selection system for assisting the selection of color combinations. 
         [0003]    Color selection tools are used in various sectors, including for example the paint industry, to assist consumers and professional designers in choosing appealing color combinations. The abundance of available color choices can make it challenging at times for both normal consumers and experienced designers to select appealing color combinations, even with the aid of existing color selection tools. Many existing color selection tools provide pre-existing recommended color combinations that were chosen by designers and experts. 
         [0004]    The patent literature discloses color selection systems where coordinating colors are predetermined based on the first color selected by a user and based on a color coordination algorithm. The selections of colors recommended to users and consumers offered by these conventional color selection systems are limited. 
         [0005]    Accordingly, there is a need for an on-the-fly color selection system that can provide consumers and other users color combinations that are harmonious and/or have the desired emotion threshold. 
       SUMMARY OF THE INVENTION 
       [0006]    Hence, the invention is directed to an expert color selection system that assists the user in selecting a starting color, and in one embodiment without additional input from the user calculates one or more color combinations that are harmonious with the starting or selected color and/or provide desired color emotion threshold with the starting color. 
         [0007]    Another aspect of the present invention relates to a development of novel uniform three-dimensional color spaces in Cartesian, polar and spherical coordinates. The color wheel theories are more accurately used with these novel uniform color coordinates. Another aspect of the present invention relates to transformations and inverse transformation among the three-dimensional color spaces including uniform and non-uniform spaces and including conventional color spaces and the novel uniform color spaces. These transformations and inverse transformations readily take colors from one space, e.g., CIE XYZ to Munsell and back or from CIELAB to a novel uniform color space and back. In one example, these transformations allow colors in any space be transformed to a space where color emotions and color harmonies can be calculated. Thereafter, harmonious colors and colors that meet emotional thresholds can be displayed. 
         [0008]    Another aspect of the present invention relates to the quantization of the uniform color space into sub-spaces, which preferably are rectangular prisms or cuboids, where harmonious colors or colors that meet emotional thresholds may be included. The sub-spaces can include a color that the user selects, and additional sub-spaces are ascertained by rotating the first sub-space. The sub-spaces may not include the color that the user selects and the sub-spaces are the space surrounding color(s) that have a relationship with the color that the user selects based on color wheel theories applied to a uniform color space. 
         [0009]    Another aspect of the present invention relates to a clustering process, where the analytical processes to determine harmonious color combinations or color combinations that meet color emotional thresholds are conducted on color combinations comprising the selected color and centers of cells or clusters within the quantized sub-spaces. The clustering process optimizes or minimizes the analytical processes to determine harmonious colors and/or colors that meet color emotion thresholds. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]    In the accompanying drawings, which form a part of the specification and are to be read in conjunction therewith and in which like reference numerals are used to indicate like parts in the various views: 
           [0011]      FIG. 1  is a schematic view showing the available paint colors in three-dimensional non-uniform space; 
           [0012]      FIG. 2  is a block diagram showing the available color coordinate systems and the transformations and inverse transformation among them; 
           [0013]      FIG. 3  shows an exemplary cuboid having dimensions in the M, H and K dimensions in the uniform MHK color space; 
           [0014]      FIG. 4A  shows a cuboid on the HK plane;  FIG. 4B  shows the available paint colors that are within the cuboid in  FIG. 4A ;  FIG. 4C  shows the paint colors within the cuboid after a rotation; 
           [0015]      FIG. 5A  shows a cuboid on the HM plane;  FIG. 4B  shows the available paint colors that are within the cuboid in  FIG. 5A ;  FIG. 5C  shows the paint colors within the cuboid after a rotation; 
           [0016]      FIG. 6A  shows a cuboid on the MK plane;  FIG. 6B  shows the available paint colors that are within the cuboid in  FIG. 6A ;  FIG. 6C  shows the paint colors within the cuboid after a rotation; 
           [0017]      FIG. 7  shows a first cuboid that contains a color that a user selects and other cuboids fanned by rotations of the first cuboid; 
           [0018]      FIG. 8  shows a cuboid formed around a complementary color to the selected color; 
           [0019]      FIG. 9  shows two cuboids formed around two colors generated by color wheel theories in relation to the selected color; 
           [0020]      FIG. 10  shows a cuboid divided into clusters; 
           [0021]      FIG. 11  shows a clustering process to ascertain color harmony for combinations including the selected color and the colors in two cuboids; 
           [0022]      FIG. 12  shows a flow chart summarizing the steps for determining color harmony including the clustering process; 
           [0023]      FIG. 13  shows a flow chart summarizing the steps for determining color emotion(s) including the clustering process; 
           [0024]      FIG. 14  shows a flow chart summarizing the steps for determining color harmony and color emotion(s) including the clustering process; and 
           [0025]      FIG. 15  shows a flow chart utilizing the present invention with a digital micro-mirror device to display the suggested color combination. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0026]    Producible colors can be represented in several ways, including by the intensities at the various wavelengths within the visible electromagnetic range. It is known that colors can be presented in a three dimensional space. It is also known that colors do not occupy all regions of the three-dimensional space. In other words, there are certain regions outside the gamut where no color exists. This is caused by the lack of pigments, among other things, that can be mixed to produce colors for those empty regions.  FIG. 1  shows color merchandise or paint colors in the format of paint chips on color strips in a three dimensional space. For example, more lighter colors, where the lightness or value of the colors are closer to white, are available than darker colors, where the lightness of value of the colors are closer to black. Also more yellow colors are available than other colors. In addition to the uneven occupation of colors, the known three-dimensional color spaces are mostly non-uniform or have units that are cumbersome to perform analytical analysis, as described below. 
         [0027]    An early three-dimensional coordinate was offered in 1931 by the Commission Internationale de l&#39;Eclariage (CIE). This system defines three values also known as tristimulus values that can describe any color that human eye can perceive. These tri-stimulus values are 
         [0000]        X=k∫   λ   S (λ) R (λ)   x   (λ) dλ   (1)
 
         [0000]        Y=k∫   λ   S (λ) R (λ)   y   (λ) dλ   (2)
 
         [0000]        Z=k∫   λ   S (λ) R (λ)   z   (λ) dλ   (3)
 
         [0000]    where X, Y, and Z are the tristimulus values, k is a normalizing factor usually calculated as 
         [0000]    
       
         
           
             
               
                 
                   k 
                   = 
                   
                     100 
                     
                       
                         ∫ 
                         λ 
                       
                        
                       
                         
                           S 
                            
                           
                             ( 
                             λ 
                             ) 
                           
                         
                          
                         
                           
                             y 
                             _ 
                           
                            
                           
                             ( 
                             λ 
                             ) 
                           
                         
                          
                         
                             
                         
                          
                         
                            
                           λ 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    S(λ) is the spectral concentration of the illumination on the specimen and R(λ) the reflectance of the object being assessed for color. The  x ,  y ,  z  with the bars over them are the 1931 Standard Colorimetric Observer or the CIE 1931 Color Matching Functions. The CIEXYZ system is a Cartesian type of XYZ coordinate. 
         [0028]    It is recognized that CIEXYZ is a non-uniform color space. Uniformity in a color coordinate system is the property that defines an equal notational difference in any two, or more, places in the space as being equally perceptible to an observer. This property is necessary to the establishment of color tolerances in any system. CIEXYZ was transformed in the mid-1970 to a more uniform system based on three Cartesian type coordinates: L*, a* and b* or CIELAB, which are at right angles to each other. L* designate lightness, a* designates redness-greenness and b* designates yellowness-blueness. 
         [0029]    Since redness-greenness and yellowness-blueness axes are non-intuitive, CIELAB is converted to CIE L*C*h, which is a polar coordinate. L* still designates lightness, C* designates chroma and has the same units as a* and b*, and h° designates the hue angle. Lightness indicates the magnitude of the property of a reflecting object which nominates whether it appears to reflect more or less light incident upon it. Chroma indicates the amount of saturation of that color, e.g., the amount of purple in that purple color. Hue indicates the color and ranges from 0° at the red+ end of a* axis to 360°. Hue is the indication of color on the color wheel. CIE L*C*h or CIELCH is a polar system of coordinates. 
         [0030]    Munsell is another color coordinate system developed circa 1915. The Munsell system comprises three attributes, which are hue, value (lightness), and chroma. The CIELCh system, which was developed after Munsell, has similar coordinates. The Munsell system expresses value (V) in terms of its relationship to CIEXYZ luminous intensity Y. 
         [0000]        Y= 1.1914 V −0.22533 V   2 +0.23352 V   3 −0.0.20484 V   4 +0.00081939 V   5   (5)
 
         [0000]    This equation is often referred to as the Munsell 5th Order Function. Solving for Munsell&#39;s value yields: 
         [0000]        V= 2.0583 Y   1/2.736 −1.0623  (6)
 
         [0000]    The Munsell notation is unique in that Munsell chose a hue circle of 100 intervals which he designated by the five major hue notations
       R—for red   Y—for yellow   G—for green   B—for blue   P—for purple
 
Combinations of these letter designations gave the intermediate, secondary (sometimes called binary) hues.
   YR—for orange   GY—for greenish yellow   BG—for cyan   PB—for magenta   RP—for reddish purple       
 
         [0041]    Since there were 10 such hue designations, Munsell assigned 10 units of hue circle coverage to each letter combination; thus, obtaining 100 whole number hues from 1R all the way around to 10RP. These hue designations were combined with two other designators, an example of which might be the designation 5RP 8/10. Here the 8/ represents a Value of 8 units and the /10 represents a Chroma of 10 units. When written alone Munsell Value designations are always followed by a slash character and Munsell Chroma designations are always preceded by a slash. The notation thus turns out to be Hue, Value and Chroma in that order, or H V/C. 
         [0042]    CIEXYZ, CIELAB, CIELCH and Munsell are non-uniform color coordinate systems. An early uniform color coordinate system is the Ljg color coordinates from the Optical Society of America (OSA). The Ljg system has the lightness axis L with its zero at about 30% reflectance and ranges from about −5 (near black) to +7 (near white). The chromatic axes are j for yellowness-blueness and g for greenness-redness. The chromatic units range from about −7 to +7 depending on the hue angle and lightness of the gamut. These axes have their zero near neutral grey. It noteworthy that the greenness-redness axis is reverse from CIE&#39;s a* axis, and that Ljg is a large-scale color difference uniformity. Large-scale difference includes units that are five CIELAB units or larger. 
         [0043]    In one embodiment of the present invention, a uniform color coordinate system is developed to transform the uniform Ljg system to a more usable uniform system MHK, which is another Cartesian system. The axis M is the lightness axis, while H is redness-greenness (similar to the a* of the CIELAB system) and K yellowness-blueness (similar to the b* of the CIELAB system). The transformation from Ljg to the more usable MHK is shown below. 
         [0000]        M= 7.2 L +54 
         [0000]        H=− 7.2 g    
         [0000]        K= 7.2 j    
         [0000]    As shown, Ljg&#39;s reverse greenness-redness axis (g) has been re-orientated, and all three axes are scaled up by a factor of 7.2 to reduce the large scale factor and the lightness axis has been translated upward by 54 units. Hence, the M lightness axis now has its zero proximate near black. 
         [0044]    The MHK color coordinate system can also be converted to a polar coordinate HuVC, where Hu is the hue angle, V is lightness and C is chroma. V, which ranges from 1 to 100, is different than Munsell&#39;s V, which ranges from 1 to 10. C has similar chroma units. The MHK color coordinate system can also be converted to a spherical coordinate UVW, where U is the length of a first line or vector from M=0 to the color, V is the angle from the HK plane to said first line and W is the angle on the HK plane and from the yellowness-blueness line K to a second line, wherein the second line is a perpendicular projection of the first line to the HK plane. 
         [0045]    One aspect of the present invention relates to the conversion or transformation of color data from one color coordinate system to another and back again. As shown in  FIG. 2 , the color coordinate systems discussed above are shown along with the standard Red Green Blue (sRGB/RGB) color system used in televisions and computer monitors. Also shown are the known Reflectance Function, which comprises the reflections of visible light (380 nm-780 nm) from a surface, and the known Color Stimulus Function, which is the CIE color matching functions weighted by the spectral power distribution of the light illuminating the object, as discussed in ASTM E308. The CIEXYZ system is at the center of this transformation arrangement, where transformation and inverse (or reverse) transformation between CIEXYZ and each of Munsell, RGB, OSALjg, CIELCh, CIELab and Color Stimulus Function occur. The Reflectance Function is transformable with the Color Stimulus Function and is therefore transformable with CIEXYZ. Similarly, CIELCh is transformable with CIELab and is therefore transformable with CIEXYZ. The uniform HVC and UVW are transformable with the uniform MHK, which is transformable with OCALjg. Hence, MHK, HVC and UVW are also transformable with CIEXYZ. Solid arrow lines connecting the color coordinate systems indicate that the transformations and inverse transformations are previously known, and the broken arrow lines indicate that the transformations and inverse transformations are developed by the present inventors. Transformation and inverse transformation between CIEXYZ and Munsell were known only through table look-up, and analytical transformation and inverse transformation are developed by the present inventors. 
         [0046]    As  FIG. 2  clearly shows, color coordinates in any color coordinate system can be converted into any other color coordinate systems. Although not shown, the Cyan Magenta Yellow Black system (CMYK) or other systems typically used in color printers is also contemplated. Transformation and inverse transformation between RGB for computer monitors and CMYK and other color systems for computer printers are well known. 
         [0047]    The analytical or mathematical transformations and inverse transformations are presented in the Appendix located at the end of this Section. 
         [0048]    The novel uniform color coordinate systems are used in accurately coordinating or selecting colors using color wheel theories. For example, a user may need the colors that form a triad relationship to a chosen color. If the user uses a non-uniform color space in a simple two-dimensional color circle, then the triad colors, which should be located 120° from the chosen color, would be incorrectly selected. The same errors would occur in three-dimensional color spaces, as shown in  FIG. 1 , but with potentially larger error magnitudes, e.g., whether to keep the same lightness plane or to choose a parallel lightness plane or even a slanted plane with varying lightness. This holds true for other color wheel theories, such as, complementary, split complementary, mono-chromatic, analogous, tetradic, etc. 
         [0049]    Another aspect of the present invention relates to transformations and inverse transformations among the three-dimensional color spaces including uniform and non-uniform spaces and including conventional color spaces and the novel uniform color spaces. These transformations and inverse transformations readily take colors from one space, e.g., CIE XYZ to Munsell and back or from CIELAB to a novel uniform color space and back. In one example, these transformations allow colors in any space be transformed to a space where color emotions and color harmonies based on psychophysical analytical models can be calculated. Thereafter, harmonious colors and/or colors that meet emotional thresholds can be displayed. 
         [0050]    In accordance with another aspect of the present invention, a uniform three-dimensional color space, preferably the MHK coordinate system, is quantized into color subspace(s) or subregion(s) to enable the invention to focus at strategic location(s) in the entire color space and carry out color harmony and color emotion analysis. An advantage of quantization is to calculate color harmony and emotions more quickly. Color harmony and color emotions are preferably based on psychophysical responses of people to colors and color combinations, which are fully described in U.S. published patent applications US2010/0194775 and US2010/0194776, which are incorporated herein in their entireties. Color harmony of color combination and color emotions of colors are empirically determined based on human subjects&#39; psychological responses to colors. These empirical observations were reduced to mathematical equations or mathematical functions expressed in terms L*, a* and b* or L*, C* and h°, and possibly CIEXYZ. 
         [0051]    In one embodiment, the subspace is preferably a rectangular prism also known as a cuboid having dimensions in the directions M, H and K as shown in  FIG. 3 . It is noted that solid shapes other than cuboid are usable including regular and irregular shapes. 
         [0052]      FIGS. 4A-6C  illustrate the use of the cuboid to quantize, or to limit a variable or variables describing a physical system to discrete, distinct values. A relatively planar cuboid having a thickness or the smallest dimension sufficient to identify at least a single layer of colors is positioned at various orientations to illustrate the palettes that are within the cuboid. 
         [0053]      FIG. 4A  shows a horizontal cuboid along the HK plane and intersecting the M axis.  FIG. 4B  shows the paint colors that are located on the planar cuboid shown in  FIG. 4A . This cuboid can be rotated about the K (yellow-blue) axis or the H (red-green) axis at M value of 50 (neutral gray) to obtain other colors. This cuboid can also be moved up and down the M axis for lighter or darker colors.  FIG. 4C  shows the colors obtained from a rotation of the cuboid in  FIG. 4A  about the K (yellow-blue) axis. The resulting colors include the red colors being lighter and the green colors being darker. 
         [0054]      FIG. 5A  shows a vertical cuboid along the MH plane and intersecting the K axis.  FIG. 5B  shows the paint colors that are located on the planar cuboid shown in  FIG. 5A . This cuboid can be rotated and moved linearly to obtain other colors or bluer/yellower colors.  FIG. 5C  shows the colors obtained from a rotation of the cuboid in  FIG. 5A  about the H axis toward blue at M=0 and away from blue. The resulting colors include bluer whites and yellower blacks. 
         [0055]      FIG. 6A  shows a vertical cuboid along the MK plane and intersecting the H axis.  FIG. 6B  shows the paint colors that are available that are located on the planar cuboid in  FIG. 6   a . This cuboid can also be rotated and moved linearly to obtain other colors or redder/greener colors.  FIG. 6C  shows the colors obtained from a rotation around the K axis at M=0 to tip toward green. 
         [0056]    The cuboids described above are used for at least two purposes: to identify suitable color subspace(s) using color wheel theories in a color palette or a color library, e.g., the various color libraries from Benjamin Moore or from any color palette, and after the suitable color subspace(s) are identified to rapidly execute color harmony and color emotion analysis. 
         [0057]    Suitable color subspaces or cuboids may include the color selected by the user, e.g., the first color or the selected color. In this embodiment, a cuboid having a predetermined size is centered vertically with the selected color from the user at its center, as shown in  FIG. 5A  or  6 A. Additional cuboids  2 - 6  are created by rotating the first cuboid  1  around a vertical axis parallel to the M axis with the selected color  10  as the center of rotation or pivot point, as best shown in  FIG. 7 . Alternatively or additionally, additional cuboids  2 - 6  are created by rotating the first cuboid around the H axis or the K axis. These cuboids may have any dimensions and in one example the cuboids have a thickness of about 20 units (same unit as in the H and K axes). The cuboids&#39; height and width are preferably limited to the color gamut limit of the color library used for color harmony analysis. 
         [0058]    In another embodiment, the cuboid  1  can be centered horizontally with the selected color from the user at its center, as shown in  FIG. 4A . Additional cuboids  2 - 6  are created by rotating the first cuboid  1  around a vertical axis parallel to the H axis or K axis with the selected color  10  as the center of rotation or pivot point. 
         [0059]    Colors from within each rectangular cuboid  1 - 6  described in the two preceding paragraphs could potentially be a member of a color combination for color harmony analysis or color emotion analysis. Preferably, a single cuboid only contributes one color therewithin to a color combination for color harmony and color emotion analyses. These cuboids  1 - 6 , as illustrated in  FIG. 7 , all contain the color selected by the user, e.g., the first color. As the number of cuboids increases, the number of combinations available for color harmony and color emotion analyses and the computational time increase faster by manifolds. 
         [0060]    Suitable color subspaces or cuboids may not include the color selected by the user. This embodiment uses color circle theories, such as complementary, split complementary, mono-chromatic, analogous, triads, tetradic, etc. to identify suitable cuboids that do not necessary encompass the selected color or the first color. Color wheel theories also include combinations of colors that when combined yield a neutral gray. These color chords include dyads (two-color combinations), triads (three-color combination), tetrads (four-color combinations), hexads (six-color combinations), etc. The selected color is used as a guiding post or guiding compass and cuboids are selected in relation to the selected color based on color wheel theories. 
         [0061]    It is noted that these known color wheel theories are based on the geometric relationship of colors in three dimensional space, but were often applied to non-uniform color space. Application of color wheel theories on non-uniform color space often yields unsatisfactory results or unharmonious colors. It is preferred that these color wheel theories are used on uniform color spaces such as the inventive MHK, HuVC and UVW, described above. It is further noted that instead of selecting individual colors that are suggested by the color wheel theories, when cuboids encompassing said individual colors are substituted for said individual colors the cuboids contains colors that may be more harmonious or that meet color emotion thresholds than the individual colors suggested by the color wheel theories. Furthermore, psychophysical analytical relationships for color emotions and color harmony are the applied to the possible combinations of colors in the cuboids suggested by color wheel theories to determine the optimum color combinations. 
         [0062]    Referring to  FIG. 8 , an example of an application of this method for a two-color combination is illustrated. A selected color or first color  10  is chosen in the MHK color space and more specifically on an HK plane. A complementary color  12  is located on the same plane or at the same M value or same lightness plane. Instead of using the complementary color, a cuboid  14  containing the complementary color  12  is selected as a possible palette or group of colors that can be harmonious or form optimal color emotion thresholds with the selected color as determined by psychophysical analytical models described in U.S. published patent applications US2010/0194775 and US2010/0194776. The complementary color  12  and cuboid  14  can be chosen on a different lightness plane, for example a certain M units above or below that of the selected color. 
         [0063]    The complementary color  12  once chosen forms the center of the complementary cuboid  14 , which as shown in  FIG. 8 , is preferably a rectangular box that is for example ±10 units in the M or lightness dimension and ±5 units in chroma and hue angles (in the cylindrical HuVC uniform system). The cuboid preferably has square sides in the chroma direction. The sides defining the hue limits of the boxes do not run along lines of equal hue angle, but along lines of equal Cartesian distance from the central line of constant hue angle. The dimensions of this box can vary. Preferably, this cuboid box has dimensions in the MHK dimensions and units. All colors from the color library that fall within this box are identified and retained for further calculations. In the event that there is no color in this cuboid box, the chroma can increase or decrease or the size of the box may increase, until the box is populated with colors. 
         [0064]    Referring to  FIG. 9 , another example of an application of this method for a three-color combination is illustrated. A selected color or first color  10  is chosen in the MHK color space and more specifically on an HK plane that connects first color  10  and the center neutral point on the M axis. This HK plane is extended to opposite side of the circle. Two colors  16  and  18  that form a split complementary relationship with selected color  12 , e.g., ±20° from the complementary color on this HK plane, are identified and cuboids  20  and  22  surrounding split complementary colors  16  and  18  using a predetermined ΔM, ΔH, ΔK values, respectively, are selected similar to cuboid  14 . Colors in cuboids  20  and  22  are retained for analysis. Triad colors  16  and  18  may be located on the same M plane or may have a M value different than the M value of selected color  10 . 
         [0065]    Other ways to choose a three color combination with the selected color  10  and two cuboids include, but are not limited to split complementary or analogous harmony, i.e., chose two colors that have the same chroma and lightness but are at a small hue angle, e.g., ±3°-20°, from the complementary color, correlative harmony, i.e., the two analogous harmonious colors that are 20 units in the M axis darker or 10 units if the 20 units darker would result in M values of less than 0, and transverse harmony, i.e., similar to triads, split complementary, analogous harmony and correlative harmony, except that the second and third colors are equally darker than M=50 (mid-grey) of the gamut of the colors that are lighter by the equivalent amount. 
         [0066]    Four color combinations, i.e., the selected color and three cuboids, can also be selected. Suitable color wheel theories for four color combinations include, but are not limited to, right hand tetradic harmony, i.e., the selected color, its complementary color, its analogous harmony color using a 30° hue angle on the right side using the complementary color as the chosen color, and the complementary of the right side analogous harmony, and left-hand tetradic harmony, i.e., similar to right-hand tetradic except a left side analogous harmony is used, Preferably, the four color combinations maintain the same lightness or value, and chroma. 
         [0067]    Five color combinations can be ascertained by dividing the hue angles (360°) into 5 and six color combinations can be ascertained by dividing the hue angles into 6, with one color being the selected color. Any color combination can be devised. 
         [0068]    After the cuboids  14 ,  20 ,  22  according to color wheel theories on a uniform color space are determined, an exhaustive psychophysical analysis including color harmony and color emotions can be conducted for every two-color combination of the selected color  10  and each color within cuboid  14 , or for every three-color combination of the selected color  10 , each color in cuboid  20  and each color in cuboid  22 . The top combinations, e.g., the top 50 or so of the largest harmonious values and colors best meeting the emotion thresholds, are retained for possible display to the user in the order of color harmony preference. The top member of this list in terms of any desirable level of color harmony or color emotion is the candidate for display, if it is not a duplicate with one of the other colors in the harmony. If it is, the candidate color is the next member on the list until this condition does not exist. 
         [0069]    It can be readily appreciate that for combinations of three colors, i.e., one selected color  10  and colors from two cuboids, and for combinations of N colors, i.e., one selected color  10  and colors from N−1 cuboids, the exhaustive method would require a very high amount of computation by a controller or processor. Another embodiment of the present invention relates to a clustering method, where the cuboid is divided into smaller cells or clusters to simplify the computation. 
         [0070]    Referring to  FIG. 10 , a cuboid having the dimensions of M units by H units by K units is divided into cells or clusters. Each cluster has a three-coordinate designation (h, m, k) as shown. 
         [0071]    The dimension of each cluster may vary and is preferably relatively large at the initial stage of the clustering process. For example, a cluster can be ±10 M units in lightness and ±5 five units at the H and K dimensions from the center of the cluster, as an initial choice. Because the MHK location of the first or selected color  10  is known and the dimensions of each cuboid encompassing the selected color  10  or each cuboid derived from color wheel theories are also known, the locations of each cluster&#39;s center in the MHK space are also known. The MHK values of each cluster&#39;s center are converted to the corresponding CIE parameters (L*, a*, b* or L*, C*, h) for color harmony analysis and color emotion analysis. As discussed above in U.S. published patent applications US2010/0194775 and US2010/0194776, color harmony of color combination and color emotions of colors are empirically determined based on human subjects&#39; psychological responses to colors. These empirical observations were reduced to mathematical equations or mathematical functions expressed in terms L*, a* and b* or L*, C* and h. To use these psychophysical equations, the coordinates of selected color  10  and the centers of the cuboids&#39; clusters are transformed or inversely transformed to CIELAB space, discussed above. Alternatively, these psychological equations or functions are re-derived in the MHK, HuVC or UVW uniform color spaces, so that the color harmony and emotion analysis can be conducted without utilizing CIELAB coordinate system or other non-uniform coordinate system. 
         [0072]    With respect to the color harmony of color combinations, at this initial stage exhaustive color combinations based on the “first selected color” and the “cluster centers” from each cuboid are formed and submit their respective CIELAB parameters for color harmony analysis to identify the best color harmony color combination. The best color harmony could be the color combination with high level of color harmony for pleasing color co-ordination, or the color combination with low level of color harmony where complementary color for accent is needed to create a sharp contrast. In other words, the amount or level of color harmony is tunable. This process is illustrated in  FIG. 11 . In the event a cuboid is identified that it does not encompass any color from the given color library, this cuboid will not be used in the analysis. 
         [0073]    In one example, the cuboids are identified by rotating a cuboid that contains the selected color  10 , as illustrated in  FIG. 7 , about the M axis by 30° each time to identify a total of 6 cuboids. There would be 20 unique four-color combinations with varying levels of color harmony after an exhaustive analysis is conducted with the selected color or first color  10  being in combination with three cluster centers. 
         [0000]    
       
         
               
               
               
               
               
             
               
               
               
               
               
             
           
               
                   
               
               
                 # of combinations 
                   
                 Cuboid # 
                 Cuboid # 
                 Cuboid # 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 1st Color 
                 1 
                 2 
                 3 
               
               
                 2 
                 1st Color 
                 1 
                 2 
                 4 
               
               
                 3 
                 1st Color 
                 1 
                 2 
                 5 
               
               
                 4 
                 1st Color 
                 1 
                 2 
                 6 
               
               
                 5 
                 1st Color 
                 1 
                 3 
                 4 
               
               
                 6 
                 1st Color 
                 1 
                 3 
                 5 
               
               
                 7 
                 1st Color 
                 1 
                 3 
                 6 
               
               
                 8 
                 1st Color 
                 1 
                 4 
                 5 
               
               
                 9 
                 1st Color 
                 1 
                 4 
                 6 
               
               
                 10 
                 1st Color 
                 1 
                 5 
                 6 
               
               
                 11 
                 1st Color 
                 2 
                 3 
                 4 
               
               
                 12 
                 1st Color 
                 2 
                 3 
                 5 
               
               
                 13 
                 1st Color 
                 2 
                 3 
                 6 
               
               
                 14 
                 1st Color 
                 2 
                 4 
                 5 
               
               
                 15 
                 1st Color 
                 2 
                 4 
                 6 
               
               
                 16 
                 1st Color 
                 3 
                 4 
                 5 
               
               
                 17 
                 1st Color 
                 3 
                 4 
                 6 
               
               
                 18 
                 1st Color 
                 4 
                 5 
                 6 
               
               
                 19 
                 1st Color 
                 5 
                 6 
                 2 
               
               
                 20 
                 1st Color 
                 5 
                 6 
                 3 
               
               
                   
               
             
          
         
       
     
         [0074]    Each cluster (h, m, k) may itself contain a number of colors. As discussed above, each cluster may have ±5 units in the H and K dimensions and ±10 M units in lightness dimension. The clustering process above would deliver the optimal harmonious color combination with the selected color  10  in combination with one or more cluster centers depending on the number of cuboids used. The clusters that are included in the optimal harmonious combination are known and are again subdivided into smaller cells or sub-clusters, similar to that shown in  FIG. 10  and the process of calculating the color harmony for combinations comprising the selected color  10  and the centers of said cells or sub-clusters in said clusters is repeated until the process does not yield a combination with more optimal color harmony level. 
         [0075]    After the combination of colors with optimal harmony level is ascertained, the MHK values of the centers of the selected clusters or sub-clusters are compared to the MHK values of actual paint colors in any given color library, e.g., Benjamin Moore&#39;s various color palettes and libraries. The actual paint colors having the smallest color difference from the centers of the selected clusters or sub-clusters are chosen as the colors for the combination to be displayed and suggested to the user. 
         [0076]      FIG. 12  shows a flow chart summarizing the clustering method for determining color harmony discussed above. 
         [0077]    With respect to the color emotion(s) of color combinations, the clustering process is similar to that for color harmony. It is noted that color harmony indicates the harmonious property of a combination of colors, while color emotion(s) exists for a single color as well as an average or mean of the emotions of a combination of colors. While colors can evoke a wide variety of emotions in people, seven emotions have been identified as being material to paint colors, as discussed in U.S. published patent applications US2010/0194775 and US2010/0194776, as follows. 
         [0078]    (1) Exciting-calming: 
         [0079]    exciting: causing great enthusiasm and eagerness 
         [0080]    calming: making (someone) tranquil and quiet 
         [0081]    (2) Inviting-uninviting: 
         [0082]    inviting: offering the promise of an attractive or enjoyable experience 
         [0083]    uninviting: unappealing; unattractive 
         [0084]    (3) Warm-cool: 
         [0085]    warm: of or at a fairly or comfortably high temperature 
         [0086]    cool: of or at a fairly low temperature 
         [0087]    (4) Light-dark: 
         [0088]    light: having a considerable or sufficient amount of natural light 
         [0089]    dark: with little or no light 
         [0090]    (5) Clean-dirty: 
         [0091]    clean: free from dirt, marks, or stains 
         [0092]    dirty: covered or marked with an unclean substance 
         [0093]    (6) Happy-depressing: 
         [0094]    happy: feeling or showing pleasure or contentment 
         [0095]    depressing: causing or resulting in a feeling of miserable dejection 
         [0096]    (7) Fun-serious: 
         [0097]    fun: amusing, entertaining, or enjoyable 
         [0098]    serious: acting or speaking sincerely and in earnest, rather than in a joking or halfhearted manner 
         [0099]    The process to determine rapidly the desired color combination with the desired level of color emotion is similar to those used in the color harmony determination, discussed above, except that a desired color emotion and a desired threshold are input by the user, as well as the first or selected color  10 .  FIG. 13  shows the flow chart based on the desired color emotion threshold, the selection of color subspace, the color clustering process and the analysis of the selected color combination with the psychophysical color emotion equations. The evaluation can be applied to a single emotion or to maximize the result for multiple emotions. 
         [0100]    In another embodiment, both the color harmony and color emotion analyses can be combined into one process, as best illustrated in  FIG. 14 . 
         [0101]    The color selection process of the present invention can be used in combination with printers that print low-metamerism paint samples or merchandise that closely match real paint colors. Such low-metameric merchandise are disclosed in commonly owned U.S. Pat. No. 8,330,99 and published patent application Publication Number US2010/0225935-A1, which are incorporated by reference herein in their entireties. The color selection process of the present invention can also be displayed on a screen or surface using digital micro mirror (DMM) devices. Such devices are disclosed in commonly owned U.S. patent application Ser. No. 13/325,900 entitled “System Producing True Colors Using a Digital Micromirror Device” filed on 14 Dec. 2011, which is incorporated by reference herein in its entirety, and can spectrally match the paint colors or color merchandise.  FIG. 15  is an exemplary flow chart illustrating a non-limiting method of combining the inventive color selection process with DMM devices. 
         [0102]    It is noted that the psychophysical analytical calculations to obtain color harmony and color emotions, as well as the transformations and inverse transformations among the color coordinate systems, are conducted on a computer or a device using a processor or controller. The interface with the user, including obtaining the first color or the selected color and displaying the suggested color combinations is carried out on a visual user interface, such as a computer monitor or tablet or screen, or on a printer. The first color can be inputted by its identification number on a keyboard, or scanned by a spectrophotometer, or be selected from a menu of color choices or from color palettes or libraries. The present invention is not limited by any particular method of inputting the first or selected color. 
         [0103]    In another embodiment, the present invention is also directed to a computer system, including a processor, monitor and/or printer that operates or executes the processes and methods described and claimed herein. 
         [0104]    While it is apparent that the illustrative embodiments of the invention disclosed herein fulfill the objectives stated above, it is appreciated that numerous modifications and other embodiments may be devised by those skilled in the art. Therefore, it will be understood that the appended claims are intended to cover all such modifications and embodiments, which would come within the spirit and scope of the present invention. 
       APPENDIX 
     Transformation and Inverse Transformation of Colors Among the Color Coordinate Systems 
       [0105]    Most of the following transformations are applicable to any CIE illuminant and observer combination. For those transformations that are illuminant and observer specific, the applicable illuminant and observer combination are specified. 
       Reflectance Function to Color Stimulus Function 
       [0106]    Multiply the spectral reflectance function by the spectral power distribution of the selected illuminant or source. 
         [0000]        Q (λ)= kS (λ) R (λ),  (7)
 
         [0000]    where k is a scalar multiplier capable of normalizing the function appropriately, S(λ) is the spectral power in the source and R(λ) the reflectance function from spectrophotometry. The spectral power may be either relative or absolute, but see the following cautionary paragraph if you choose that it should be relative. 
         [0107]    The scalar k will in most instances have a value of unity. In some cases, it may be useful to normalize the function at a particular wavelength, so that it can be compared to other similar functions. It may be useful to scale the color stimulus function so that when multiplied into the CIE color-matching functions the Y value is scaled to 100, as is the convention of the CIE system for object colors. Caution should be exercised in scaling color stimulus functions as once scaled, the action cannot be reversed without knowledge of the scaling coefficient used. 
       Color Stimulus Function to Reflectance Function 
       [0108]    Divide the color stimulus function by the spectral power distribution of the selected illuminant or source in an inverse to equation (7). 
       Color Stimulus Function to CIE XYZ 
       [0109]    Notice that Eq. (7) calculates the first factor of Eqs. (1-3). Thus the transformation of a color stimulus function to tristimulus values is covered in its entirety by Eqs. (1-4). 
       CIE XYZ to Reflectance Function 
       [0110]    It is possible through Principal Component Analysis to transform from CIE tristimulus values back to reflectance functions even though this involves an expansion in the number of degrees of freedom from three for tristimulus values, e.g., to thirty-one (31) for a spectrum from 400 to 700 nm at 10 nm intervals. The methodology and data required for doing so is given in the literature. See H. S. Fairman and M. H. Brill, The Principal Components of Reflectances,  Color Research and Application,  29, 104-110 (2004). 
         [0111]    Using three principal components, if one has only one set of three tristimulus values known, it is possible to derive a spectrum that will have the exact tristimulus values in the reference illuminant and be not more than about 0.5 CIELAB color-difference units different in a second illuminant. If two sets of tristimulus values are known and used in connection with the first six principal components, the exact tristimulus values are guaranteed in both input illuminant-observer combinations, and the difference in a third illuminant combination may be no more than 0.2ΔE* ab . 
       XYZ to Munsell 
       [0112]    The details of the transformation are again beyond the scope of this document, but the method may be outlined as follows: tristimulus values are converted from the CIE system to an equivalent of the Adams Chromatic Value by the equivalent of Eq. (6). That should put the color space into a large-scale uniform framework. It does somewhat, but it was found then necessary to calculate a least-square best-fit regression equation relating these coordinates to the Munsell notations. This is done at many lightness levels and at many hue angles so that there is a multiplicity of regression coefficients applicable to a given location in the gamut. 
         [0113]    The entirety of the methodology is included in the subroutine XYZ2Munsell which takes tristimulus values as its argument and returns Munsell notation as return values. 
       Munsell to XYZ 
       [0114]    The traditional method of converting Munsell notation to CIE tristimulus values is a table look-up with interpolation of values not found exactly in the tables. Table for such look-up and interpolation are given in ASTM D1535 Practice for the Use of the Munsell System for Color, along with standard methods for their interpolation. 
         [0115]    In order to make the transformation from Munsell to CIE tristimulus values under computer program control, it is suggested that the method described herein for converting from OSA-Ljg to tristimulus values, and given two sections below titled “Ljg to XYZ”, be used. The forward transformation from XYZ to Munsell outlined in the section above would be used in place of the OSA forward transformation. Otherwise, the methodology of the Newton-Raphson method should be identical. 
       XYZ To Ljg 
       [0116]    The tristimulus values involved are those of the CIE 1964 10° observer and CIE Standard Illuminant D65. The usual notation with the subscript  10  has been omitted in both the text and in the equations for clarity, but should be assumed in both. 
         [0117]    Depending whether one is starting with tristimulus notation or chromaticity coordinate notation, some of the following equations will be used as both tristimulus and chromaticity notation will be required somewhere in the OSA equations. 
         [0000]    
       
         
           
             
               
                 
                   x 
                   = 
                   
                     X 
                     
                       X 
                       + 
                       Y 
                       + 
                       Z 
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
             
               
                 
                   y 
                   = 
                   
                     Y 
                     
                       X 
                       + 
                       Y 
                       + 
                       Z 
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
             
               
                 
                   X 
                   = 
                   
                     xY 
                     y 
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
             
               
                 
                   Z 
                   = 
                   
                     
                       
                         ( 
                         
                           1 
                           - 
                           x 
                           - 
                           y 
                         
                         ) 
                       
                        
                       Y 
                     
                     y 
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0118]    The path to transformation of CIE to OSA notation begins with the taking into account the chromatic enhancement of lightness. According to the Sanders-Wyszecki formula, a grey of tristimulus Y 0  appears equally light to a chromatic color with chromaticity coordinates x and y, and a luminous reflectance of Y. 
         [0000]        Y   0 =(4.4934 x   2 +4.3034 y   2 −4.276 xy −1.3744 x −2.5643 y+ 1.8103) Y   (12)
 
         [0119]    The next effect to be considered is the crispening of color difference by backgrounds lighter or darker than the sample under consideration. A modified Semmelroth formula is used to model this effect, and a neutral grey background of 30% luminous reflectance is chosen as the standard background for viewing and calculating in the OSA system. The modified formula used is 
         [0000]      Γ=5.9 [Y   0   1/3 −2/3+0.042( Y   0 −30) 1/3 ].  (13)
 
         [0120]    A few intermediate values are then calculated. The scalar C will play a role similar to the scalar factors 500 and 200 in the CIELAB equation in order to keep the chroma scales uniform with each other over a wide range of lightness values. 
         [0000]    
       
         
           
             
               
                 
                   C 
                   = 
                   
                     
                       Γ 
                       
                         5.9 
                          
                         
                           ( 
                           
                             
                               Y 
                               0 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                             - 
                             
                               2 
                               / 
                               3 
                             
                           
                           ) 
                         
                       
                     
                     = 
                     
                       1 
                       + 
                       
                         0.042 
                          
                         
                           
                             
                               ( 
                               
                                 
                                   Y 
                                   0 
                                 
                                 - 
                                 30 
                               
                               ) 
                             
                             
                               1 
                               / 
                               3 
                             
                           
                           
                             
                               Y 
                               0 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                             - 
                             
                               2 
                               / 
                               3 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The primaries are now transformed to OSA primaries. 
         [0000]        R= 0.799 X+ 0.4194 Y− 0.1648 Z    
         [0000]        G=− 0.4493 X+ 1.3265 Y+ 0.0927 Z    
         [0000]        B=− 0.1149 X+ 0.3394 Y+ 0.717 Z   (15)
 
         [0000]    Finally, the OSA notations themselves are calculated. 
         [0000]    
       
         
           
             
               
                 
                   
                     L 
                     = 
                     
                       
                         ( 
                         
                           Γ 
                           - 
                           14.4 
                         
                         ) 
                       
                       
                         2 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     j 
                     = 
                     
                       C 
                        
                       
                         ( 
                         
                           
                             1.7 
                              
                             
                               R 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                           + 
                           
                             8 
                              
                             
                               G 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                           - 
                           
                             9.7 
                              
                             
                               B 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     g 
                     = 
                     
                       C 
                        
                       
                         ( 
                         
                           
                             
                               - 
                               13.7 
                             
                              
                             
                               R 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                           + 
                           
                             17.7 
                              
                             
                               G 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                           - 
                           
                             4 
                              
                             
                               B 
                               
                                 1 
                                 / 
                                 3 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The quantity L represents the lightness-darkness of the sample and the origin of the scale is, for every specimen, near the 30% luminous reflectance level. Accordingly, darker specimens will have negative L values and lighter specimens will have positive values. The name of scale j (from the French word jaune for yellow) was chosen to avoid confusion with CIE chromaticity coordinate y. Yellows are positive in j value and blues negative. Lastly, the scale g is reversed in direction from the usual so that greens are positive and reds negative in their g value. The order of OSA notation is always L, j, g, although that order is also unconventional. 
       Ljg to XYZ 
       [0121]    For the inverse transformation, define the four functions of Eqs. (17-20) where the mathematical notation ƒ( ) means the entire forward transformation of the paragraphs above from XYZ to Ljg notation. 
         [0000]      ( L   0   ,j   0   ,g   0 )=ƒ( X   i   ,Y   i   ,Z   i )  (17)
 
         [0000]      ( L   1   ,j   1   ,g   1 )=ƒ( X   i   +ΔX,Y   i   ,Z   i )  (18)
 
         [0000]      ( L   2   ,j   2   ,g   2 )=ƒ( X   i   ,Y   i   +Y,Z   i )  (19)
 
         [0000]      ( L   3   ,j   3   ,g   3 )=ƒ( X   i   ,Y   i   ,Z   i   ΔZ )  (20)
 
         [0122]    An iterative algorithm is utilized. The i subscript in the right-hand-side of the above four equations refers to the current value in the i th  iteration. In each iteration the transformation of the current values of CIE notation to Ljg notation are calculated; first, without modification, and then with an increment to X, and then Y and then to Z. This allows the calculation of the influence coefficients, or the influence matrix, needed for implementation of the Newton-Raphson method. 
         [0123]    Two more items are needed to begin the iterative calculations. A good guess as to a nominal value for X 0 , Y 0 , and Z 0  in the opening iteration is required as is a well-chosen value for the size by which the tristimulus values will be incremented by selection of the magnitude of ΔX, ΔY, and ΔZ. The chosen values of both will affect the rate of convergence of the algorithm to the roots of the three simultaneous equations being solved in equation (21). These factors will be discussed in the next section. 
         [0000]    
       
         
           
             
               
                 
                   
                     [ 
                     
                       
                         
                           
                             X 
                             
                               i 
                               + 
                               1 
                             
                           
                         
                       
                       
                         
                           
                             Y 
                             
                               i 
                               + 
                               1 
                             
                           
                         
                       
                       
                         
                           
                             Z 
                             
                               i 
                               + 
                               1 
                             
                           
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       
                         
                           [ 
                           
                             
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         L 
                                         1 
                                       
                                       - 
                                       
                                         L 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     X 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         L 
                                         2 
                                       
                                       - 
                                       
                                         L 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Y 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         L 
                                         3 
                                       
                                       - 
                                       
                                         L 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Z 
                                   
                                 
                               
                             
                             
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         j 
                                         1 
                                       
                                       - 
                                       
                                         j 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     X 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         j 
                                         2 
                                       
                                       - 
                                       
                                         j 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Y 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         j 
                                         3 
                                       
                                       - 
                                       
                                         j 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Z 
                                   
                                 
                               
                             
                             
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         g 
                                         1 
                                       
                                       - 
                                       
                                         g 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     X 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         g 
                                         2 
                                       
                                       - 
                                       
                                         g 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Y 
                                   
                                 
                               
                               
                                 
                                   
                                     ( 
                                     
                                       
                                         g 
                                         3 
                                       
                                       - 
                                       
                                         g 
                                         0 
                                       
                                     
                                     ) 
                                   
                                   
                                     Δ 
                                      
                                     
                                         
                                     
                                      
                                     Z 
                                   
                                 
                               
                             
                           
                           ] 
                         
                         
                           - 
                           1 
                         
                       
                        
                       
                         [ 
                         
                           
                             
                               
                                 L 
                                 - 
                                 
                                   L 
                                   0 
                                 
                               
                             
                           
                           
                             
                               
                                 j 
                                 - 
                                 
                                   j 
                                   0 
                                 
                               
                             
                           
                           
                             
                               
                                 g 
                                 - 
                                 
                                   g 
                                   0 
                                 
                               
                             
                           
                         
                         ] 
                       
                     
                     + 
                     
                       [ 
                       
                         
                           
                             
                               X 
                               i 
                             
                           
                         
                         
                           
                             
                               Y 
                               i 
                             
                           
                         
                         
                           
                             
                               Z 
                               i 
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
           
         
       
     
         [0124]    After each iteration, the calculated values of X i+1 , Y i+1 , and Z i+1  are stored in a variable so that the rate of change in the XYZs may be assessed. When the change is diminishingly small to the user&#39;s need for accuracy the iterations are ended, and the values of XYZ, if put through the forward algorithm, will obtain the starting Ljg values. 
         [0125]    Optionally, a limit to the maximum number of iterations should be imposed in the event that the algorithm should inadvertently fail to converge. 
       Comments and Observations 
       [0126]    The present inventors&#39; experience is that the values X=28.4, Y=30.0, and Z=32.2 are good starting values to be submitted to the first iteration. Those values are the tristimulus values of the central neutral grey of the OSA sample collection Ljg=(0,0,0), so would seem to offer the least difference in color with any random sample being converted. 
         [0127]    The value recommended for ΔX=ΔY=ΔZ is a value of 0.5. This increment should be chosen so as to coincide with the average difference by which tristimulus values are converging in each iteration. 
         [0128]    In these calculations, it is preferred to slow the rate of convergence at the expense of many more iterations. Doing so will incur the cost of more inversions of the influence coefficient matrix which must be inverted once in each iteration. The incremental term (the right-hand-side of Eq. (21) before the plus sign) is divided by five plus the cube root of the iteration number before adding it to the tristimulus values from the previous iteration. This was done for two purposes. First, to slow the convergence so that, as the roots of the equations are approached, there is never an occasion where one, or more, tristimulus value overshoots the root. This can lead to returning to the exact same previous set of tristimulus values on the next iteration. That may put one in a never-exiting loop going back and forth over the roots forever. Secondly, the introduction of the small, but ever-changing, term the cube root of the iteration number prevents that possibility absolutely. 
         [0129]    A good exit point exists when the rate of change of each of the three variables being sought has reached less than 0.0001 per iteration. One expects this to take about 150 to 200 iterations in a typical calculation with normal behavior. An upper limit of 600 iterations can be used before an abortive exit from the routine. Both of these may seem high compared to the number utilized in the other iterative process for computerized color matching with which the present inventors are most familiar. However, with the speed of modern day computers, it does not appear to slow the program down no matter how many colors are being processed, and the gain is more than worth the effort. 
         [0130]    Users should be cautioned that the OSA equations themselves are only effective within the producible surface color gamut, and deteriorate rapidly from uniformity of color difference outside this gamut. In some operations that deal with the entire producible gamut, it is not easy to know whether one in or out of gamut. One should, however, make a determination as to the position of any color with respect to this gamut before submitting the color to conversion in either direction. 
       Ljg to MHK 
       [0131]    The transformation of OSA values to the uniform MHK color coordinate system takes place through the following transforms: 
         [0000]        M= 7.2 L+ 54  (22)
 
         [0000]        H=− 7.2 g   (23)
 
         [0000]        K= 7.2 j   (24)
 
       MHK to HuVC 
       [0132]    The transformation of Cartesian coordinates (these equations would work as well for L*a* and b*) to hue, value, and chroma is accomplished by the following steps. 
         [0133]    Assign the value of π. 
         [0000]      π=4* Arctan(1)  (25)
 
         [0134]    If K&lt; &gt;0 Then 
         [0000]        Hu =π−Arctan( H/K )−π/2*Sign( K ))  (26)
 
         [0000]      Else 
         [0000]        Hu=π/ 2−π/2*Sign( H )
 
         [0000]      End If 
         [0000]        V=M   (27)
 
         [0000]        C =( H*H+K*K ) 1/2   (28)
 
         [0135]    The function Sign ( ) is a function built-in to most computer languages which return a minus one when the argument is negative, a zero when the argument is zero, and the value of positive one when the argument is positive. 
         [0136]    These same equations will be given in a slightly different format in a section describing LAB to LCh coordinates appearing below. 

 
       MHK to UVW 
       [0137]    To convert MHK to UVW follow the following sequence of transformations. 
         [0000]    1) Dimension dummy variable XY(2) as placeholder and define Pi. 
         [0000]      Dim  XY (2) 
         [0000]        PI= 4 *Atn (1)  (29)
 
         [0000]    2) Store M and H in a dummy variable XY(2) for arguments of Rect2Pol. 
         [0000]        XY (0)= M    
         [0000]        XY (1)= H   (30
 
         [0000]    Call routine to convert Cartesian coordinates to polar coordinates (Rect2Pol) 
         [0000]      Rect2Pol  XY ( ) ,UV ( ) 
         [0000]    3) Save value of angle UV(1) in V1 and change variables for a second rectangular to polar in another plane 
         [0000]        V 1 =UV( 1) 
         [0000]        XY (0)= UV (0) 
         [0000]        XY (1)= MHK (0)  (31)
 
         [0000]    Call routine a second time to convert rectangular in another plane to polar. 
         [0000]      Rect2Pol  XY ( ) ,UV ( ) 
         [0000]    4) Save angle in U and test angle UV(1) for being greater than right angle; if so, correct. 
         [0000]        U=UVW (0) 
         [0000]      If  UVW (1)&gt; PI/ 2 then 
         [0000]        UV (1)= UV (1)−2 *PI   (32)
 
         [0000]      End if 
         [0000]        W=PI/ 2 −UV (1) 
         [0000]        V=V 1 
       UVW to MHK 
       [0138]    To transform back from UVW to MHK use: 
         [0000]    
       
      
       M=U  
      
     
         [0000]        H=U * Cos( V ) 
         [0000]        K=U * Sin( V )  (33)
 
       HuVC to MHK 
       [0139]    The transformations from HuVC to MHK is: 
         [0000]    
       
      
       M=V  
      
     
         [0000]        H=C  sin( Hu ) 
         [0000]        K=C  cos( Hu )  (34)
 
         [0000]    These equations are solved by the same subroutine used to convert LCh notation to L*a*b* notation with arguments sent to them in different notational format. 
       MHK to Ljg 
       [0140]    The inverse transformation of MHK back to Ljg is accomplished by the following: 
         [0000]        L= 0.1388889( M− 54)  (35)
 
         [0000]        j= 0.138889 K   (36)
 
         [0000]        g=− 0.1388889 H   (37)
 
       XYZ to Lab 
       [0141]    The CIE proposed in 1976 the following transformation of tristimulus values to what was called the CIELAB System for Colorimetry. A definition of the transformation that has been rearranged for optimal implementation on a modern computer follows: 
         [0000]    
       
         
           
             
               
                 
                   Limit 
                   = 
                   
                     
                       ( 
                       
                         6 
                         29 
                       
                       ) 
                     
                     3 
                   
                 
               
               
                 
                   ( 
                   38 
                   ) 
                 
               
             
           
         
       
     
         [0142]    If X/Xn&lt;=Limit then 
         [0000]    
       
         
           
             FuncX 
             = 
             
               
                 
                   ( 
                   
                     841 
                     108 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     X 
                     
                       X 
                       n 
                     
                   
                   ) 
                 
               
               + 
               
                 ( 
                 
                   4 
                   29 
                 
                 ) 
               
             
           
         
       
     
         [0143]    Else 
         [0000]    
       
         
           
             FuncX 
             = 
             
               
                 ( 
                 
                   X 
                   
                     X 
                     n 
                   
                 
                 ) 
               
               3 
             
           
         
       
     
         [0144]    End if 
         [0145]    If Y/Yn&lt;=Limit then 
         [0000]    
       
         
           
             FuncY 
             = 
             
               
                 
                   ( 
                   
                     841 
                     108 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     Y 
                     
                       Y 
                       n 
                     
                   
                   ) 
                 
               
               + 
               
                 ( 
                 
                   4 
                   29 
                 
                 ) 
               
             
           
         
       
     
         [0146]    Else 
         [0000]    
       
         
           
             
               
                 
                   FuncY 
                   = 
                   
                     
                       ( 
                       
                         Y 
                         
                           Y 
                           n 
                         
                       
                       ) 
                     
                     3 
                   
                 
               
               
                 
                   ( 
                   39 
                   ) 
                 
               
             
           
         
       
     
         [0147]    End if 
         [0148]    If Z/Zn&lt;=Limit then 
         [0000]    
       
         
           
             FuncZ 
             = 
             
               
                 
                   ( 
                   
                     841 
                     108 
                   
                   ) 
                 
                  
                 
                   ( 
                   
                     Z 
                     
                       Z 
                       n 
                     
                   
                   ) 
                 
               
               + 
               
                 ( 
                 
                   4 
                   29 
                 
                 ) 
               
             
           
         
       
     
         [0149]    Else 
         [0000]    
       
         
           
             FuncZ 
             = 
             
               
                 ( 
                 
                   Z 
                   
                     Z 
                     n 
                   
                 
                 ) 
               
               3 
             
           
         
       
     
         [0150]    End if 
         [0000]        L*= 116Func Y− 16  (40)
 
         [0000]        a*= 500(Func X −Func Y )  (41)
 
         [0000]        b*= 200(Func Y −Func Z )  (42)
 
         [0151]    These are the CIELAB coordinates L*, a*, b*. 
       Lab to XYZ 
       [0152]    CIELAB values may be transformed back to tristimulus values by the following equations: 
         [0000]        X=Xn *Exp(Log(( L*+ 16)/116+ a */500)*3) 
         [0000]        Y=Yn *Exp(Log(( L*+ 16)/116)*3) 
         [0000]        Z=Zn *Exp(Log(( L*+ 16)/116− b*/ 200)*3).  (43)
 
         [0000]    The logarithms are natural logs and Exp stands for exponentiation. 
       Lab to LCh 
       [0153]    CIELAB coordinates may be usefully transformed to cylindrical coordinates L*, C*, and h which stand for lightness, chroma, and hue angle, respectively. 
         [0000]        L*=L*   (44)
 
         [0000]        C* =[( a *) 2 +( b *) 2 ] 1/2   (45)
 
         [0154]    The value of h in degrees may be computed from the following pseudocode: 
         [0155]    if b*=0 then 
         [0000]        h= 90−90sign( a* )
 
         [0000]      else 
         [0000]        h= 180−(180/π)tan −1 ( a*/b* )−90sign( b *)
 
         [0156]    end if 
         [0000]    where the function sign returns −1 for negative values of the argument, zero for zero value of the argument, and plus one for positive values. Such a function is built-in to almost all computer languages. π has a value of approximately 3.1415928. It may be useful to predefine the value of π in computer programs by 
         [0000]      π=4 tan −1 (1)  (46)
 
         [0000]    which stores the value of π to machine precision. 
         [0157]    The coordinate h, hue angle in degrees, is not to be confused with the color-difference component ΔH* which is the residual color-difference in the hue-change direction when the values of ΔE*, ΔL*, and ΔC* are known 
         [0000]      Δ H *=(Δ E*−ΔL*−ΔC* ) 1/2   (47)
 
         [0000]    There is no such thing as H* as a stand-alone parameter. Only ΔH* is defined. 
       LCh to Lab 
       [0158]    To get back to CIELAB values from LCh use the following: 
         [0000]        L*=L*   (48)
 
         [0000]        a*=C * sin( h )  (49)
 
         [0000]        b*=C * cos( h )  (50)
 
       RGB sRGB  Values to CIE XYZ Values 
       [0159]    CIE Standard Observer Used: 1931 two degree CIE standard observer
 
CIE Standard Illuminant Used: CIE standard illuminant D65
 
         [0000]    
       
         
           
             
               [ 
               
                 
                   
                     
                       R 
                       sRGB 
                     
                   
                 
                 
                   
                     
                       G 
                       sRGB 
                     
                   
                 
                 
                   
                     
                       B 
                       sRGB 
                     
                   
                 
               
               ] 
             
             = 
             
               
                 [ 
                 
                   
                     
                       
                         3 
                         , 
                         2406 
                       
                     
                     
                       
                         
                           - 
                           1 
                         
                         , 
                         5372 
                       
                     
                     
                       
                         
                           - 
                           0 
                         
                         , 
                         4986 
                       
                     
                   
                   
                     
                       
                         
                           - 
                           0 
                         
                         , 
                         9689 
                       
                     
                     
                       
                         1 
                         , 
                         8758 
                       
                     
                     
                       
                         0 
                         , 
                         0415 
                       
                     
                   
                   
                     
                       
                         0 
                         , 
                         0557 
                       
                     
                     
                       
                         
                           - 
                           0 
                         
                         , 
                         2040 
                       
                     
                     
                       
                         1 
                         , 
                         0570 
                       
                     
                   
                 
                 ] 
               
                
               
                 [ 
                 
                   
                     
                       X 
                     
                   
                   
                     
                       Y 
                     
                   
                   
                     
                       Z 
                     
                   
                 
                 ] 
               
             
           
         
       
     
         [0000]    Where R sRGB , G sRGB , B sRGB  are functions of the corresponding 8 bit RGB values and are defined in the International Electrotechnical Commission document IEC/4WD 61966-2-1 “Colour Measurement and Management in Multimedia Systems and Equipment—Part 2-1: Default RGB Colour Space—sRGB. 
       CIE XYZ Values to RGB sRGB  Values 
       [0160]    CIE Standard Observer Used: 1931 two degree CIE standard observer
 
CIE Standard Illuminant Used: CIE standard illuminant D65
 
         [0000]    
       
         
           
             
               [ 
               
                 
                   
                     X 
                   
                 
                 
                   
                     Y 
                   
                 
                 
                   
                     Z 
                   
                 
               
               ] 
             
             = 
             
               
                 [ 
                 
                   
                     
                       
                         0 
                         , 
                         4124 
                       
                     
                     
                       
                         0 
                         , 
                         3576 
                       
                     
                     
                       
                         0 
                         , 
                         1805 
                       
                     
                   
                   
                     
                       
                         0 
                         , 
                         2126 
                       
                     
                     
                       
                         0 
                         , 
                         7152 
                       
                     
                     
                       
                         0 
                         , 
                         0722 
                       
                     
                   
                   
                     
                       
                         0 
                         , 
                         0193 
                       
                     
                     
                       
                         0 
                         , 
                         1192 
                       
                     
                     
                       
                         0 
                         , 
                         9505 
                       
                     
                   
                 
                 ] 
               
                
               
                 [ 
                 
                   
                     
                       
                         R 
                         sRGB 
                       
                     
                   
                   
                     
                       
                         G 
                         sRGB 
                       
                     
                   
                   
                     
                       
                         B 
                         sRGB 
                       
                     
                   
                 
                 ]