You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Get Your Favourite Colour - I am creating named vectorcolpal<- c("red"="#fe4a49", "blue"="#2ab7ca","yellow"="#fed766","grey"="#e6e6ea", "white"="#f4f4f8")
attr(colpal,"names")
## [1] "red" "blue" "yellow" "grey" "white"
metro_pal<- c("#d11141", "#00b159", "#00aedb", "#f37735", "#ffc425")
## Quick and Dirty way to show colours in a plot (along with hexcode)
show_col(colpal, labels=T, borders=NA, cex_label=1.5)
show_col(metro_pal, labels=T, border=NA)
## I think I'm in love with this function colorRampPalette### Let's say I want to get 16 colour palettes from 5 colours# bias must be positive number, higher values give more widely spaced colours at the high end.# space - you can pick rgb or Lab# interpolate - "linear" or "spline
show_col(colorRampPalette(colpal, space="Lab")(16), border=NA)