-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
66 lines (52 loc) · 2.16 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# AachenColorPalette
<!-- badges: start -->
[![R-CMD-check](https://github.com/christianholland/AachenColorPalette/workflows/R-CMD-check/badge.svg)](https://github.com/christianholland/AachenColorPalette/actions)
[![codecov](https://codecov.io/gh/christianholland/AachenColorPalette/branch/master/graph/badge.svg)](https://codecov.io/gh/christianholland/AachenColorPalette)
![GitHub](https://img.shields.io/github/license/christianholland/AachenColorPalette)
<!-- badges: end -->
## Overview
This package allows to query colors from a palette inspired from [RWTH Aachen corporate design](http://www9.rwth-aachen.de/global/show_document.asp?id=aaaaaaaaaadpbhq) using R. The color palette contains 13 different colors, each in 5 different intensities (100%, 75%, 50%, 25% and 10%; see figure below).
## Disclaimer
The color palette makes no claim to completeness or correctness of the official RWTH Aachen corporate design.
## Installation
```r
# install the development version from GitHub
# install.packages("remotes")
remotes::install_github("christianholland/AachenColorPalette")
```
## Usage
Query colors by combining color name in lower case (check figure below for color names) and color intensity. For colors with 100% intensity the color name alone is sufficient.
```r
# load package
library(AachenColorPalette)
# show the color palette
display_aachen_color()
# query single or multiple colors
aachen_color("blue")
[1] "#00549F"
aachen_color("green", "green75", "green50", "green25", "green10")
[1] "#57AB27" "#8DC060" "#B8D698" "#DDEBCE" "#F2F7EC"
```
## Color Palette
<img src='man/figures/aachen_color_palette.png' align="center" height="500" />
## Example
```r
library(ggplot2)
library(AachenColorPalette)
ggplot(mtcars, aes(x = wt, y = mpg, color=factor(cyl))) +
geom_point() +
scale_color_manual(values = aachen_color("bordeaux", "green", "turquoise"))
```
<img src='man/figures/example_plot.png' align="center" height="500" />