GetMagenta Method

An Integer value. Gets the value of the magenta component of the color regardless of the color scheme of the object.

Applies to objects: Color

Syntax

[[Let] ret =] object.GetMagenta (Doc)

The GetMagenta method syntax has these parts:

Part Description
object A reference to an instance of the object.
Doc A reference to an instance of the Document object.
ret An Integer type variable (range 1 - 100).

Remarks

You can also use the Magenta propery to get the value of the magenta component of the object's color. However, that property is only effective if the color of objeñt is in the CMYK format. For correct transformation of an indexed color to the RGB or CMYK format for the specified document, the Doc parameter is used in the GetMagenta method.

Example

This example shows how to find out the value of the magenta component of a rectangle's fill color (the color was specified in the RGB format).

dim s as shape

' Create Shape object
s = thisDoc.ActivePage.DrawRect(100,100,1000,1000)
s.FillColor.SetRGB(30,210,80) ' Change fill color in RGB format s.PropertyChanged(CDPT_FILLCOLOR) trace s.FillColor.GetMagenta(thisDoc) ' Display the value of the magenta component

 

See Also

Color Object