Description Usage Arguments Value Examples
View source: R/get_colors_from_image.R
This function allows you to identify the dominant colors in an image.
1 | get_colors_from_image(image, n = 5, order_by = "luminance")
|
image |
The path to the image. Supports most image types. See image_read from magick package. |
n |
The number of colors in the palette. Defaults to 5. |
order_by |
How to order the colors. One of 'luminance', 'chroma' or 'hue'. Defaults to 'luminance' |
The hex codes of the n colors in the palette
1 | get_colors_from_image("https://raw.githubusercontent.com/HughSt/mappalettes/master/images/nathan-lindahl-1j18807_ul0-unsplash.jpg",5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.