Wikipedia:Graphics Lab/Resources/Change the colors of a country

This tutorial explains how to change the color of a country (or of any zone) on an existing map. For example, to color a country on a map of the world to show its membership of an organization, and many more.

Introduction
This operation is accessible to all Wikipedians (simple level of wikicartography). Duration for an absolute beginner: 15 min. Duration after training: 2 min. You can find charts of the world in these two categories: Category:Maps of the world and Category:Blank maps of the world for historical use for historical maps. The following maps are likely to be very useful, zones being independently colorable:

The simplest way to modify your map is to use Inkscape, whatever your image type (bitmap or svg). Inkscape is free software and very easy to install/uninstall (non-invasive software) and to use (with a tutorial). Inkscape is available here (official site). Click on Download now at the top right of your window, then run the file. Install Inkscape, following the instructions of the software.

Note: in Inkscape, you can always return to the front using the arrows at the top left of your window. In addition, do not hesitate to consult the Graphic Lab if you have difficulties.

Open Inkscape. Select File &rarr; Open then open your image.

Vector images
This section applies if the name of your file ends in .svg.

Ungroup the layers
Unlock the layers, preferably only those that contain the zones to color: click on the name of your layer in the pull-down menu, then on the small lock at the bottom left (see screen print, stage 1).

Divide the zones
Select your zone by clicking on it. If, whilst trying to select it, you select in fact a much larger unit, that is because the zones are grouped. Ungroup them by clicking as often as necessary on the Ungroup selected groups button (see 2 on screen), then click to select your zone. If that does not work, this may be because the zones are combined. After selecting them, have made Path &rarr; Break apart or press shift+control+K. Then ungroup the zones (click on the Ungroup selected groups button), then click to select your zone. If your zone is still not isolated, use the method in the following chapter (Bitmap images), which is more work but always succeeds.

Change the color of your zone
After having selected your zone, click on the small brush button (Edit objects' colors,…, see 3 on screen). In the window that appears, click on the Flat color button (see 4 on screen). Then change the color with the cursor or enter the RGBA code of a color. (A=alpha, normally 255=opaque). Note: you can select several zones at the same time, and change their color at the same time, by clicking whilst pressing the shift key.



Save
Select File &rarr; Save and import your file to Commons with the extension .svg, not forgetting to change the name of the file if necessary and to mention the source.

Bitmap images
This section applies if the name of your file ends in .jpg, .jpeg, .png, or .gif (.bmp are not accepted by Wikimedia).

Note that some of these files are in .svg format (see the documentation of your image on Commons). This method also works for .svg but, although very rapid, it is not recommended because the result is not always very clean. You opened your image with Inkscape.
 * 1) Zoom in to the zone of interest (F7, or small magnifying glass: see 1 on screen). (Very important: zoom as much as possible, but always keep the whole zone visible. The filling is by pixels according to the precision shown on your screen, and not the real precision.)
 * 2) Press Shift+F7 or click on the small pot marked Fill bounded areas (see 2 on screen), and click on your zone.
 * 3) Then click on the small brush in top (see 3 on screen, or shift+control+F),
 * 4) then on the Flat color button (see 4 on screen),
 * 5) and finally adjust your color.



Select File &rarr; Export bitmap using format .png, and import your file on Commons with the extension .png, not forgetting to change the name of the file if necessary and to mention the source.