Template:OSM Location map/color/doc

Usage
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  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:

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:-

Full table of options
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  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' #