snap2palette: import your own snap and make a palette

View source: R/snap2palette.R

snap2paletteR Documentation

import your own snap and make a palette

Description

import your own snap and make a palette

Usage

snap2palette(path, n, plot_picture = FALSE, plot_palette = TRUE)

Arguments

path

path to picture in png form

n

number of colours in outputted palette

plot_picture

plot picture segmented into palette colours, defaults to FALSE (TRUE or FALSE)

plot_palette

plot resulting palette, defaults to TRUE

Value

new palette

References

https://www.r-bloggers.com/color-quantization-in-r/


mrc-ide/snapalette documentation built on March 29, 2024, 3:16 a.m.