# keep examples from using more than 2 cores
data.table::setDTthreads(Sys.getenv("OMP_THREAD_LIMIT", unset = 2))
# Munsell notation to sRGB triplets [0-1]
color <- munsell2rgb(
the_hue = c('10YR', '2.5YR', '5YR'),
the_value = c(3, 5, 2.5),
the_chroma = c(5, 6, 2),
return_triplets = TRUE
)
# result is a data.frame
color
# back-transform sRGB -> closest Munsell color
# sigma is the dE00 color contrast metric
rgb2munsell(color)
Run the code above in your browser using DataLab