Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@revodavid
Created June 14, 2019 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revodavid/c1459020a2d457cd8f7be1ead77039c2 to your computer and use it in GitHub Desktop.
Save revodavid/c1459020a2d457cd8f7be1ead77039c2 to your computer and use it in GitHub Desktop.
## get n colors at once
random.colors <- function(n) {
hexbot <- GET(endpoint, query=list(count=n))
unlist(content(hexbot)$colors)
}
ncol <- 5
barplot(rep(1,ncol),col=random.colors(ncol), axes=FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment