powered by
Plots color examples with contrasting text. Parameters are passed to contrast_text.
color_plot( colors, labels = TRUE, borders = NULL, cex_label = 1, ncol = NULL, ... )
base plot
Vector of colors to plot
Show color names. Default is TRUE
Border parameter for 'rect()' function. Default is NULL
Label size. Default is 1.
Desired number of columns. Default is ceiling of square root to the length of 'colors' vector provided.
Parameters for the
par(bg=NULL) colors <- sample(colors(),size = 20) color_plot(colors, method="relative")
Run the code above in your browser using DataLab