Skip to contents

Returns a named vector of hex color codes for coral species, with an option to lighten the palette for alternate display modes (e.g., backgrounds or emphasis).

Usage

sp_pal(type = "base")

Arguments

type

Character. Type of palette to return. "base" for the default palette, or any other value to return a paler variant.

Value

A named character vector where names are species names and values are hex color codes.

Examples

sp_pal()                        # Returns base palette
#>     Acropora hyacinthus       Acropora cytherea     Acropora intermedia 
#>               "#50676c"               "#3a6c8e"               "#2c3687" 
#>        Acropora robusta     Acropora spathulata      Acropora millepora 
#>               "#7b8ca8"               "#98a062"               "#665a43" 
#>         Acropora nasuta        Acropora humilis Acropora cf. digitifera 
#>               "#48642f"               "#824b3b"               "#a47c73" 
#>    Goniastrea pectinata   Goniastrea retiformis 
#>               "#999999"               "#bfbfbf" 
sp_pal("pale")                 # Returns lighter palette
#>     Acropora hyacinthus       Acropora cytherea     Acropora intermedia 
#>             "#607C82FF"             "#4682AAFF"             "#3541A2FF" 
#>        Acropora robusta     Acropora spathulata      Acropora millepora 
#>             "#94A8CAFF"             "#B6C076FF"             "#7A6C50FF" 
#>         Acropora nasuta        Acropora humilis Acropora cf. digitifera 
#>             "#567838FF"             "#9C5A47FF"             "#C5958AFF" 
#>    Goniastrea pectinata   Goniastrea retiformis 
#>             "#B8B8B8FF"             "#E5E5E5FF" 
barplot(rep(1, 11), col = sp_pal())  # Visualize palette