col2sRGB: Convert "R" colors to colorspaces' sRGB colors

View source: R/mixcolorr.R

col2sRGBR Documentation

Convert "R" colors to colorspaces' sRGB colors

Description

This function takes R color strings and converts them into colorspaces::sRGB values. It utilizes grDevices::col2rgb for conversion.

Usage

col2sRGB(col)

Arguments

col

A character vector of color names or hexadecimal color codes.

Value

An object of class "sRGB" containing the red, green, and blue components of the color.

Examples

col2sRGB("red")
col2sRGB("#FF0000")

jan-glx/schelpr documentation built on March 28, 2024, 1:35 a.m.