Skip to contents

This is a color palette for R based on Steph Ango’s “inky color scheme” 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 with:

# 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.1 See Examples below for information on how to use flexoki.

Colors/hues available in the flexoki package.


Examples

At present there is only one function in flexoki: flex().

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.

library(flexoki)

## two different colors with same saturation levels
flex(c("blue", "red"), 100)
#> [1] "#C6DDE8" "#FFCABB"

## two different colors with same saturation levels in RGB
flex(c("blue", "red"), 100, code = "rgb")
#> # A tibble: 2 × 3
#>     red green  blue
#>   <int> <int> <int>
#> 1   198   221   232
#> 2   255   202   187

## gray with different saturation levels
flex("gray", c(100, 200)) # same as flex("base", c(100, 200))
#> [1] "#E6E4D9" "#CECDC3"

## three colors with specific saturation levels
flex(c("blue", "red", "green"), c(100, 200, 300))
#> [1] "#C6DDE8" "#F89A8A" "#A0AF54"