-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Rmd
More file actions
74 lines (47 loc) · 2.27 KB
/
README.Rmd
File metadata and controls
74 lines (47 loc) · 2.27 KB
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
67
68
69
70
71
72
73
---
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%"
)
```
# flexoki <img src="dev/logo.png" align="right" alt="" width="120" />
This is a color palette for R based on Steph Ango's "inky color scheme" [flexoki](https://stephango.com/flexoki). According to Steph,
> Flexoki is designed for reading and writing on digital screens. It is inspired by analog inks and warm shades of paper... Flexoki is minimalistic and high-contrast. The colors are calibrated for legibility and perceptual balance across devices and when switching between light and dark modes.
## Installation
You can install the development version of flexoki from [GitHub](https://github.com/) with:
```{r, message = FALSE}
# install.packages("pak")
pak::pak("mdscheuerell/flexoki")
```
## Color options
flexoki offers the following options for colors:
- an off-white “paper” background (`#FFFCF0`)
- black (`#100F0F`)
* 12-level gray-scale
* 12-levels of saturation for 8 different hues
The following image shows the different hues and levels of saturation available in flexoki.^[Graphic courtesy of [Steph Ango's website](https://stephango.com/flexoki) and available [here](https://github.com/kepano/flexoki/blob/main/_images/flexoki-palette.png).] See [Examples](#examples) below for information on how to use flexoki.

<br>
## Examples {#examples}
At present there is only one function in flexoki: `flex()`.
```{r flex_form, eval = FALSE}
flex(col, sat = 400, code = "hex", palette = flexoki)
```
`flex()` is designed to work with scalar or vector inputs and can provide color codes in either hexadecimal (default) or RGB formats.
```{r example}
library(flexoki)
## two different colors with same saturation levels
flex(c("blue", "red"), 100)
## two different colors with same saturation levels in RGB
flex(c("blue", "red"), 100, code = "rgb")
## gray with different saturation levels
flex("gray", c(100, 200)) # same as flex("base", c(100, 200))
## three colors with specific saturation levels
flex(c("blue", "red", "green"), c(100, 200, 300))
```