Color Element (Visio XML Reference)

When contained in a Char element, the Color element specifies one of the following:

  • The index of the color in the color table used for the shape's text

  • An RGB value specifying a custom color not in the color table (for example, #ff9900 )

When contained in a Layer element, the Color element specifies one of the following:

  • The index of the color in the color table used to display the layer

  • An RGB value specifying a custom color not in the color table (for example, #ff9900 )

When contained in a Reviewer element, the Color element specifies an RGB value representing the color assigned to a document reviewer's markup.

Syntax

<Color
    [Unit]
    [F]
    [Err]>
</Color>

Attributes

Unit

Optional string. Represents a unit of measure. The default is COLOR. For details about COLOR, see Units of measure.

F

Optional string. Represents the element's formula. This attribute can contain one of the following strings: "someFormula" if the formula exists locally, "No Formula" if the formula is locally deleted or blocked, or "Inh" if the formula is inherited.

If the attribute is not present, the element's formula is a simple constant. For example, <element>5</element>.

Err

Optional string. Indicates that the formula evaluates to an error. The value of Err is the current value (an error message string); the value of the element is the last valid value.

Element properties

Property

Value

Name

Color

Minimum Occurrences

0

Maximum Occurrences

1

Element information

Parent elements

Char

Layer

Reviewer

Child elements

None

To set the color, enter a number from 0 to 23 or the RGB value in hexidecimal notation. The numbers 0 to 23 correspond to a color in the document color table, which is contained in the Colors element.

You can also specify a custom color by using its RGB value, or by specifying a formula. Enter a custom color in the following format: #rrggbb, where rr, gg, and bb are hexidecimal notation.

If a formula can be reconstructed from the RGB value, the formula is not saved. For example, because the formula RGB(255, 153, 0) represented in hexadecimal notation is #ff9900, the value #ff9900 would be saved in the DatadiagramML file.

The Color element in a Char element is relevant only when contained in a Shape or StyleSheet element. It is ignored when contained in a DocumentSheet or PageSheet element.

The Color element in a Layer element is relevant only when contained in a PageSheet element.

The Color element in a Reviewer element is relevant only when contained in a DocumentSheet element.

See also

Color cell (Character section)

Color cell (Layer section)

Color cell (Reviewer section)