trim_palette {swatches} | R Documentation |
Given a palette and a desired number of colors to use, this function will compute CIEDE2000 and attempt to reduce the input set to a disctinct smaller set of colors based on color distances.
trim_palette(pal, n = 5)
pal |
input palette to reduct |
n |
number of desired colors |
vector of n
colors from pal
internal CIEDE2000 color distance implementation by Gaurav Sharma & Maynard P Baalthazar