read_aco: Read colors from Adobe Color (ACO) files

Description Usage Arguments Note Examples

View source: R/adobecolor.R

Description

Given a path or URL to an .aco file, this function will return a named character vector (if color names are present) of hex RGB colors.

Usage

1
read_aco(path, use_names = TRUE, .verbose = FALSE)

Arguments

path

partial or full file path or URL to an ACO file

use_names

add color names to the vector (defaults to TRUE). See NOTE

.verbose

show extra information about ACO file processing#'

Note

When using named color palettes in a ggplot2 scale_ context, you must unname them or set use_names to FALSE. Not sure if this is a bug or a deliberate feature in ggplot2. Also, Neither Lab nor greyscale colors are supported.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# built in palette
eighties <- read_ase(system.file("palettes", "tomorrow_night_eighties.aco", package="adobecolor"))
print(eighties)
show_palette(eighties)

# from the internet directly
url <- "https://github.com/chriskempson/tomorrow-theme/raw/master/Photoshop%20Color%20Swatchesdi/Tomorrow%20Night.aco"
tomorrow_night <- read_ase(url)
print(tomorrow_night)
show_palette(tomorrow_night)

## End(Not run)

hrbrmstr/adobecolor documentation built on May 17, 2019, 4:55 p.m.