Skip to content

Dialog Color

Direct Input of Color

After clicking the colored button select the desired color from the WINDOWS palette by clicking on it and confirm with OK. In this case the coloring of this object does not depend on a condition.

Define Color

With the button „Define Color“ on dialog Color a new color can be defined and be added to the color palette.

Use Formula for Color

By the option „Use Formula for Color“ an object can be colored depending on an object attribute (a numerical value or by a combination of values). The attributes (see Table Object Attributes in the manual „Attributes, Variables, and Keywords“) can either be entered directly or be selected from the popup menu when clicking the double arrow symbol (>>).

Color Palette

  • Option „current grid“: With this setting, the color palette of the current grid is used (see dialog Grid|Appearance).
  • Option „direct, w/o palette“ : In this case, the color to be used is specified by entering the color code. To facilitate the choice of colors, a WINDOWS system color can be selected by clicking on the color palette icon. After choosing a color with OK the corresponding RGB value is automatically written to the formula box. This feature is useful in order to highlight specific objects of an object type.

  • local color palettes: Further, all color palettes of the local library are listed on the list box.

  • Selecting a color palette : The file selector icon enables to select color palettes from the local or global library. Clicking on the icon selects the global, SHIFT-click selects the local library of color palettes.

Button „Predined“

By selecting the command Save As from the sub-menu of the „Predefined“ button saves the current dialog settings using a designation. Subsequently, these settings can be loaded by clicking this designation. Via the sub-menu „Delete“, the selected setting is deleted without safety request.

Examples

The following examples just use the settings on dialog Color.

Coloring roads based on their daytime emission

  • Load the example file "Roads - Fill Color.cna".

Example

Path: Examples/Graphic/Dialog Color/Roads - Fill Color.cna

  • Open the dialog Appearance and select the object type „Road“.
  • Click the button „Color“ on the „Fill“ tab.
  • Select the option „Use Formula for Color“.
  • Now, select via the double arrow (>>) from the popup menu the attribute LMET (for Lm,E daytime).
  • Close the dialog Color by OK and click on button „Apply“.

Subsequently, the filling of the roads are colored according to presently selected color palette.

Dialog Appearance: fill color or roads defined via option „Use Formula for Color“

Coloring of buildings based on their height

Open the example file "Buildings - Fill Color.cna".

Example

Path: Examples/Graphics/Dialog Color/Buildings - Fill Color.cna

  • Open the dialog Appearance and select the object type „Building“.
  • Click the button „Color“ on the „Fill“ tab.
  • Select the option „Use Formula for Color“ and enter the attribute HA into the formula box (alternatively, select via the double arrow (>>).
  • Select from the list box „Color Palette“ the palette „pal_0_10_step_1“.

Note

The color palettes must reside in the local library of color palettes. If necessary copy the palette from the global to the local library using the button „--> Local Lib.“.

  • Close the dialog Color by OK and click the button „Apply“ or OK.

Subsequently, the buildings receive, depending on their height, the color from the selected color palette. A grid legend can be displayed using the object „Symbol“ and by selecting there the corresponding color palette.

Color fill of buildings applying the color palette „pal_0_10_step_1“

Coloring residential buildings (color input)

  • Load the example file "Buildings - Line Color.cna".

Example

Path: Examples/Graphic/Dialog Color/Buildings - Line Color.cna

  • Open the dialog Appearance and select the object type „Building“ from the list.
  • Click the button „Color“ on the „Line“ tab.
  • Select the option „Use Formula for Color“ and enter the following formula:iif(WG_NUM==1, rgb(255,0,0), rgb(0,0,0))This formula means: In case the attribute WG_NUM has the value=1 use the RGB-color 255,0,0 (red), else use the RGB-color 0,0,0 (black). The attribute WG_NUM represent the numerical setting of the option „Residential Buildings“ on the Building dialog.

  • Close the dialog Color by OK and click the button „Apply“ or OK.

Line color of the buildings defined using the option „Use Formula for Color“

Showing buildings transparent/solid

A horizontal grid has been calculated at 5 m height. Now, those buildings having a height below 5 m shall be transparent, while those above shall be solid filled.

Example

Path: Examples/Graphics/Dialog Color/transparent buildings.cna

  • Load the example file "transparent buildings.cna".
  • Open the dialog Appearance and select the object type „Building“ form the list of objects.
  • Click the button „Color“ on the „Fill“ tab.
  • Select the option „Use Formula for Color“ and enter the following formula:iif(PO_HREL_P1<5, -1, rgb(255,255,255))in words: If the attribute PO_HREL_P1 (relative height of the first polygon point) has a value <5 display this object in transparent fill mode, otherwise use the RGB color 255,255,255 (white).

  • Close the dialog Color with OK and click on button „Apply“ or OK.

In the following example, two buildings have a height of 4 m, the other 6 m. The receiver grid is calculated with a height of 5 m. With the above formula and by activating the option „Use Height of Buildings“ on dialog Grid|Properties|Option the following representation results: