Display color palette

Share:

Description

Displays the created palette as a barchart with axis labels representing hex values of the colors. A more attractive method for doing so would be to use show_cols() from library(scales).

Usage

1

Arguments

palette

Vector The output of image_palette.

Value

A plot of the colors extracted from the image

See Also

scales::show_cols()

Examples

1
2
img <- jpeg::readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
display_palette(image_palette(img, n=5))