Description Usage Arguments Value Note Examples
This function attempts to be very flexible in taking a color specified for R and converting it to the format that KML uses to represent a color, namely ALPHA GREEN BLUE RED!
This is exported so that others building on the RKML package
can use it directly without requiring calls of the form
RKML:::rgbToKMLColor
(which are slow!).
1 |
x |
the color to convert to KML form. This can be a named color
such as "red" or "pink", or in RGB or RGBA format such as "#FF0000" or
"#FF0000888", or a vector/matrix of one column of numbers giving the
RGB components, i.e. returned from |
A character vector.
This is not vectorized at present.
1 2 3 4 5 6 | rgbToKMLColor("red")
rgbToKMLColor("#FF0000")
rgbToKMLColor("#FF000099")
rgbToKMLColor("#FF000099")
rgbToKMLColor(col2rgb("red")) # Also starts a graphics device.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.