fmt_get_color_code {tabxplor}R Documentation

Get HTML Color Code of a fmt vector

Description

Get HTML Color Code of a fmt vector

Usage

fmt_get_color_code(x, type = "text", theme = "light", html_24_bit = NULL)

Arguments

x

The fmt vector to get the html color codes from.

type

The style type in set_color_style and get_color_style, "text" to color the text, "bg" to color the background.

theme

For set_color_style and get_color_style, is your console or html table background "light" or "dark" ? Default to RStudio theme.

html_24_bit

Should specific 24bits colors palettes be used for html tables ? With light themes only. Default to getOption("tabxplor.color_html_24_bit")

Value

A character vector with html color codes, of the length of the initial vector.

Examples


tabs <- tab(forcats::gss_cat, race, marital, pct = "row", color = "diff")
dplyr::mutate(tabs, across(where(is_fmt), fmt_get_color_code))


[Package tabxplor version 1.1.3 Index]