My favorites | English | Sign in

Google Earth API

KmlColor Interface Reference

Inherits KmlObjectPartial.

List of all members.


Public Member Functions

void set (string color)
string get ()
int getR ()
void setR (int r)
int getG ()
void setG (int g)
int getB ()
void setB (int b)
int getA ()
void setA (int a)

Detailed Description

The KmlColor object values are expressed in hexadecimal notation. The range of values for any one color component is 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. The order of expression is aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For example, if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following when setting color value: 7fff0000, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

Member Function Documentation

void KmlColor.set ( string  color  ) 

Set the color of an object.

Parameters:
color color of the object

string KmlColor.get (  ) 

Returns the color of an object.

int KmlColor.getR (  ) 

red numerical value

void KmlColor.setR ( int  r  ) 

red numerical value

int KmlColor.getG (  ) 

green numerical value

void KmlColor.setG ( int  g  ) 

green numerical value

int KmlColor.getB (  ) 

blue numerical value

void KmlColor.setB ( int  b  ) 

blue numerical value

int KmlColor.getA (  ) 

opacity value

void KmlColor.setA ( int  a  ) 

opacity value