demo/viridis.R

if(requireNamespace("viridis")) {

library("colorspace")

specplot(viridis::viridis(9), sequential_hcl(9, "Viridis"), main = "Viridis")
specplot(viridis::cividis(9), divergingx_hcl(9, "Cividis"), main = "Cividis")
specplot(viridis::plasma(9),  sequential_hcl(9, "Plasma"),  main = "Plasma")
specplot(viridis::inferno(9), sequential_hcl(9, "Inferno"), main = "Inferno")
specplot(viridis::rocket(9),  sequential_hcl(9, "Rocket"),  main = "Rocket")
specplot(viridis::mako(9),    sequential_hcl(9, "Mako"),    main = "Mako")

}

Try the colorspace package in your browser

Any scripts or data that you put into this service are public.

colorspace documentation built on Jan. 25, 2023, 3:12 p.m.