| add_color | R Documentation |
Add a named color to an ASE swatch object
add_color(ase_obj, name, model, color_vals, type)
ase_obj |
An ASE object created with |
name |
name of the color |
model |
one of " |
color_vals |
vector of color values associated with the chosen |
type |
one of " |
ase_obj (invisibly)
create_ase() |>
add_color(
name = "RGB Red",
model = "RGB",
color_vals = as.vector(col2rgb("#FF0000")/255),
type = "global"
) |>
add_color(
name = "RGB Yellow",
model = "RGB",
color_vals = as.vector(col2rgb("#FFFF00")/255),
type = "global"
) |>
ase_encode() |>
writeBin(tempfile(fileext = ".ase"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.