pick_colors | R Documentation |
pick_colors()
places each color into RGB space, clusters them with k-means,
and returns the colors nearest each cluster center.
color_order()
reorders colors so that subsequent colors are far from each other
in RGB space.
color_distance()
calculates pairwise distances in RGB space between colors.
pick_colors(hex, n)
color_distance(hex)
color_order(hex)
hex |
a character vector of hexadecimal colors |
n |
the integer number of desired colors |
a character vector that is a subset of hex
, or a
matrix of distances for color_distance()
pick_colors(crayons$standard, 10)
color_order(crayons$standard)
color_distance(crayons$standard[1:4])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.