get_colors_from_image: The get_colors_from_image function

Description Usage Arguments Value Examples

View source: R/get_colors_from_image.R

Description

This function allows you to identify the dominant colors in an image.

Usage

1
get_colors_from_image(image, n = 5, order_by = "luminance")

Arguments

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'

Value

The hex codes of the n colors in the palette

Examples

1
get_colors_from_image("https://raw.githubusercontent.com/HughSt/mappalettes/master/images/nathan-lindahl-1j18807_ul0-unsplash.jpg",5)

disarm-platform/MapPalettes documentation built on Jan. 11, 2020, 5:51 p.m.