hex_to_ase: Convert a list of named, hexadecimal RBG colors into an ASE...

View source: R/ase-write.R

hex_to_aseR Documentation

Convert a list of named, hexadecimal RBG colors into an ASE object

Description

Convert a list of named, hexadecimal RBG colors into an ASE object

Usage

hex_to_ase(colors, type)

Arguments

colors

named vector of RBG hex colors

type

one of "global", "spot", or "process"

Value

ase object

Examples

ase_temp <- tempfile(fileext = ".ase")
on.exit(unlink(ase_temp))

github_url <- "https://github.com/picwellwisher12pk/en_us/raw/master/Swatches/Metal.ase"
metal <- read_ase(github_url)

hex_to_ase(metal, "global") |>
  ase_encode() |>
  writeBin(ase_temp)

read_ase(ase_temp)

hrbrmstr/swatches documentation built on April 8, 2022, 3:59 p.m.