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
[edit]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 → Open then open your image.
Vector images
[edit]This section applies if the name of your file ends in .svg.
Ungroup the layers
[edit]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
[edit]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 → 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
[edit]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.
![](http://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Tutorial_changer_la_couleur_d%27un_pays_2.png/600px-Tutorial_changer_la_couleur_d%27un_pays_2.png)
Save
[edit]Select File → 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
[edit]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.
- 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.)
- Press Shift+F7 or click on the small pot marked Fill bounded areas (see 2 on screen), and click on your zone.
- Then click on the small brush in top (see 3 on screen, or shift+control+F),
- then on the Flat color button (see 4 on screen),
- and finally adjust your color.
![](http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Tutorial_changer_la_couleur_d%27un_pays.png/600px-Tutorial_changer_la_couleur_d%27un_pays.png)
Select File → 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.
Sources
[edit]![]() | This page contains a translation of Wikipédia:Atelier graphique/Didacticiels_cartographiques/Didacticiel_pour_modifier_la_couleur_d'un_pays from fr.wikipedia. |