IDynamicSymbolProperties.GetColor Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Display)  

IDynamicSymbolProperties.GetColor Method

Indicates the color for the specified dynamic symbol.

[Visual Basic .NET]
Public Sub GetColor ( _
    ByVal dynamicSymbolType As esriDynamicSymbolType, _
    ByRef Red As Single&, _
    ByRef Green As Single&, _
    ByRef Blue As Single&, _
    ByRef alpha As Single& _
public void GetColor (
    esriDynamicSymbolType dynamicSymbolType,
    ref Single& Red,
    ref Single& Green,
    ref Single& Blue,
    ref Single& alpha
  esriDynamicSymbolType dynamicSymbolType,
  System.Single* Red,
  System.Single* Green,
  System.Single* Blue,
  System.Single* alpha

Parameters dynamicSymbolType [in]
dynamicSymbolType is a parameter of type esriDynamicSymbolType Red [in, out]
Red is a parameter of type single* Green [in, out]
Green is a parameter of type single* Blue [in, out]
Blue is a parameter of type single* alpha [in, out]
alpha is a parameter of type single*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


The color attribute can be used in order to reuse a glyph, and render it in different colors, if possible, rather than creating a different glyph for each color. This is recommended in order to minimize graphic resources usage, and is possible with monochromatic symbols.

For monochromatic symbols (symbols that consist of only one color and might even have fixed black pixels), it is advisable to create a white-and-black dynamic glyph, and then set the DynamicSymbol’s color to the desired color. That will result in coloring the white pixels to the desired color, while leaving the black colors black. That method enables you to reuse a white-and-black glyph to draw different colors of the same glyph.

For multicolor symbols (symbols that contain more than just white and black colors in them), it is advisable to create the multicolor glyph, and then set the DynamicSymbol’s color to white. That will result in rendering the original colors of the glyph’s pixels.Use the alpha value in order to affect the Dynamic Symbol’s transparency level.

The target pixel color is being calculated by multiplying the Glyph’s color value with the value of the Color Property. For example - a white opaque color (R=1, G=1, B=1, A=1) will result in rendering the pixels with the original glyph’s color values, with the same transparency level.

See Also

IDynamicSymbolProperties Interface