colours that R knows
Series: IDHTG
I have been working through the ggplot R Advent calendar by Kiirsti Owen with some lovely RLadies friends and we got up to Day 15 where we started controlling colours in ggplot with scale_fill_manual(). Our immediate question was “how to you know what the names of the colours that R knows are?” This is a “I don’t have to google” post about finding the colours that R knows about. trees %>% ggplot(aes(x=type, y=height))+ geom_boxplot(aes(fill=type), colour="black")+ theme_classic()+ scale_fill_manual(values=c("darkgreen", "firebrick2", "mediumseagreen")) You can have R list the names of all the colours it knows (there are 657 of them) using the colours() function, but that is not so useful if you want to see the difference between hotpink1 and hotpink2.