Type: Package
Title: Make Palette
Version: 0.1.2
Description: Functions that allow you to create your own color palette from an image, using mathematical algorithms.
Depends: R (≥ 3.5.0)
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.2.3
URL: https://github.com/musajajorge/makePalette
Imports: terra, cluster, grDevices, prismatic
NeedsCompilation: no
Packaged: 2023-09-28 19:10:22 UTC; jcutipa
Author: Jorge L. C. Musaja [aut, cre]
Maintainer: Jorge L. C. Musaja <musajajorge@gmail.com>
Repository: CRAN
Date/Publication: 2023-09-28 19:30:05 UTC

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)


Make your color palette with KMeans algorithm

Description

Creates a color palette from an image, using the KMeans algorithm

Usage

makePaletteKM(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

makePaletteKM(system.file("extdata", "picture02.jpg", package="makePalette"))
makePaletteKM(system.file("extdata", "picture04.png", package="makePalette"), 6)
makePaletteKM(system.file("extdata", "picture05.jpg", package="makePalette"), 10)
MyPalette = makePaletteKM(system.file("extdata", "picture05.jpg", package="makePalette"), 10)
barplot(1:10, col=MyPalette)