FromArgb
Leave feedback
On this page
Creates a Color structure from a 32-bit ARGB value.
public static Color FromArgb(int argb)
| Parameter | Type | Description |
|---|---|---|
| argb | Int32 | A value specifying the 32-bit ARGB value. |
The Color structure that this method creates.
- struct Color
- namespace GroupDocs.Watermark.Watermarks
- assembly GroupDocs.Watermark
Creates a Color structure from the specified Color structure, but with the new specified alpha value.
public static Color FromArgb(int alpha, Color baseColor)
| Parameter | Type | Description |
|---|---|---|
| alpha | Int32 | The alpha value for the new Color. Valid values are 0 through 255. |
| baseColor | Color | The Color from which to create the new Color. |
The Color that this method creates.
| exception | condition |
|---|---|
| ArgumentOutOfRangeException | Alpha is less than 0 or greater than 255. |
Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits.
- struct Color
- namespace GroupDocs.Watermark.Watermarks
- assembly GroupDocs.Watermark
Creates a Color structure from the specified 8-bit color values (red, green, and blue) and the alpha value is implicitly 255 (fully opaque).
public static Color FromArgb(int red, int green, int blue)
| Parameter | Type | Description |
|---|---|---|
| red | Int32 | The red component value for the new Color. Valid values are 0 through 255. |
| green | Int32 | The green component value for the new Color. Valid values are 0 through 255. |
| blue | Int32 | The blue component value for the new Color. Valid values are 0 through 255. |
The Color that this method creates.
| exception | condition |
|---|---|
| ArgumentOutOfRangeException | Red, green, or blue is less than 0 or greater than 255. |
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.
- struct Color
- namespace GroupDocs.Watermark.Watermarks
- assembly GroupDocs.Watermark
Creates a Color structure from the four ARGB component (alpha, red, green, and blue) values.
public static Color FromArgb(int alpha, int red, int green, int blue)
| Parameter | Type | Description |
|---|---|---|
| alpha | Int32 | The alpha component value for the new Color. Valid values are 0 through 255. |
| red | Int32 | The red component value for the new Color. Valid values are 0 through 255. |
| green | Int32 | The green component value for the new Color. Valid values are 0 through 255. |
| blue | Int32 | The blue component value for the new Color. Valid values are 0 through 255. |
The Color that this method creates.
| exception | condition |
|---|---|
| ArgumentOutOfRangeException | Red, green, or blue is less than 0 or greater than 255. |
Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
- struct Color
- namespace GroupDocs.Watermark.Watermarks
- assembly GroupDocs.Watermark
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.