Learn R Programming

swatches (version 0.5.0)

read_ase: Read colors from Adobe Swatch Exchange (ASE) files

Description

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

Usage

read_ase(path, use_names = TRUE, .verbose = FALSE)

Arguments

path

partial or full file path or URL to an ASE file

use_names

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

.verbose

show extra information about ASE file processing

Examples

Run this code
# NOT RUN {
# built-in palette
keep_the_change <- read_ase(system.file("palettes", "keep_the_change.ase", package="swatches"))
print(keep_the_change)
show_palette(keep_the_change)

# from the internet directly
# }
# NOT RUN {
github <- "https://github.com/picwellwisher12pk/en_us/raw/master/Swatches/Metal.ase"
metal <- read_ase(github)
print(metal)
show_palette(metal)
# }

Run the code above in your browser using DataLab