Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Function [other Function type actions]
Item [operators of similar scope]
Data manipulation [other Data manipulation operators]
String [about String data type]
v9.0.0
Baseline
As at baseline
StyledString.textColor(aColor)
The operator .textColor(aColor), when applied to styled text, sets the foreground colour of the text. The color argument can be either a named colour or a hexadecimal string. For example, both of these examples add 'example' in bright red text to the current note's $Text.
$Text = $Text + "example".textColor("#FF0000")
Note that $Text is currently the only attribute capable of holding styled text. String attributes and action code variables, i.e. var, cannot store styled text. If passed styled text the latter will store the unstyled version of the text being passed. See a more detailed explanation.
.textColor() respects the current text font, e.g. if set to a non-default colour.
See also—notes linking to here: