The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
afcolours is an R package which can be used produce the Analysis Function recommended colour palettes to help meet accessibility guidelines. See the Government Analysis Function website for more information.
afcolours can be used to return either hex or rgb codes using the
colour_format
argument
You can install the development version of afcolours from GitHub with:
# install.packages("devtools")
::install_github("best-practice-and-impact/afcolours") devtools
This is a basic example of how to use afcolours with ggplot2:
library(afcolours)
<- data.frame(x = c(1,2),
data y = c(1,2),
z = c("a","b")
)::ggplot(data, ggplot2::aes(x = x, y = y, colour = z)) +
ggplot2::geom_point() +
ggplot2::scale_colour_manual(values = af_colours("duo"))
ggplot2}
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.