# Get the complete color database
colors_df <- get_color_data()
head(colors_df)
# See dimensions
dim(colors_df)
# Find all colors containing "blue"
blue_colors <- colors_df[grepl("blue", colors_df$name), ]
head(blue_colors)
# Get a random sample of colors
set.seed(123)
sample_colors <- colors_df[sample(nrow(colors_df), 10), ]
sample_colors
Run the code above in your browser using DataLab