col2hsv: Returns the HSV values for a given R color name

View source: R/utilities-figures.R

col2hsvR Documentation

Returns the HSV values for a given R color name

Description

Returns the HSV values for a given R color name

Usage

col2hsv(color)

Arguments

color

vector of any of the three kinds of R color specifications, i.e., either a color name (as listed by colors()), a hexadecimal string of the form "#rrggbb" or "#rrggbbaa" (see rgb), or a positive integer i meaning palette()[i].

Value

A matrix with a column for each color. The three rows of the matrix indicate hue, saturation and value and are named "h", "s", and "v" accordingly.

Examples

col2hsv("yellow")

esqLABS/esqlabsR documentation built on April 17, 2025, 10:51 a.m.