get_color_palette {GTAPViz} | R Documentation |
Print and Visualize Themed Color Palettes
Description
Prints and visualizes predefined color palettes used in GTAPViz. Use 'color_tone = "all"' to return a list of callable palette functions.
Usage
get_color_palette(color_tone = NULL, palette_type = "qualitative")
Arguments
color_tone |
Character. Name of the color theme to display (e.g., '"gtap"', '"winter"', '"fall"', or '"all"'). |
palette_type |
Character. Palette type: '"qualitative"' (default), '"sequential"', or '"diverging"'. |
Value
A character vector of hex color codes representing the selected color palette. If 'color_tone = "all"', returns a list of functions, each generating a specific palette. If 'color_tone = "list"', returns a character vector of available palette names.
Author(s)
Pattawee Puangchit
Examples
# Get all palettes as callable functions
all_palettes <- get_color_palette("all")
all_palettes$winter()
all_palettes$gtap()
# Visualize specific palettes
get_color_palette("fall", "sequential")
get_color_palette("academic", "diverging")
[Package GTAPViz version 1.1.3 Index]