R/RcppExports.R

Defines functions get_palette_cpp list_palettes_cpp analyze_palette_cpp convert_colors qualpal_cpp_palette qualpal_cpp_colorspace qualpal_cpp_rgb

Documented in convert_colors

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

qualpal_cpp_rgb <- function(n, rgb_in, options) {
    .Call(`_qualpalr_qualpal_cpp_rgb`, n, rgb_in, options)
}

qualpal_cpp_colorspace <- function(n, colorspace, n_points, options) {
    .Call(`_qualpalr_qualpal_cpp_colorspace`, n, colorspace, n_points, options)
}

qualpal_cpp_palette <- function(n, palette, options) {
    .Call(`_qualpalr_qualpal_cpp_palette`, n, palette, options)
}

#' Convert colors between colorspaces
#'
#' @param colors A matrix of colors
#' @param from The colorspace of the input colors, one of "rgb", "hsl",
#'   "din99d", "lab", "xyz"
#' @param to The colorspace of the output colors,
#'   one of "rgb", "hsl", "lab", "xyz"
#'
#' @return The colors converted to the new colorspace
convert_colors <- function(colors, from, to) {
    .Call(`_qualpalr_convert_colors`, colors, from, to)
}

analyze_palette_cpp <- function(rgb_in, options) {
    .Call(`_qualpalr_analyze_palette_cpp`, rgb_in, options)
}

list_palettes_cpp <- function() {
    .Call(`_qualpalr_list_palettes_cpp`)
}

get_palette_cpp <- function(palette) {
    .Call(`_qualpalr_get_palette_cpp`, palette)
}

Try the qualpalr package in your browser

Any scripts or data that you put into this service are public.

qualpalr documentation built on Nov. 5, 2025, 6:05 p.m.