name {ColorNameR} | R Documentation |
Name a color given its coordinates in a specified color space.
Description
Name a color given its coordinates in a specified color space.
Usage
name(color, colorspace = "Lab", illuminant = NULL, language = "english")
Arguments
color |
A matrix whose rows specify colors. |
colorspace |
The color space the coordinates of the colors are in. |
illuminant |
The reference white, or |
language |
The language of the color name, between English, French, German, and Spanish. |
Details
The available color spaces are "XYZ"
, "sRGB"
, "Apple RGB"
, "CIE RGB"
, "Luv"
, and "Lab"
(default).
If the color space is an RGB variant, the coordinates must take values between 0 and 1.
Value
The name of the color, according to the UPOV.
Examples
name(c(65, 20, -20))
name(c(65, 20, -20), language="Spanish")
name(c(65, 20, -20), language="es")
name(c(244/255, 234/255, 184/255), colorspace="sRGB")
name(rbind(c(65, 20, -20), c(69, 4, -31)))
[Package ColorNameR version 0.1.0 Index]