I am trying the limit the number of colors used in my Adobe Illustrator file. I’ve created 10 swatches with specific colors that I’d like to use. I want all the colors in my illustration to change to be one of these 10 colors. One of my 10 colors should be automatically assigned based on the color value of the original color to match the original color as close as possible. (Similar to how “adaptive” color setting works when saving a GIF file) Thanks for your help!
Image trace offers the ability to limit colors to a color group.
Simply place all your predetermined swatches into a single color group in the Swatch panel.
Note I've got 2 (default) color groups here.
Then using the Image Trace Panel simply set the Palette to
Document Library, and set Colors to your defined color group.
This makes image trace use the only the colors in your color group for the tracing. It may result in odd color applications though. I mean if you're tracing a red image and there's no red swatch.... it's hit or miss as to what color would be assigned to "red".
A better option is to simply trace the image then use Recolor Artwork to limit the total colors....
This question may help with that: How to convert document Illustrator file to only one color? (eg. Green)
First, put all of the swatches that you want to use in one color group. Then, select everything on your artboard (STRG + A, but make sure no layers are locked or invisible). Chose edit -> Edit Colors -> Recolor Artwork. On the right side of the recoloring options panel, click on the newly created color group that contains your colors. If needed, you can set the amount of colors used to recolor your artwork. In the preview window, you can see all of the current colors, and to which color from your new color group they will be changed. If needed, you can also change this manually using drag-and-drop.