The official colour scheme of Praxis Centre for Policy Studies in Estonia
Maris Vainre 03/04/2021
This is an R package to employ the official Praxis Centre for Policy Studies colour palette. The package was created based on Alex Quent’s MRColour and Drsimonj’s blog post.
library(PraxisColour)
library(tidyverse)
library(ggplot2)
library(hrbrthemes)
praxis_pal("main")(7)
## [1] "#3455CC" "#98C9F6" "#262626" "#F14D4D" "#FFCE19" "#A5A5A5" "#C8A366"
praxis_pal("contrast")(3)
## [1] "#3455CC" "#F14D4D" "#FFCE19"
praxis_pal("cool")(3)
## [1] "#3455CC" "#A5A5A5" "#98C9F6"
praxis_pal("binary")(2)
## [1] "#3455CC" "#A5A5A5"
praxis_pal("blackgold")(2)
## [1] "#262626" "#C8A366"
praxis_pal("monochrome")(2)
## [1] "#262626" "#A5A5A5"
Each palette has a gradient. For example:
praxis_pal("contrast")(10)
## [1] "#3455CC" "#5E53AF" "#885193" "#B24F77" "#DC4D5B" "#F25B47" "#F5773B"
## [8] "#F89430" "#FBB124" "#FFCE19"
praxis_pal("seq_blue")(7)
## [1] "#3455CC" "#557BDA" "#76A2E8" "#98C9F6" "#B2D7F8" "#CDE4FA" "#E8F3FD"
praxis_pal("seq_yellow")(7)
## [1] "#FFCE19" "#FFD438" "#FFDB58" "#FFE278" "#FFE898" "#FFEFB8" "#FFF6D8"
praxis_pal("seq_red")(7)
## [1] "#F14D4D" "#F36767" "#F58181" "#F79C9C" "#F9B6B6" "#FBD0D0" "#FDEBEB"
praxis_pal("seq_gold")(7)
## [1] "#C8A366" "#CFAF7B" "#D7BC90" "#DEC9A5" "#E6D5BA" "#EDE2CF" "#F5EFE5"
praxis_pal("seq_black")(7)
## [1] "#262626" "#505050" "#7A7A7A" "#A5A5A5" "#BABABA" "#D0D0D0" "#E6E6E6"
praxis_pal("diverging_br")(7)
## [1] "#3455CC" "#6F85D4" "#AAB5DD" "#E6E6E6" "#E9B3B3" "#ED8080" "#F14D4D"
praxis_pal("diverging_bg")(7)
## [1] "#3455CC" "#6F85D4" "#AAB5DD" "#E6E6E6" "#DCCFBB" "#D2B990" "#C8A366"
praxis_pal("diverging_by")(7)
## [1] "#3455CC" "#6F85D4" "#AAB5DD" "#E6E6E6" "#EEDEA1" "#F6D65D" "#FFCE19"
ggplot
examplesYou can specify a colour from the following:
praxis_cols("blue", "lightblue", "black", "red", "yellow", "grey", "gold")
ggplot(mtcars, aes(hp, mpg)) +
geom_point(colour = praxis_cols("blue"),
size = 8, alpha = .8) +
import_roboto_condensed()+
theme_ipsum_rc(grid=FALSE)
ggplot(mpg, aes(displ, hwy, colour = class)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "main") +
theme_ipsum_rc(grid=FALSE)
ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
geom_bar()+
scale_fill_praxis(palette = "main", guide = "none") +
theme_ipsum_rc(grid=FALSE, axis_text_size = 6)
ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
geom_bar()+
scale_fill_praxis(palette = "seq_blue", guide = "none") +
theme_ipsum_rc(grid=FALSE, axis_text_size = 6)
ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
geom_bar()+
scale_fill_praxis(palette = "diverging_br", guide = "none") +
theme_ipsum_rc(grid=FALSE, axis_text_size = 6)
A boxplot example contributed by Märt Masso.
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "contrast") +
theme_ipsum_rc(grid=FALSE)
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "cool") +
theme_ipsum_rc(grid=FALSE)
iris.sub <- iris %>%
filter(Species != "versicolor")
ggplot(iris.sub, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "binary") +
theme_ipsum_rc(grid=FALSE)
iris.sub <- iris %>%
filter(Species != "versicolor")
ggplot(iris.sub, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "blackgold") +
theme_ipsum_rc(grid=FALSE)
iris.sub <- iris %>%
filter(Species != "versicolor")
ggplot(iris.sub, aes(Sepal.Width, Sepal.Length, colour = Species)) +
geom_point(size = 2) +
scale_colour_praxis(palette = "monochrome") +
theme_ipsum_rc(grid=FALSE)
Start by installing the devtool’s package
install.packages("devtools")
Then download this package from github
library(devtools)
install_github("mvainre/PraxisColour")
Now you’re ready to use it:
library(PraxisColour)