Skip to content

Instantly share code, notes, and snippets.

@phil8192
Created March 29, 2016 16:47
Show Gist options
  • Save phil8192/52f1c268c3936819d8b5b021826f31f0 to your computer and use it in GitHub Desktop.
Save phil8192/52f1c268c3936819d8b5b021826f31f0 to your computer and use it in GitHub Desktop.
255 tints of red
# 255 tints of red
red_tint <- function(v) as.hexmode(bitwOr(0xff0000, bitwOr(bitwShiftL(v, 8), v)))
cols <- paste0("#", red_tint(1:255))
barplot(255:1, col=cols, border=cols)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment