convert_color: Convert Color

View source: R/convert_color.R

convert_colorR Documentation

Convert Color

Description

Convert Color

Usage

convert_color(color, as_hex = FALSE, single = FALSE)

Arguments

color

The color to convert. Can be either an R color string, or a numeric scalar, RGB vector, RGBA vector, or RGB/RGBA matrix with values between 0 and 1.

as_hex

Default FALSE. If TRUE, return hex colors.

single

Default FALSE. If TRUE, require exactly one color.

Value

RGB or RGBA color vector, or a color matrix for multiple colors.

Examples

#none

rayimage documentation built on June 12, 2026, 5:06 p.m.