color_text: Color a specific piece of text with a specific RGB hexcode.

View source: R/style.R

color_textR Documentation

Color a specific piece of text with a specific RGB hexcode.

Description

This is often useful within a glue::glue function for a graph title or subtitle.

Usage

color_text(color, text, weight = "bold")

Arguments

color

character, valid CSS color

text

character, text to color

weight

character, which CSS font-weight to apply: c("bold", "normal", "900"), etc.

Value

character, HTML-span-wrapped version of text styled according to color and weight

Examples

color_text("#190C65", "predicted")

bvancilku/kubrand documentation built on July 26, 2022, 6:23 a.m.