Learn R Programming

teal.slice (version 0.5.1)

fetch_bs_color: Get hex code of the current Bootstrap theme color.

Description

Determines the color specification for the currently active Bootstrap color theme and returns one queried color.

Usage

fetch_bs_color(color, alpha = NULL)

Value

Named character(1) containing a hexadecimal color representation.

Arguments

color

(character(1)) naming one of the available theme colors

alpha

either a numeric(1) or character(1) specifying transparency in the range of 0-1 or a hexadecimal value 00-ff, respectively; set to NULL to omit adding the alpha channel

Examples

Run this code
fetch_bs_color <- getFromNamespace("fetch_bs_color", "teal.slice")
fetch_bs_color("primary")
fetch_bs_color("danger", 0.35)
fetch_bs_color("danger", "80")

Run the code above in your browser using DataLab