display_palette: Display color palette

Description Usage Arguments Value See Also Examples

View source: R/utils.R

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))

Example output



RImagePalette documentation built on May 2, 2019, 9:19 a.m.