Skip to contents

This function defines a color scheme for visualizations in the fHMM package.

Usage

fHMM_colors(controls, colors = NULL)

Arguments

controls

An object of class fHMM_controls.

colors

Either NULL or a character vector of color names or hexadecimal RGB triplets.

Value

An object of class fHMM_colors, which is:

  • for controls$hierarchy == FALSE a vector of length controls$states of color codes,

  • for controls$hierarchy == TRUE a list of

    • a vector of length controls$states[1] and

    • a matrix of dimensions controls$states of color codes.

Examples

controls <- set_controls()
fHMM:::fHMM_colors(controls, colors = c("red", "blue"))
#> [1] "#FF000099" "#0000FF99"
#> attr(,"class")
#> [1] "fHMM_colors"