2.4. Colormap Dialog
| 2. Вікна, які пов'язано зі структурою зображення |

### 2.4. Colormap Dialog

Рисунок 15.11. Індексоване зображення з 6 кольорами та його вікно мапи кольорів

The Colormap (Indexed Palette is a better name) dialog allows you to edit the colormap of an indexed image. (If the mode of the active image is RGB or Grayscale instead of Indexed, the dialog is empty and unusable.)

#### 2.4.1. Активація вікна

This dialog is a dockable dialog; see the section Розділ 2.3, «Dialogs and Docking» for help on manipulating it.

Доступ до вікна можна отримати так:

- за допомогою головного меню: Вікна → Діалоги з підтримкою прикріплення → Мапа кольорів;

- за допомогою меню вкладки у будь-якому швартованому вікні шляхом натискання кнопки меню вкладки і вибору пункту Додати вкладку → Мапи кольорів.

In the Windows menu, there is a list of detached windows which exists only if at least one dialog remains open. In this case, you can raise the «Colormap» dialog from the main menu: Windows → Colormap.

#### 2.4.2. Мапи кольорів та індексовані зображення

In an Indexed image, instead of being assigned a color directly (as happens in RGB and Grayscale images), colors are assigned to pixels by an indirect method, using a look-up table called a colormap.

To determine the color that should be shown for that pixel, GIMP looks up the index in the image's colormap. Each indexed image has its own private colormap. In GIMP, the maximum number of entries in a colormap is 256. For a maximum-sized colormap, each index from 0 to 255 is assigned an arbitrary RGB color. There are no rules restricting the colors that can be assigned to an index or the order they appear in: any index can be assigned any color.

It is important to realize that the colors in the colormap are the only colors available for an indexed image (that is, unless you add new colors to the colormap). This has a major effect on many GIMP operations: for example, in a pattern fill, GIMP will usually not be able to find exactly the right colors in the colormap, so it will approximate them by using the nearest color available. This is sometimes referred to as Quantization. If the colormap is too limited or poorly chosen, this can easily produce very poor image quality.

The Colormap dialog allows you to alter the colormap for an image, either by creating new entries, or by changing the colors for the existing entries. If you change the color associated with a given index, you will see the changes reflected throughout the image, as a color shift for all pixels that are assigned that index. The entries are numbered with 0 in the upper left corner, 1 to its right, etc.

#### 2.4.3. Користування діалоговим вікном мапи кольорів

Ось дії, які ви можете виконати за допомогою цього діалогового вікна:

Клацання на записі кольору

  This sets GIMP's foreground color to the color you click on, as shown in the Toolbox color area. As a result, this color will be used for the next painting operation you do.

Ctrl-клацання на записі кольору

  This sets GIMP's background color to the color you Ctrl-click on, as shown in the Toolbox color area.

Подвійне клацання на записі кольору

  This sets GIMP's foreground color to the color you click on, and also brings up a Color Editor that allows you to change that colormap entry to a new color.

Номер кольору

  Ви можете вибрати інший запис мапи кольорів, ввівши тут індекс або натиснувши кнопку перемикання праворуч.

Позначення HTML

  This area shows a hex-code representation (such as is used in HTML) for the color assigned to the currently selected colormap entry. You can edit the color here, instead of using a Color Editor, if you want to. See HTML notation

Кнопки

  The button bar at the bottom offers the following functionality:

  Змінити колір

    This button (in the lower left corner of the dialog) brings up a Color Editor that allows you to change the color for the currently selected colormap entry. The effect is similar to double-clicking on the entry, except that it does not set GIMP's foreground color.

  Delete color

    This button (in the lower left corner of the dialog) allows you to delete a color which is not used in the image from the colormap.

  Додати колір

    This button (at the bottom of the dialog) allows you to add new colors to the colormap. If you click on the button, the current foreground color, as shown in the Toolbox, will be added to the end of the colormap. If instead you hold down Ctrl and click, the background color from the Toolbox will be added.

    | Примітка
    The colormap can not contain more than 256 entries. If it already has 256 entries, trying to add a color will have no effect.

  Вибрати всі пікселі цього кольору

    This button allows you to select all pixels with this color. To add to the selection, use Shift buttonclick, to subtract use Ctrl buttonclick, and to intersect with the current selection use Shift+Ctrl buttonclick.

| Підказка
If you make a mistake, you can undo it by focusing the pointer in the image whose colormap you have changed, and then pressing Ctrl+Z or choosing Edit → Undo in the main menu.

| Примітка
If you paint an indexed image with a color which is not in the Colormap, GIMP will use the most similar color of the Colormap.

#### 2.4.4. The Colormap context menu

Клацання правою на пункті кольору на мапі кольорів позначає цей колір і відкриває контекстне меню із такими пунктами:

Змінити колір

  Ця команда відкриває засіб вибору кольору, за допомогою якого ви можете змінити колір.

Додати колір з основного

  This command is enabled only if the indexed palette contains less than 256 colors. The background color of the Toolbox is appended to the color map.

Додати колір з тла

  This command is enabled only if the indexed palette contains less than 256 colors. The background color of the Toolbox is appended to the color list.

Вибрати цей колір

  This selects all pixels in the image which have the chosen palette index.

Додати до позначеного

  Adds all pixels in the image which have the chosen palette index to the selection.

Відняти від позначеного

  Subtracts all pixels in the image which have the chosen palette index from the selection.

Intersect with Selection

  Intersect all pixels in the image with the chosen palette index with the current selection.

Перебудувати мапу кольорів

  Rearrange Colormap: This command is described in Розділ 8.34, «Rearrange Colormap».

2.3. Paths Dialog |  | 2.5. Вікно «Гістограма»

Report a bug in GIMP Створіть звіт щодо помилки у документації