Mapping 3D Data into CIELab Color Space

Returns a data frame with the names of the input data points and hex colors (or CIELab coordinates). Data can be mapped to colors for use in data visualization. It optimally maps data points into a polygon that represents the CIELab colour space. Since Euclidean distance approximates relative perceptual differences in CIELab color space, the result is a color encoding that aims to capture much of the structure of the original data.


ucie

R-CMD-check

The goal of ucie is to map data into CIELab Color Space.

Installation

You can install the released version of ucie from CRAN with:

install.packages("ucie")
or
devtools::install_github("mikelkou/ucie")

Usage

library(ucie)

# returns a data frame with names of data points and colors (hex colors or Lab coordinates)
data2cielab(dataset, WL, Wa, Wb, S, LAB_coordinates)

Example

This is a basic example which shows you how to solve a common problem:

library(ucie)
## basic example code
df <- data.frame(V1=runif(100,  0,1), V2=runif(100,  0,5), V3=runif(100,  0,30))
data_with_colors <- data2cielab(df, Wb=1.2, S=1.6)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ucie")

1.0.2 by Mikaela Koutrouli, 4 years ago


Browse source code at https://github.com/cran/ucie


Authors: Mikaela Koutrouli [aut, cre] , Lars Juhl Jensen [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports colorspace, dplyr, geometry, pracma, ptinpoly, rgl, remotes

Suggests testthat


See at CRAN