wernerColor {recolorize} | R Documentation |
Remap an image to Werner's nomenclature
Description
Remaps a recolorize object to the colors in Werner's Nomenclature of Colors by Patrick Syme (1821), one of the first attempts at an objective color reference in western science, notably used by Charles Darwin.
Usage
wernerColor(recolorize_obj, which_img = "original", n_colors = 5)
Arguments
recolorize_obj |
A recolorize object as returned by
|
which_img |
Which image to recolor; one of either "original" or "recolored". |
n_colors |
Number of colors to list out in plotting, in order of
size. Ex: |
Details
See https://www.c82.net/werner/ to check out the original colors.
Value
A recolorize
object with an additional list element, werner_names
,
listing the Werner color names for each center.
Examples
# get an initial fit:
corbetti <- system.file("extdata/corbetti.png", package = "recolorize")
recolored_corbetti <- recolorize(corbetti, plotting = FALSE)
# recolor original image
corbetti_werner <- wernerColor(recolored_corbetti,
which_img = "original",
n_colors = 6)
# we can simplify the colors and then do it again:
corbetti_recluster <- recluster(recolored_corbetti,
cutoff = 45,
plot_hclust = FALSE)
corbetti_werner <- wernerColor(corbetti_recluster,
which_img = "recolored")