col2hcl | R Documentation |
convert R color to HCL color matrix
col2hcl(
x,
maxColorValue = 255,
model = getOption("jam.model", c("hcl", "polarLUV", "polarLAB")),
...
)
x |
|
maxColorValue |
|
model |
|
... |
additional arguments are ignored. |
This function takes an R color and converts to an HCL matrix, using
the colorspace package, and RGB
and
polarLUV
functions. It is also used to
maintain alpha transparency, to enable interconversion via other
color manipulation functions as well.
When model="hcl"
this function uses farver::decode_colour()
and bypasses colorspace
. In future the colorspace
dependency
will likely be removed in favor of using farver
. In any event,
model="hcl"
is equivalent to using model="polarLUV"
and
fixup=TRUE
, except that it should be much faster.
numeric
matrix with H, C, L values.
Other jam color functions:
alpha2col()
,
applyCLrange()
,
col2alpha()
,
col2hsl()
,
col2hsv()
,
color2gradient()
,
fixYellow()
,
fixYellowHue()
,
getColorRamp()
,
hcl2col()
,
hsl2col()
,
hsv2col()
,
isColor()
,
kable_coloring()
,
makeColorDarker()
,
rainbow2()
,
rgb2col()
,
setCLranges()
,
setTextContrastColor()
,
showColors()
,
unalpha()
,
warpRamp()
col2hcl("#FF000044")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.