Learn R Programming

gooseR (version 0.1.0)

goose_suggest_colors: Suggest Color Palette with AI

Description

Get AI-powered color palette suggestions for data visualization.

Usage

goose_suggest_colors(purpose, n_colors = 5, brand = NULL, constraints = NULL)

Value

List with hex colors and rationale

Arguments

purpose

Character, the purpose of the palette (e.g., "heatmap", "categorical", "diverging")

n_colors

Integer, number of colors needed

brand

Optional brand name for brand-appropriate colors

constraints

Optional constraints (e.g., "colorblind-safe", "print-friendly")

Examples

Run this code
if (FALSE) {
# Get heatmap colors
colors <- goose_suggest_colors("heatmap", n_colors = 9)

# Get brand colors
colors <- goose_suggest_colors("categorical", n_colors = 5, brand = "Block")

# Get accessible colors
colors <- goose_suggest_colors("bar chart", n_colors = 4, 
                               constraints = "colorblind-safe")
}

Run the code above in your browser using DataLab