View source: R/parse_temperature.R
temperature | R Documentation |
Converts color temperature in Kelvin to a color vector.
temperature(x = 5200)
x |
light temperature in Kelvin, a numeric vector with values in |
A vector of colors specified as hex codes
parse_color
for the general function to parse colors in various specifications (which this function calls internally) and convert_color
to convert parsed colors to another model.
Other color specifications:
cmyk()
,
css()
,
hcl()
,
hex()
,
hsi()
,
hsl()
,
hsv()
,
lab()
,
parse_color()
,
rgb()
,
ryb()
,
wavelength()
temperature() temperature(c(2000, 5200, 7000)) # Display a large range of color temperatures x <- seq(1000, 15000, length.out=200) notable_temperatures <- c(1000, 2000, 3200, 4000, 5200, 7000, 10000) plot(x=x, y=rep(0, 200), col=temperature(x), pch="|", cex=5, xaxt='n') axis(side=1, at=notable_temperatures, labels=TRUE, las=2) abline(v=notable_temperatures, lty="dotted")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.