Learn R Programming

plotcli (version 0.2.0)

make_colored: Make colored text

Description

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

Usage

make_colored(x, color = NULL)

Value

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

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.

Examples

Run this code
make_colored("Hello, world!", "blue")
make_colored("Hello, world!", NULL)

Run the code above in your browser using DataLab