This is an old revision of the document!


Back

Color and RGB attributes

The preferred method of defining the color to use for drawing is the color attribute.

The color codes used shall be defined in the mapcolors.xml file in the root folder of the FIR definition.

  <lines color="airspace_low">
      <point lon="E0042957" lat="N0511059"/>
      <point lon="E0044324" lat="N0510755"/>
  </lines>

There are two alternative ways to define the color used:

  1. Using webcolors in hexadecimal #RRGGBB format
  2. Using R,G,B values

When the string value of the color attribute starts with a # then it shall be defined as #RRGGBB

  <lines color="#FF9922">
      <point lon="E0042957" lat="N0511059"/>
      <point lon="E0044324" lat="N0510755"/>
  </lines>

Otherwise you can use R,G,B values like:

  <lines r="65" g="112" b="40">
      <point lon="E0042957" lat="N0511059"/>
      <point lon="E0044324" lat="N0510755"/>
  </lines>

We strongly suggest to use the color attribute to keep everything as user friendly as possible.

The color attribute has priority over the the rgb attributes.