Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
HSBColor

Package | mx.utils
Class | public final class HSBColor
Inheritance | HSBColor Object

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

This class holds information for a color represented in HSB (Hue, Saturation, and Brightness) space. The main use of the class is simply as storage for these values, but there are also some utility functions for converting from and to RGB representations of colors.

Public Properties

| Property | Defined By
--- | --- | ---
|  | brightness : Number The brightness parameter for this HSB color. | HSBColor
|  | hue : Number The hue value for the HSB color. | HSBColor
|  | saturation : Number The saturation parameter for this HSB color. | HSBColor

Public Methods

| Method | Defined By
--- | --- | ---
|  | HSBColor(hue:Number, saturation:Number, brightness:Number) Constructs an HSBColor with optional parameters. | HSBColor
|  | convertHSBtoRGB(hue:Number, saturation:Number, brightness:Number):uint [static] Converts an HSB color specified by the parameters to a uint RGB color. | HSBColor
|  | convertRGBtoHSB(rgb:uint):HSBColor [static] Converts a color from RGB format into an HSBColor. | HSBColor

Property Detail

brightness | property

`brightness:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The brightness parameter for this HSB color. This is a value between 0 (black) and 1 (full brightness), which represents the distance from the apex of the HSB cone.

Implementation
`public function get brightness():Number`
`public function set brightness(value:Number):void`

hue | property |

`hue:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The hue value for the HSB color. This represents an angle, in degrees, around the HSB cone. The supplied value will be modulated by 360 so that the stored value of hue will be in the range [0,360).

Implementation
`public function get hue():Number`
`public function set hue(value:Number):void`

saturation | property |

`saturation:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The saturation parameter for this HSB color. This is a value between 0 (black) and 1 (full saturation), which represents the distance from the center in the HSB cone.

Implementation
`public function get saturation():Number`
`public function set saturation(value:Number):void`
Constructor Detail

HSBColor | () | Constructor

`public function HSBColor(hue:Number, saturation:Number, brightness:Number)`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Constructs an HSBColor with optional parameters.

Parameters

| `hue:Number` (default = `NaN`)`` — The hue.
| `saturation:Number` (default = `NaN`)`` — The saturation.
| `brightness:Number` (default = `NaN`)`` — The brightness.

Method Detail

convertHSBtoRGB | () | method

`public static function convertHSBtoRGB(hue:Number, saturation:Number, brightness:Number):uint`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Converts an HSB color specified by the parameters to a uint RGB color.

Parameters

| `hue:Number` — The hue.
| `saturation:Number` — The saturation.
| `brightness:Number` — The brightness.

Returns

| `uint` — An RGB color.

convertRGBtoHSB | () | method |

`public static function convertRGBtoHSB(rgb:uint):HSBColor`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Converts a color from RGB format into an HSBColor.

Parameters

| `rgb:uint` — The RGB color.

Returns

| `HSBColor` — The HSBColor object representing the RGB color.

Wed Nov 15 2017, 09:50 AM +01:00