name: Name a color given its coordinates in a specified color...

Description Usage Arguments Details Value Examples

View source: R/name.R

Description

Name a color given its coordinates in a specified color space.

Usage

1
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 NULL if not needed.

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

1
2
3
4
5
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)))

ColorNameR documentation built on July 8, 2021, 9:07 a.m.