Let's start with the viridis
palette. In my opinion, colours are a bit just too bright for me, and for my purposes they look too artificial. therefore, I would like to apply some sort of transparency or similar to reduce saturation:
library(nord)
library(scales)
library(viridis)
library(nord)
show_col(viridis(5))
show_col(viridis(5, alpha=.5))
Applying alpha transparency internally seems to work.
.
However, when run in ggplot, it automatically changes alpha to 1 and plots the original viridis in full intensity:
ggplot(faithfuld, aes(waiting, eruptions)) +
geom_raster(aes(fill = density)) +
scale_fill_viridis(5, alpha=.5)
In another example, I found the opposite problem, lack of intensity/saturation. For example, the "aurora" palette from the nord
package is great, but it looks a bit faded, lacking some saturation, at least for my purposes.
show_col(nord("aurora",5))
Similarly, I tried to set alpha internally, in this case to 1, but this pruduces a different effect as compared to viridis, changing the palette.
show_col(nord("aurora", alpha=.5))
Alternatively, I have set alpha as alpha()
. However, this only changes the color names, but they look the same.
show_col(alpha(nord("aurora",5)), .5)
How can I reduce saturation/intensity in viridis
and increase in the nord
palettes in ggplot
?