Pageflex Document Action API
CreateColorRgb Method (name, red, green, blue, isSpot)
Namespaces > Pageflex.Scripting > Document > CreateColorRgb(String, UInt32, UInt32, UInt32, Boolean)
Creates a new RGB Color with the specified name and values.
Syntax
C# | Visual Basic | Managed C++ |
Public Function CreateColorRgb ( _ name As String, _ red As UInteger, _ green As UInteger, _ blue As UInteger, _ isSpot As Boolean _ ) As Color
public: Color^ CreateColorRgb ( String^ name, unsigned int red, unsigned int green, unsigned int blue, bool isSpot )
Parameters
- name (String)
- Name of color to create.
- red (UInt32)
- A UInt32 between 0 and 255, representing the red component of the color to create.
- green (UInt32)
- A UInt32 between 0 and 255, representing the green component of the color to create.
- blue (UInt32)
- A UInt32 between 0 and 255, representing the blue component of the color to create.
- isSpot (Boolean)
- falseFalsefalse to create a process color, or trueTruetrue to create a spot color.
Return Value
The newly created Color.
Exceptions
Exception | Condition |
---|---|
ColorAlreadyExistsException | A color with the specified name already exists in the current document. |
ArgumentNullException | The value supplied for name was nullNothingnullptr. |
StaleScriptingObjectException | This object's associated internal object no longer exists. |
Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)