Removing unused colors from an image before exporting or saving makes its file size smaller.

NOTE

This option is available only for GIFs and other 8-bit graphic file formats.

To remove unused colors:

To include all colors in the palette, including colors that are not present in the exported or saved image: