Key:ref:colour_tx

From OpenStreetMap Wiki
Jump to navigation Jump to search
ref:colour_tx
Description
The colour of the text of references for highways and public transport routes. Show/edit corresponding data item.
Group: transport
Used on these elements
should not be used on nodesmay be used on waysshould not be used on areasmay be used on relations
Status: de facto

ref:colour_tx=* describes the color of the text of the reference for highways and public transport lines and networks.

Usage

The key ref:colour_tx=* is used to define the colour of the text displayed inside a reference shield. It is used in combination with ref:colour=* (which defines the background colour of the same shield).

The key ref:colour_tx=* is used to ensure the map accurately represents the official operator's branding. While many editors (like iD) automatically choose black or white text based on background contrast, this manual tag is necessary in several cases:

  • Corporate pairs: When a network is defined by two specific corporate colours that must always go together.
  • Official identity over legibility: When the operator uses a specific combination that differs from automated defaults.

While traditionally used in the road network of Spain, it is also used for public transit networks to ensure that brand-specific route labels are rendered with the correct contrast and corporate identity.

Values

Values are typically expressed as:

  • Hexadecimal color codes: e.g., #FFFFFF (White) or #000000 (Black).
  • Standard CSS color names: e.g., white, black.

Examples

Network ref:colour ref:colour_tx Appearance
Autobuses de España (bus.es) #0FDDC4 #003A47 Dark, cool, blue-green tone text on vibrant turquoise shield.
L24 Transporte Urbano Comarcal (Pamplona) #fcd856 white white text on yellow shield, while automated text colour is black.