1.26. Saving and Reusing Custom Colors

Problem

You want to save or reuse a custom color.

Solution

Add the color to the Color Swatches panel.

Discussion

If you plan to reuse a color that you’ve mixed, you should save it as a swatch. As a swatch, it will be available in the color pop ups in the Tools panel and Property inspector, as well as the Color Swatches panel.

To add a color to the Color Swatches panel, follow these steps:

  1. Mix the color and set it as the active stroke or fill color in the Colors panel.

  2. Open the Color Swatches panel (Window → Color Swatches).

  3. If necessary, resize the window so that a gray area is visible beneath the existing swatches.

  4. Click in that gray area. The cursor becomes a paint bucket, to indicate that you are adding a new color swatch.

Another way to add a color swatch is to choose Add Swatch from the Color Mixer panel’s Options menu.

To remove a color swatch, hold down the Ctrl (Windows) or Command (Macintosh) key and click the swatch. The cursor becomes a pair of scissors to indicate that you are removing a color swatch.

Warning

Undo does not work when adding and removing colors from the Color Swatches panel.

You can restore the Color Swatches panel to the factory default—Web 216 plus a handful of premixed gradients—by choosing Load Default Colors from the Color Swatch panel’s Options menu.

You can remove all colors from the Color Swatches panel, except black and white. Removing colors is useful when you are designing a custom color palette for a project. Choose Clear Colors from the Color Swatches Options menu.

The color swatches you store in the Color Swatches panel are stored along with the Flash .fla file. Swatches will not automatically be available to any other files. However, you can save custom color palettes—indeed, this step is highly recommended when working on projects that span multiple files. To save a color palette, choose Save Colors from the Options menu. A standard Save dialog box appears, enabling you to save the color palette in one of two formats:

Flash Color Set (.clr)

The default, this file type enables you to store all types of swatches, including solid colors and gradients. Only Flash can import this type of file.

Color Table (.act)

This file type enables you to store only solid colors. Its benefit is that its colors can be imported to numerous other programs, such as Macromedia Fireworks and Dreamweaver.

You can load a Flash color palette saved in either format by choosing Add Colors or Replace Colors from the Color Swatches panel Options menu. Both bring up an Open dialog, enabling you to browse to and import a color palette file. Supported color palette file types include Flash .clr, .act, and .gif. The difference between Add Colors and Replace Colors is that Add Colors appends the colors in the palette to the existing collection of swatches, and Replace Colors clears the existing swatches before importing the new swatches.

See Also

Recipe 1.25

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.