fromHSBA()
Returns a Color object based on the specified values of hue, saturation, brightness, and (optionally) alpha for the HSB color model.
Syntax
Color fromHSBA(Numeric h, Numeric s, Numeric b [, Numeric a])
- h (hue) is any floating-point number. The floor of this number is subtracted from it to create a fraction between 0 and 1, which is then multiplied by 360.
- s (saturation) is a floating-point value between zero and one (numbers within the range 0.0-1.0).
- b (brightness) is a floating-point value between zero and one (numbers within the range 0.0-1.0).
- a (alpha, optional) specifies opacity and is within the range 0.0 - 1.0. Alpha defaults to 1.0 if not specified.
Usage
Class methods do not require a Color object instance. When you invoke a class method, it is prefixed with the Color class name and the '.' character.
Example
Color.fromHSBA(0.5,0.5,0.5,0.5)
This returns a Color object that is red and partially transparent.