text_color: Text color

View source: R/text-color.R

text_colorR Documentation

Text color

Description

The text_color() function adjusts the color of text in a tag element.

Usage

text_color(x, color)

text_emphasis(x, color)

Arguments

x

A tag element or .style pronoun.

color

A character string specifying a color. One of,

  • "primary"

  • "secondary"

  • "success"

  • "danger"

  • "warning"

  • "info"

  • "light"

  • "dark"

  • "body"

  • "black"

  • "white"

Value

An object of the same type as x.

See Also

Other text utilities: text_alignment(), text_break(), text_decoration(), text_height(), text_selection(), text_style(), text_transform(), text_weight(), text_wrap()

Examples


library(htmltools)

div(
  .style %>%
    text_color(theme_primary())
)

div(
  .style %>%
    text_color(theme_dark()) %>%
    border_color(theme_dark())
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.