Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Methods for color variables

Updated on October 19, 2022

Use methods for color variables to manipulate the color of text and other objects.

Methods

MethodDescriptionParametersResult type
EqualsCompares a value to the variable value.Color valueBoolean
FromArgb (1 parameter)Creates a Color structure from a 32-bit ARGB value. Int32 valColor
FromArgb (2 parameters)Creates a Color structure from the specified Color structure, but with the new specified alpha value. Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits. Int32 alphaColor
FromArgb (3 parameters)Creates a Color structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits. Int32 red, Int32 green, Int32 blueColor
FromArgb (4 parameters)Creates a Color structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits. Int32 alpha, Int32 red, Int32 green, Int32 blueColor
FromKnownColorCreates a Color structure from the specified predefined color. KnownColor valueColor
FromNameCreates a Color structure from the specified name of a predefined color. string value: Valid names are the names of the elements of the KnownColor enumeration.Color
GetBrightnessGets the hue-saturation-lightness (HSL) lightness value for this Color structure. Double
GetHueGets the hue-saturation-lightness (HSL) hue value, in degrees, for this Color structure. Double
GetSaturationGets the hue-saturation-lightness (HSL) saturation value for this Color structure. Double
ResetStateResets component properties to initial values.
ToArgbThe 32-bit ARGB value of this Color. Int32
ToKnownColorGets the KnownColor value of this Color structure. KnownColorKnownColor
ToStringConverts this Color structure to a human-readable string. StringString

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us