RStyle(style:Str, content:RichText...):RichText
Attaches a new style to a rich text string. Concatenates all content parameters, and returns a new rich text string with the specified attribute added.
RStyle("red", "This is ", RStyle("bold", "great"))
produces "This is great".
If any argument is EMPTY, returns EMPTY.
In text mode, this function just returns the concatenation of the content, as rich text attributes have no meaning to the text mode applications.
Styles: the style parameter can contain a list of comma-separated keywords. Keywords are a superset of tag and color names used in RXml.
b, bold, em | bold font |
background-color | UI color: background |
big | bigger font size |
blue | text color |
contrast-color | UI color: contrast |
dim | text color |
fixed, tt | typewriter font |
green | text color |
heading-color | UI color: heading |
input-color | UI color: text input |
inverse-color | UI color: inverse |
kbd, key | keycaps (Like This) |
link-color | UI color: link |
link-focus-color | UI color: link focus |
link-shade-color | UI color: link shade (hover) |
none | no style |
red | text color |
selection-color | UI color: link shade |
small | smaller font size |
static | default text color |
u, underline | underlined text |
white | text color |
yellow | text color |
The UI colors are supported since 2.0.14 and can be used to match specific UI elements. Otherwise, they have no guaranteed appearance.
Since: PCC2 1.99.21