fromArgb

fromArgb(argb) (1 of 3)

Creates a Color object from a 32-bit ARGB value.

ParameterTypeDescription
argbintA 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.

ParameterTypeDescription
redintThe red component value for the new Color object. Valid values are 0 through 255.
greenintThe green component value for the new Color object. Valid values are 0 through 255.
blueintThe 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.

ParameterTypeDescription
alphaintThe alpha component. Valid values are 0 through 255.
redintThe red component. Valid values are 0 through 255.
greenintThe green component. Valid values are 0 through 255.
blueintThe blue component. Valid values are 0 through 255.

Returns: The Color object that this method creates.