套件 | mx.utils |
類別 | public class ColorUtil |
繼承 | ColorUtil Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
ColorUtil.adjustBrightness()
method.
公用方法
方法 | 定義自 | ||
---|---|---|---|
[靜態]
Performs a linear brightness adjustment of an RGB color. | ColorUtil | ||
[靜態]
Performs a scaled brightness adjustment of an RGB color. | ColorUtil | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
[靜態]
Performs an RGB multiplication of two RGB colors. | ColorUtil | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
方法詳細資訊
adjustBrightness | () | 方法 |
public static function adjustBrightness(rgb:uint, brite:Number):uint
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Performs a linear brightness adjustment of an RGB color.
The same amount is added to the red, green, and blue channels of an RGB color. Each color channel is limited to the range 0 through 255.
參數
rgb:uint — Original RGB color.
| |
brite:Number — Amount to be added to each color channel.
The range for this parameter is -255 to 255;
-255 produces black while 255 produces white.
If this parameter is 0, the RGB color returned
is the same as the original color.
|
uint — New RGB color.
|
adjustBrightness2 | () | 方法 |
public static function adjustBrightness2(rgb:uint, brite:Number):uint
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Performs a scaled brightness adjustment of an RGB color.
參數
rgb:uint — Original RGB color.
| |
brite:Number — The percentage to brighten or darken the original color.
If positive, the original color is brightened toward white
by this percentage. If negative, it is darkened toward black
by this percentage.
The range for this parameter is -100 to 100;
-100 produces black while 100 produces white.
If this parameter is 0, the RGB color returned
is the same as the original color.
|
uint — New RGB color.
|
rgbMultiply | () | 方法 |
public static function rgbMultiply(rgb1:uint, rgb2:uint):uint
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Performs an RGB multiplication of two RGB colors.
This always results in a darker number than either original color unless one of them is white, in which case the other color is returned.
參數
rgb1:uint — First RGB color.
| |
rgb2:uint — Second RGB color.
|
uint — RGB multiplication of the two colors.
|
Tue Jun 12 2018, 03:47 PM Z