from_argb method
from_argb
Creates a Color
structure from a 32-bit ARGB value.
Returns
The Color
structure that this method creates.
def from_argb(self, argb):
...
Parameter | Type | Description |
---|---|---|
argb | int | A value specifying the 32-bit ARGB value. |
from_argb
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.
Returns
The Color
that this method creates.
def from_argb(self, alpha, base_color):
...
Parameter | Type | Description |
---|---|---|
alpha | int | The alpha value for the new Color . Valid values are 0 through 255. |
base_color | Color | The Color from which to create the new Color . |
Exceptions
Exception | Description |
---|---|
ArgumentOutOfRangeException | alpha is less than 0 or greater than 255. |
from_argb
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.
Returns
The Color
that this method creates.
def from_argb(self, red, green, blue):
...
Parameter | Type | Description |
---|---|---|
red | int | The red component value for the new Color . Valid values are 0 through 255. |
green | int | The green component value for the new Color . Valid values are 0 through 255. |
blue | int | The blue component value for the new Color . Valid values are 0 through 255. |
Exceptions
Exception | Description |
---|---|
ArgumentOutOfRangeException | red , green , or blue is less than 0 or greater than 255. |
from_argb
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.
Returns
The Color
that this method creates.
def from_argb(self, alpha, red, green, blue):
...
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. |
Exceptions
Exception | Description |
---|---|
ArgumentOutOfRangeException | alpha , red , green , or blue is less than 0 or greater than 255. |
See Also
- module
aspose.cad
- class
Color