make_colored: Make colored text

View source: R/helper_functions.r

make_coloredR Documentation

Make colored text

Description

This function applies a specified color to a given text string.

Usage

make_colored(x, color = NULL)

Arguments

x

The text string to be colored.

color

The color to be applied to the text. If NULL, the color codes will be removed.

Value

A colored text string or a text string with color codes removed.

Examples

make_colored("Hello, world!", "blue")
make_colored("Hello, world!", NULL)

plotcli documentation built on May 29, 2024, 6:22 a.m.