Package | com.google.maps |
Class | public final class Color |
Property | Defined by | ||
---|---|---|---|
b : Number
Blue component, in the range [0,255].
| Color | ||
g : Number
Green component, in the range [0,255].
| Color | ||
r : Number
Red component, in the range [0,255].
| Color | ||
rgb : Number [read-only]
Color as a Number, for example 0x804020.
| Color |
Method | Defined by | ||
---|---|---|---|
Color(clr:Number)
Constructs a Color from a Number.
| Color | ||
incRGB(deltaR:Number, deltaG:Number, deltaB:Number):void
Increments this color's R, G and B components by individual delta values.
| Color | ||
setRGB(compR:Number, compG:Number, compB:Number):void
Sets this color from R, G and B components, all in the range [0,255].
| Color | ||
toHtml(color:Number):String
[static]
Returns a color in HTML format, for example '#321fba'.
| Color | ||
toString():String
Returns a string representation of this color,
for example 'R:64/G:32/B:255'.
| Color |
Constant | Defined by | ||
---|---|---|---|
BLACK : Number = 0x000000 [static]
| Color | ||
BLUE : Number = 0x0000ff [static]
| Color | ||
CYAN : Number = 0x00ffff [static]
| Color | ||
DEFAULTLINK : Number = 0x7777cc [static]
Color used for the 'Terms of Use' link.
| Color | ||
GRAY1 : Number = 0x101010 [static]
| Color | ||
GRAY10 : Number = 0xa0a0a0 [static]
| Color | ||
GRAY11 : Number = 0xb0b0b0 [static]
| Color | ||
GRAY12 : Number = 0xc0c0c0 [static]
| Color | ||
GRAY13 : Number = 0xd0d0d0 [static]
| Color | ||
GRAY14 : Number = 0xe0e0e0 [static]
| Color | ||
GRAY15 : Number = 0xf0f0f0 [static]
| Color | ||
GRAY2 : Number = 0x202020 [static]
| Color | ||
GRAY3 : Number = 0x303030 [static]
| Color | ||
GRAY4 : Number = 0x404040 [static]
| Color | ||
GRAY5 : Number = 0x505050 [static]
| Color | ||
GRAY6 : Number = 0x606060 [static]
| Color | ||
GRAY7 : Number = 0x707070 [static]
| Color | ||
GRAY8 : Number = 0x808080 [static]
| Color | ||
GRAY9 : Number = 0x909090 [static]
| Color | ||
GREEN : Number = 0x00ff00 [static]
| Color | ||
MAGENTA : Number = 0xff00ff [static]
| Color | ||
RED : Number = 0xff0000 [static]
| Color | ||
WHITE : Number = 0xffffff [static]
| Color | ||
YELLOW : Number = 0xffff00 [static]
| Color |
b | property |
b:Number
[read-write]Blue component, in the range [0,255].
Implementation public function get b():Number
public function set b(value:Number):void
g | property |
g:Number
[read-write]Green component, in the range [0,255].
Implementation public function get g():Number
public function set g(value:Number):void
r | property |
r:Number
[read-write]Red component, in the range [0,255].
Implementation public function get r():Number
public function set r(value:Number):void
rgb | property |
rgb:Number
[read-only]Color as a Number, for example 0x804020.
Implementation public function get rgb():Number
Color | () | constructor |
public function Color(clr:Number)
Constructs a Color from a Number.
Parametersclr:Number |
var col:Color = new Color(0x0000ff); // blue
incRGB | () | method |
public function incRGB(deltaR:Number, deltaG:Number, deltaB:Number):void
Increments this color's R, G and B components by individual delta values. Each color component is clamped to the valid range [0,255].
ParametersdeltaR:Number — R component delta.
|
|
deltaG:Number — G component delta.
|
|
deltaB:Number — B component delta.
|
var col:Color = new Color(0xff0000); // color is red col.incRGB(0, 255, 0); // color is now yellow
setRGB | () | method |
public function setRGB(compR:Number, compG:Number, compB:Number):void
Sets this color from R, G and B components, all in the range [0,255].
ParameterscompR:Number — New R component.
|
|
compG:Number — New G component.
|
|
compB:Number — New B component.
|
var col:Color = new Color(0); col.setRGB(128, 64, 255); // lilac
toHtml | () | method |
public static function toHtml(color:Number):String
Returns a color in HTML format, for example '#321fba'. Clamps the number to the range [0x000000,0xffffff]. Returns the encoding for black if the input value is not a valid number.
Parameterscolor:Number — Color to represent in HTML format.
|
String — color as a HTML String.
|
var col:Color = new Color(0xff8020); trace(col.toHtml()); // outputs "#ff8020"
toString | () | method |
public function toString():String
Returns a string representation of this color, for example 'R:64/G:32/B:255'.
ReturnsString — This color as a String.
|
var col:Color = new Color(0xff8020); trace(col.toString()); // outputs "R:255/G:128/B:32"
BLACK | constant |
public static const BLACK:Number = 0x000000
BLUE | constant |
public static const BLUE:Number = 0x0000ff
CYAN | constant |
public static const CYAN:Number = 0x00ffff
DEFAULTLINK | constant |
public static const DEFAULTLINK:Number = 0x7777cc
Color used for the 'Terms of Use' link.
GRAY1 | constant |
public static const GRAY1:Number = 0x101010
GRAY10 | constant |
public static const GRAY10:Number = 0xa0a0a0
GRAY11 | constant |
public static const GRAY11:Number = 0xb0b0b0
GRAY12 | constant |
public static const GRAY12:Number = 0xc0c0c0
GRAY13 | constant |
public static const GRAY13:Number = 0xd0d0d0
GRAY14 | constant |
public static const GRAY14:Number = 0xe0e0e0
GRAY15 | constant |
public static const GRAY15:Number = 0xf0f0f0
GRAY2 | constant |
public static const GRAY2:Number = 0x202020
GRAY3 | constant |
public static const GRAY3:Number = 0x303030
GRAY4 | constant |
public static const GRAY4:Number = 0x404040
GRAY5 | constant |
public static const GRAY5:Number = 0x505050
GRAY6 | constant |
public static const GRAY6:Number = 0x606060
GRAY7 | constant |
public static const GRAY7:Number = 0x707070
GRAY8 | constant |
public static const GRAY8:Number = 0x808080
GRAY9 | constant |
public static const GRAY9:Number = 0x909090
GREEN | constant |
public static const GREEN:Number = 0x00ff00
MAGENTA | constant |
public static const MAGENTA:Number = 0xff00ff
RED | constant |
public static const RED:Number = 0xff0000
WHITE | constant |
public static const WHITE:Number = 0xffffff
YELLOW | constant |
public static const YELLOW:Number = 0xffff00