EVOLUTION-MANAGER
Edit File: combine_ansi_styles.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Combine two or more ANSI styles</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for combine_ansi_styles {cli}"><tr><td>combine_ansi_styles {cli}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Combine two or more ANSI styles</h2> <h3>Description</h3> <p>Combine two or more styles or style functions into a new style function that can be called on strings to style them. </p> <h3>Usage</h3> <pre> combine_ansi_styles(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>The styles to combine. For character strings, the <code><a href="make_ansi_style.html">make_ansi_style()</a></code> function is used to create a style first. They will be applied from right to left.</p> </td></tr> </table> <h3>Details</h3> <p>It does not usually make sense to combine two foreground colors (or two background colors), because only the first one applied will be used. </p> <p>It does make sense to combine different kind of styles, e.g. background color, foreground color, bold font. </p> <h3>Value</h3> <p>The combined style function. </p> <h3>See Also</h3> <p>Other ANSI styling: <code><a href="ansi-styles.html">ansi-styles</a></code>, <code><a href="make_ansi_style.html">make_ansi_style</a>()</code>, <code><a href="num_ansi_colors.html">num_ansi_colors</a>()</code> </p> <h3>Examples</h3> <pre> ## Use style names alert <- combine_ansi_styles("bold", "red4") cat(alert("Warning!"), "\n") ## Or style functions alert <- combine_ansi_styles(style_bold, col_red, bg_cyan) cat(alert("Warning!"), "\n") ## Combine a composite style alert <- combine_ansi_styles( "bold", combine_ansi_styles("red", bg_cyan)) cat(alert("Warning!"), "\n") </pre> <hr /><div style="text-align: center;">[Package <em>cli</em> version 3.4.1 <a href="00Index.html">Index</a>]</div> </body></html>