check_palette: Check palettes and palette types

View source: R/utils-palettes.R

check_paletteR Documentation

Check palettes and palette types

Description

Checks values against those available in available_palette_types() and available_palettes().

Usage

check_palette(palette_type, palette, error_call = rlang::caller_env())

check_palette_type(palette_type, error_call = rlang::caller_env())

Arguments

palette_type, palette

String.

error_call

Environment to reference in error messages.

Value

The value being checked is returned invisibly if the check is successful. Otherwise the function will return an error.

Examples

check_palette_type("sg")
check_palette("sg", "main")


sgplot documentation built on June 8, 2025, 12:15 p.m.