fromArgb
Contents
[
Hide
]fromArgb(argb) (1 of 3)
Creates a Color object from a 32-bit ARGB value.
| Parameter | Type | Description |
|---|---|---|
| argb | int | A value specifying the 32-bit ARGB value. |
Returns: The Color object that this method creates.
fromArgb(red, green, blue) (2 of 3)
Creates a Color object 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.
| Parameter | Type | Description |
|---|---|---|
| red | int | The red component value for the new Color object. Valid values are 0 through 255. |
| green | int | The green component value for the new Color object. Valid values are 0 through 255. |
| blue | int | The blue component value for the new Color object. Valid values are 0 through 255. |
Returns: The Color object that this method creates.
fromArgb(alpha, red, green, blue) (3 of 3)
Creates a Color object 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.
| Parameter | Type | Description |
|---|---|---|
| alpha | int | The alpha component. Valid values are 0 through 255. |
| red | int | The red component. Valid values are 0 through 255. |
| green | int | The green component. Valid values are 0 through 255. |
| blue | int | The blue component. Valid values are 0 through 255. |
Returns: The Color object that this method creates.