col2int: Color to (native) integer conversions

View source: R/utils-color.R

col2intR Documentation

Color to (native) integer conversions

Description

col2int() converts color strings to (native) color integers. int2col() converts (native) color integers to color strings.

Usage

col2int(x)

int2col(x)

Arguments

x

Color value to convert.

Details

  • Colors are also standardized by col2hex().

  • Requires the farver package.

Value

col2int() returns an integer. int2col() returns a (hex) color string.

Examples

if (requireNamespace("farver", quietly = TRUE)) {
  int2col(col2int("red"))
}

bittermelon documentation built on June 25, 2024, 5:09 p.m.