makePaletteCLARA {makePalette} | R Documentation |
Make your color palette with the CLARA algorithm
Description
Creates a color palette from an image, using the CLARA (Clustering Large Applications) algorithm
Usage
makePaletteCLARA(photo, n = 4)
Arguments
photo |
Image location path. It can also be a URL address. |
n |
Number of elements to be generated in the color palette. The default value is 4. |
Value
A palette of colors
Examples
makePaletteCLARA(system.file("extdata", "picture02.jpg", package="makePalette"))
makePaletteCLARA(system.file("extdata", "picture04.png", package="makePalette"), 6)
makePaletteCLARA(system.file("extdata", "picture05.jpg", package="makePalette"), 10)
MyPalette = makePaletteCLARA(system.file("extdata", "picture05.jpg", package="makePalette"), 10)
barplot(1:10, col=MyPalette)
[Package makePalette version 0.1.2 Index]