Description Usage Arguments Value Examples
View source: R/regex_palette.R
This function takes rather messy strings and extracts the color palette presented as hexadesimals and returns them as a string.
1 |
text |
A character vector of length 1 or more. |
A color palette as a string or a list of strings depending on the input.
1 2 3 4 5 6 7 8 9 10 | text1 <- "3b59988b9dc3dfe3eef7f7f7ffffff"
text2 <- "the palatte is #3472bc, #345682 then #112233 and finally #cbac43"
# Returns vector when input is of length 1
regex_palette(text1)
regex_palette(text2)
text3 <- c("3b59988b9dc3dfe3eef7f7f7ffffff", "3b59988b9dc3dfe3eef7f7f7ffffff")
regex_palette(text3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.