Description Usage Arguments Value Examples
make_palette
creates a color palette from colors extracted from Windows BMP, JPEG, PNG, TIFF, and SVG format images with
the get_colors
function.
1 2 | make_palette(data, n = 10, clust_method = "kmeans",
extract_method = "hex_freq", show = TRUE)
|
data |
a |
n |
the number of discrete colors to be extracted from the data. |
clust_method |
specifies the method used to cluster the pixels. By default, the colors are clustered by the
|
extract_method |
specifies the process for extracting the colors from the clusters obtained. By default |
show |
by default |
A character vector with hex color codes, sorted by the weight of the associated clusters.
1 2 3 4 | # Create palette from image
img <- system.file("extdata", "pic6.png", package = "colorfindr")
colors <- get_colors(img)
make_palette(colors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.