col2hsv: Convert Hex colours to HSV

View source: R/plot_tools.R

col2hsvR Documentation

Convert Hex colours to HSV

Description

Convert Hex colours to HSV

Usage

col2hsv(hexcol, which = "hsv")

Arguments

hexcol

(Character) A vector of hex colours.

which

(Character) Which variables to return. "HSV" will return Hue, Saturation, and Value. Any combination of these letters will return those columns, so "HV" will return only Hue and Value.

Value

A dataframe if more than one column is requested in which, otherwise a numeric vector.

Authors

Examples

col2hsv(c("#FFD8B1", "#808000"))

#>          h         s         v
#> 0.08333333 0.3058824 1.0000000
#> 0.16666667 1.0000000 0.5019608

col2hsv(c("#FFD8B1", "#808000"), which = "hv")

#>          h         v
#> 0.08333333 1.0000000
#> 0.16666667 0.5019608


DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.