Introduction
Sampling colors from images and photos can be sometimes great timesaver when trying to get the right color – and it is easy when working in Photoshop or Illustrator. But what about 3D applications? Do you need to import an image into your scene as a texture and then use application’s color picker (eyedropper) to choose the color from that image and apply it to your object? Or should you manually type in the RGB value of the color you already sampled in Photoshop? There is an easier way to do this. In Softimage XSI there is a neat trick to sample the color from an external image: just resize the XSI window so that the image you wish to sample the color shows in your favorite image browser, and with the eyedropper tool just click inside the XSI window and drag the mouse outside until you get to the color in your image that you like and wish to use. This color will be chosen, even though you dragged eyedropper outside XSI window. In Maya, unfortunately, this doesn’t work. So what is the alternative? Importing Photoshop color swatches, of course!
Creating Color Tables and Swatches in Photoshop
Most likely you have found yourself in a state of adoring the color composition of a photograph, design, illustration – or even a shot in the motion pictures. And if you never managed to get those beutiful colors into your color swatch palette, read on…
Creating swatches in Photoshop based on colors of an image involves a couple of steps. First step is, of course, picking an image. Since I’m a great admirer of Christopher Doyle’s cinematography, I picked a still from Wong Kar-Wai’s Fallen Angels, one of my most favorite movies:

Ain’t the colors just wonderful? We have blue, red and green hues, but they are not very saturated. Anyhow, lets generate a color table first. Open an image in Photoshop, and go to Image > Mode > Indexed Color… Adjust settings switching Preview checkbox on and off to see that you are left with all the colors you wish to keep. Perceptual option creates color table by giving priority to colors to which human eye is most sensitive; selective option is similar to perceptual, except that it gives priority to broader areas of color; adaptive option creates color palette sampling the colors that appear most commonly in an image. Here are the settings that worked for me:

Click OK when you are done. Now, to view the color table, go to Image > Mode > Color Table… This option will be unavailable until you convert image to Indexed Color. The color table should look like this:

Save this color table. It will be saved in Adobe Color Table (.act) format. However, when you import this file into Maya, it will most likely crash. We need a different file type to work with in Maya – .aco, or the swatch file. To save our color table in this format, open the Swatches palette and from its menu choose Replace Swatches…, switch the file format to .act and locate previously saved Color Table file. The reason why you shouldn’t choose Load Swatches… is because that command will append your color table to whichever color table is currently open. Now you should see your color table inside the swatches palette and you can use it for your Photoshop work. Again, from swatches palette menu choose Save Swatches… and give your swatches a meaningful name, click save, which will save color swatch (.aco) file, and you are done with Photoshop.
Bringing the Color Swatches into Maya
Our next step is to bring the saved swatches into Maya. As you suppose, we will do it through Color Chooser, which opens whenever you click to change the color value of any of the material’s attribute. Scroll down the Color Chooser window and open the Palette tab. Click Open and locate your saved .aco file. And voila! We have our swatches now in Maya, ready to be used in the project. Here is what the Color Chooser with loaded swatches file should look like:

Keep in mind that this method of picking colors will be most useful in situations when you are in control of colors directly, or, in another words, the lights in your scene will not signifficantly affect and modify the colors you pick for your objects, and that is if you are going for cartoonish style shading (see my tutorial about toon shading in Maya for more info).
And that’s it! Feel free to post a comment if there’s anything you would like to have explained in more detail, or if you have any questions, or tutorial requests. Thanks for stopping by.
natai
December 8, 2011
hi very interesting , i did all that you tell in your tutorial but the problem is i have a palette with 495 colors and maya doesn,t import the total amount of colors only some i think 250 swachtes more or less then my question is:is there any possibility to import a color palette with the extension .aco without problems with 500 colors or more to maya?
greetings in advance and thanks a lot
natai