scPalette: Generate a Color Palette

View source: R/visiualization.R

scPaletteR Documentation

Generate a Color Palette

Description

This function generates a color palette. It selects colors from a predefined color space, and if more colors are needed than are available in the predefined set, it generates a palette using color interpolation.

Usage

scPalette(n)

Arguments

n

An integer specifying the number of colors needed.

Value

A character vector of colors in hexadecimal format.

Examples


# Generate a palette with 5 colors
palette <- scPalette(5)
print(palette)

# Generate a palette with 30 colors
large_palette <- scPalette(30)
print(large_palette)


SpaCCI documentation built on June 8, 2025, 11:50 a.m.

Related to scPalette in SpaCCI...