DOpus.Output coloured text

How can the colour for the DOpus.Output text be set.
DOpus.Output("<br">); will insert a line break so I thought it might be possible to change the text colour, tried <style> tags - didn't work:(

<#rrggbb>...</#> e.g. <#ff0000>red text!</#>.

DOpus.Output("<#ff0000>text</#>"); not working,
image

I see the same as @galaxyhub. Maybe a working code snippet?

The shorthand version works in the Status Bar but I think DOpus.Output requires the more verbose syntax (probably to avoid accidentally coloring script output that didn't intend for it):

DOpus.Output("<font color=#FF0000>Line 1</font>");

2 Likes

Here is a log function that can take a hexadecimal colour argument like so
Log("Message that is green", "00ff00")
leaving the colour code out will default to #000000.
Log("Message not coloured");
Sidenote: JScript does not allow default values in function parameters.

function Log(str, color) {
    if (color === undefined) color = "000000";
    DOpus.Output("<font color=#" + color + ">" + str + "</font>");
}