Tinderbox v9 Icon

StyledString.textColor(color)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Item   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 9.0.0

 


StyledString.textColor(color)

The operator .textColor(color), 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.