tscv_cols: Extract tscv colors

View source: R/colors_tscv.R

tscv_colsR Documentation

Extract tscv colors

Description

Extract named colors from the tscv color palette as hexadecimal color codes.

Usage

tscv_cols(...)

Arguments

...

Character values giving the names of colors to extract.

Details

tscv_cols() returns the hexadecimal color codes used by the tscv package. If no color names are supplied, all available colors are returned.

Available colors are: "red", "green", "blue", "orange", "yellow", "light grey", and "dark grey".

Value

A named character vector of hexadecimal color codes.

See Also

Other data visualization: plot_bar(), plot_density(), plot_histogram(), plot_line(), plot_point(), plot_qq(), scale_color_tscv(), scale_fill_tscv(), theme_tscv(), tscv_pal()

Examples

# Return all available tscv colors
tscv_cols()

# Return selected colors
tscv_cols("steelblue", "orange", "green")

# Use a tscv color in a plot
library(dplyr)

data <- M4_monthly_data |>
  filter(series == "M23100")

plot_line(
  data = data,
  x = index,
  y = value,
  title = "M4 Monthly Time Series",
  subtitle = "Series M23100",
  xlab = "Time",
  ylab = "Value",
  line_color = tscv_cols("steelblue")
)

tscv documentation built on May 13, 2026, 9:07 a.m.