PaletteEntry property

Microsoft Visio Developer Reference

PaletteEntry property

   Example   

Gets or sets the red, green, blue, and flags components of a color.

Version added

4.0

Syntax

intRet = object.PaletteEntry
object.PaletteEntry = intVal

intRet

Long. The current value of the color's components.

object

Required. An expression that returns a Color object.

intVal

Required Long. The new value of the color's components.

Remarks

A color is represented by 1-byte red, green, and blue components. It also has a 1-byte flags field indicating how you use the color. These correspond to members of the Windows PALETTEENTRY data structure. For details, search for "PALETTEENTRY" in the Microsoft Platform SDK on the Microsoft Developer Network (MSDN) Web site.

The value passed is four tightly packed BYTE fields. The correspondence between the PaletteEntry property and red, green, blue, and flags values is:

palentry == r+256(b+256(g+256f))