222211

{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Використання ред.

This template provides a standardised colour/Color pallete for use with OSM Location Maps. The following color descriptors (not following any particular external precedent) can be used within OSM maps to provide a consistent and sympathetic color scheme for text labels and shape colors, using pastel shades that fit well alongside the existing map colors:-

Usage by directly calling the template (normally not needed except by another template) requires a single unnamed parameter, which should a colour from the list below, eg
{{OSM Location map/color|soft grey}}
which will generate the appropriate hex value. It will return unchanged any other text, such as a standard html colour description or hex code.

Usage of the color scheme when devising OSM Location maps ред.

The descriptions can be used within the {{OSM Location map}} template wherever a color can be specified (The template itself is not needed). For example:

|label-color1 = soft grey
|shape-color1 = hard red
|label-color8 = black

Map label colors often need to be adapted to meet the needs of the individual map, but by sticking to the 'soft' colors for most map labels the muted map appearance is retained. The 'hard' colors should only used to indicate the feature that is the particular subject of the map. (The 'dark' option is for where the background requires a shift to the stronger colors).

Under normal usage, the following label color scheme should be followed:-

soft grey Settlements = soft grey (Subject of the map can be hard grey and larger label-size)
soft blue Rivers, lakes, sea areas etc = soft blue (Works well on top of OSM blue areas)
soft green Parkland, national/regional parks, gardens, forests etc = soft green works well on top of OSM green areas. (hard green may be desirable in forests or for the subject of the map)
hard red Individual sites = hard red - especially if no other labels are applied and the site is indicated by a red pog (nb. There was concern that this looked like a red wiki-no-link, so is not now recommended. Default is hard grey.)

Full table of options ред.

Colors recommended for OSM Maps.

These have a more pastel shade than the standard colors, so blend well the map backgrounds (pale varients are only for panel-backgrounds, etc)

pale red #FCC6C0 soft red #DB3123 hard red #AA1205 dark red #7A0101
pele green #D2F0E5 soft green #81AF81 hard green #538253 dark green #165916
pale blue #D6E1EC soft blue #77A1CB hard blue #5581A9 dark blue #5581A9
pale grey #E8E8D6 soft grey #AAAA88 hard grey #777755 dark grey #333322
pale brown #FAF6ED soft brown #CCB56C hard brown #AD7F14 dark brown #8E5913
Standard html colors.

These tend to look rather harsh on the OSM maps but are retained for compatibility

White #FFFFFF Silver #C0C0C0 Gray #808080
Red #FF0000 Maroon #800000 Yellow #FFFF00
Olive #808000 Lime #00FF00 Green #008000
Aqua #00FFFF Teal #008080 Blue #0000FF
Navy #000080 Fuchsia #FF00FF Purple #800080
Black #000000 Orange #FFA500 transparent #FFFFFF00

Also available is 'transparent' (useful to leave an open hole in a shape) and 'background1' (#F9F5E7), which matches the most common map background. Useful for blanking out a bit of map using '█' character, to make a plainer background for putting a second label over the top.

50% Opacity: Any of the named colours has an option to make it only 50% opaque. eg | label-color3 = hard red 50% will produce a translucent red, in which the background map also has some visibiliy. (nb only works with 50%. See below for how to get further gradations)

It is also possible to specify any HTML Hex color using the six-figure hex-code, eg #AAAAAA, but sticking to defaults maintains consistency between pages

A second parameter of a number between 0 and 100 optionally specifies opacity. Unexpectedly 0 and 100 both indicate 100%, so 1 will be the least opaque value, getting progressively denser up to 100%. Alternatively, full control over the opacity of any color can be made by adding two further hex digits to any six-hexadecimal-digit colour. The last two will create an opacity of 0% (00) through to 100% (FF)

If no valid color is specified the color will be set to a default of 'hard grey'

Colors other than the named ones above can only be specified by using hex codes. Any other color names return as 'hard grey' #222211