Skip to contents

Order colors

Usage

order_colors(x, sort_by = c("H", "-L", "-C"), ...)

Arguments

x

character vector of colors

sort_by

character vector with color colnames used for sorting, passed as argument 'byCols' to colorjam::sort_colors().

...

additional arguments are passed to colorjam::sort_colors().

Examples

set.seed(123);
x <- sample(grep("royal|^golden", colors(), value=TRUE))
x_sorted <- x[order_colors(x)];
jamba::showColors(list(input=x, sorted=x_sorted))