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 either the colorfast or the farver package.

Value

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

Examples

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

trevorld/bittermelon documentation built on Dec. 24, 2024, 10:33 p.m.