col2kml: Convert a color strings to the KML format

View source: R/col2kml.R

col2kmlR Documentation

Convert a color strings to the KML format

Description

Converts some common color formats (internal R colors, hexadecimal format, Munsell color codes) color to KML format.

Usage

col2kml(colour)

Arguments

colour

R color string

Value

KML-formatted color as \#aabbggrr where aa=alpha (00 to ff), bb=blue (00 to ff), gg=green (00 to ff), rr=red (00 to ff).

Author(s)

Pierre Roudier, Tomislav Hengl and Dylan Beaudette

See Also

aqp::munsell2rgb

Examples

col2kml("white")
col2kml(colors()[2])
hex2kml(rgb(1,1,1))
x <- munsell2kml("10YR", "2", "4")
kml2hex(x)

plotKML documentation built on June 7, 2022, 5:07 p.m.