hex2HSL | R Documentation |
该函数将十六进制颜色代码转换为 HSL(色相、饱和度、亮度)颜色空间的值。
hex2HSL(hex)
hex |
字符向量,包含十六进制颜色代码(可带或不带 "#" 前缀) |
返回一个数据框,包含 H
, S
, L
三列,分别为色相、饱和度和亮度
hex_colors <- c("FF0000", "#00FF00", "0000FF")
hsl_values <- hex2HSL(hex_colors)
print(hsl_values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.