powered by
col2int() converts color strings to (native) color integers. int2col() converts (native) color integers to color strings.
col2int()
int2col()
col2int(x)int2col(x)
int2col(x)
col2int() returns an integer. int2col() returns a (hex) color string.
Color value to convert.
Colors are also standardized by col2hex().
col2hex()
Requires either the colorfast or the farver package.
if (requireNamespace("farver", quietly = TRUE)) { int2col(col2int("red")) }
Run the code above in your browser using DataLab