Learn R Programming

plotKML (version 0.2-4)

col2kml: 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).

See Also

aqp::munsell2rgb

Examples

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

Run the code above in your browser using DataLab